154 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			154 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
/*
 | 
						||
API Яндекс Маркета для продавцов
 | 
						||
 | 
						||
API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом.  В числе возможностей интеграции:  * управление каталогом товаров и витриной,  * обработка заказов,  * изменение настроек магазина,  * получение отчетов.
 | 
						||
 | 
						||
API version: LATEST
 | 
						||
*/
 | 
						||
 | 
						||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | 
						||
 | 
						||
package ymclient
 | 
						||
 | 
						||
import (
 | 
						||
	"encoding/json"
 | 
						||
)
 | 
						||
 | 
						||
// checks if the ApiResponse type satisfies the MappedNullable interface at compile time
 | 
						||
var _ MappedNullable = &ApiResponse{}
 | 
						||
 | 
						||
// ApiResponse Стандартная обертка для ответов сервера.
 | 
						||
type ApiResponse struct {
 | 
						||
	Status               *ApiResponseStatusType `json:"status,omitempty"`
 | 
						||
	AdditionalProperties map[string]interface{}
 | 
						||
}
 | 
						||
 | 
						||
type _ApiResponse ApiResponse
 | 
						||
 | 
						||
// NewApiResponse instantiates a new ApiResponse 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 NewApiResponse() *ApiResponse {
 | 
						||
	this := ApiResponse{}
 | 
						||
	return &this
 | 
						||
}
 | 
						||
 | 
						||
// NewApiResponseWithDefaults instantiates a new ApiResponse 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 NewApiResponseWithDefaults() *ApiResponse {
 | 
						||
	this := ApiResponse{}
 | 
						||
	return &this
 | 
						||
}
 | 
						||
 | 
						||
// GetStatus returns the Status field value if set, zero value otherwise.
 | 
						||
func (o *ApiResponse) GetStatus() ApiResponseStatusType {
 | 
						||
	if o == nil || IsNil(o.Status) {
 | 
						||
		var ret ApiResponseStatusType
 | 
						||
		return ret
 | 
						||
	}
 | 
						||
	return *o.Status
 | 
						||
}
 | 
						||
 | 
						||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
 | 
						||
// and a boolean to check if the value has been set.
 | 
						||
func (o *ApiResponse) GetStatusOk() (*ApiResponseStatusType, bool) {
 | 
						||
	if o == nil || IsNil(o.Status) {
 | 
						||
		return nil, false
 | 
						||
	}
 | 
						||
	return o.Status, true
 | 
						||
}
 | 
						||
 | 
						||
// HasStatus returns a boolean if a field has been set.
 | 
						||
func (o *ApiResponse) HasStatus() bool {
 | 
						||
	if o != nil && !IsNil(o.Status) {
 | 
						||
		return true
 | 
						||
	}
 | 
						||
 | 
						||
	return false
 | 
						||
}
 | 
						||
 | 
						||
// SetStatus gets a reference to the given ApiResponseStatusType and assigns it to the Status field.
 | 
						||
func (o *ApiResponse) SetStatus(v ApiResponseStatusType) {
 | 
						||
	o.Status = &v
 | 
						||
}
 | 
						||
 | 
						||
func (o ApiResponse) MarshalJSON() ([]byte, error) {
 | 
						||
	toSerialize, err := o.ToMap()
 | 
						||
	if err != nil {
 | 
						||
		return []byte{}, err
 | 
						||
	}
 | 
						||
	return json.Marshal(toSerialize)
 | 
						||
}
 | 
						||
 | 
						||
func (o ApiResponse) ToMap() (map[string]interface{}, error) {
 | 
						||
	toSerialize := map[string]interface{}{}
 | 
						||
	if !IsNil(o.Status) {
 | 
						||
		toSerialize["status"] = o.Status
 | 
						||
	}
 | 
						||
 | 
						||
	for key, value := range o.AdditionalProperties {
 | 
						||
		toSerialize[key] = value
 | 
						||
	}
 | 
						||
 | 
						||
	return toSerialize, nil
 | 
						||
}
 | 
						||
 | 
						||
func (o *ApiResponse) UnmarshalJSON(data []byte) (err error) {
 | 
						||
	varApiResponse := _ApiResponse{}
 | 
						||
 | 
						||
	err = json.Unmarshal(data, &varApiResponse)
 | 
						||
 | 
						||
	if err != nil {
 | 
						||
		return err
 | 
						||
	}
 | 
						||
 | 
						||
	*o = ApiResponse(varApiResponse)
 | 
						||
 | 
						||
	additionalProperties := make(map[string]interface{})
 | 
						||
 | 
						||
	if err = json.Unmarshal(data, &additionalProperties); err == nil {
 | 
						||
		delete(additionalProperties, "status")
 | 
						||
		o.AdditionalProperties = additionalProperties
 | 
						||
	}
 | 
						||
 | 
						||
	return err
 | 
						||
}
 | 
						||
 | 
						||
type NullableApiResponse struct {
 | 
						||
	value *ApiResponse
 | 
						||
	isSet bool
 | 
						||
}
 | 
						||
 | 
						||
func (v NullableApiResponse) Get() *ApiResponse {
 | 
						||
	return v.value
 | 
						||
}
 | 
						||
 | 
						||
func (v *NullableApiResponse) Set(val *ApiResponse) {
 | 
						||
	v.value = val
 | 
						||
	v.isSet = true
 | 
						||
}
 | 
						||
 | 
						||
func (v NullableApiResponse) IsSet() bool {
 | 
						||
	return v.isSet
 | 
						||
}
 | 
						||
 | 
						||
func (v *NullableApiResponse) Unset() {
 | 
						||
	v.value = nil
 | 
						||
	v.isSet = false
 | 
						||
}
 | 
						||
 | 
						||
func NewNullableApiResponse(val *ApiResponse) *NullableApiResponse {
 | 
						||
	return &NullableApiResponse{value: val, isSet: true}
 | 
						||
}
 | 
						||
 | 
						||
func (v NullableApiResponse) MarshalJSON() ([]byte, error) {
 | 
						||
	return json.Marshal(v.value)
 | 
						||
}
 | 
						||
 | 
						||
func (v *NullableApiResponse) UnmarshalJSON(src []byte) error {
 | 
						||
	v.isSet = true
 | 
						||
	return json.Unmarshal(src, &v.value)
 | 
						||
}
 |