Files
Sipro-Marketplaces/pkg/api/yandex/ymclient/model_document_dto.go
2025-08-15 11:10:28 +03:00

230 lines
5.9 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
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 DocumentDTO type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DocumentDTO{}
// DocumentDTO Информация о документе.
type DocumentDTO struct {
Status *OrderDocumentStatusType `json:"status,omitempty"`
// Номер документа.
Number *string `json:"number,omitempty"`
// Дата создания документа.
Date *string `json:"date,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DocumentDTO DocumentDTO
// NewDocumentDTO instantiates a new DocumentDTO 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 NewDocumentDTO() *DocumentDTO {
this := DocumentDTO{}
return &this
}
// NewDocumentDTOWithDefaults instantiates a new DocumentDTO 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 NewDocumentDTOWithDefaults() *DocumentDTO {
this := DocumentDTO{}
return &this
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *DocumentDTO) GetStatus() OrderDocumentStatusType {
if o == nil || IsNil(o.Status) {
var ret OrderDocumentStatusType
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 *DocumentDTO) GetStatusOk() (*OrderDocumentStatusType, 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 *DocumentDTO) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given OrderDocumentStatusType and assigns it to the Status field.
func (o *DocumentDTO) SetStatus(v OrderDocumentStatusType) {
o.Status = &v
}
// GetNumber returns the Number field value if set, zero value otherwise.
func (o *DocumentDTO) GetNumber() string {
if o == nil || IsNil(o.Number) {
var ret string
return ret
}
return *o.Number
}
// GetNumberOk returns a tuple with the Number field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocumentDTO) GetNumberOk() (*string, bool) {
if o == nil || IsNil(o.Number) {
return nil, false
}
return o.Number, true
}
// HasNumber returns a boolean if a field has been set.
func (o *DocumentDTO) HasNumber() bool {
if o != nil && !IsNil(o.Number) {
return true
}
return false
}
// SetNumber gets a reference to the given string and assigns it to the Number field.
func (o *DocumentDTO) SetNumber(v string) {
o.Number = &v
}
// GetDate returns the Date field value if set, zero value otherwise.
func (o *DocumentDTO) GetDate() string {
if o == nil || IsNil(o.Date) {
var ret string
return ret
}
return *o.Date
}
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocumentDTO) GetDateOk() (*string, bool) {
if o == nil || IsNil(o.Date) {
return nil, false
}
return o.Date, true
}
// HasDate returns a boolean if a field has been set.
func (o *DocumentDTO) HasDate() bool {
if o != nil && !IsNil(o.Date) {
return true
}
return false
}
// SetDate gets a reference to the given string and assigns it to the Date field.
func (o *DocumentDTO) SetDate(v string) {
o.Date = &v
}
func (o DocumentDTO) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DocumentDTO) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Number) {
toSerialize["number"] = o.Number
}
if !IsNil(o.Date) {
toSerialize["date"] = o.Date
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DocumentDTO) UnmarshalJSON(data []byte) (err error) {
varDocumentDTO := _DocumentDTO{}
err = json.Unmarshal(data, &varDocumentDTO)
if err != nil {
return err
}
*o = DocumentDTO(varDocumentDTO)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "status")
delete(additionalProperties, "number")
delete(additionalProperties, "date")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDocumentDTO struct {
value *DocumentDTO
isSet bool
}
func (v NullableDocumentDTO) Get() *DocumentDTO {
return v.value
}
func (v *NullableDocumentDTO) Set(val *DocumentDTO) {
v.value = val
v.isSet = true
}
func (v NullableDocumentDTO) IsSet() bool {
return v.isSet
}
func (v *NullableDocumentDTO) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDocumentDTO(val *DocumentDTO) *NullableDocumentDTO {
return &NullableDocumentDTO{value: val, isSet: true}
}
func (v NullableDocumentDTO) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDocumentDTO) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}