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

193 lines
4.8 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 BusinessDTO type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BusinessDTO{}
// BusinessDTO Информация о кабинете.
type BusinessDTO struct {
// Идентификатор кабинета.
Id *int64 `json:"id,omitempty"`
// Название бизнеса.
Name *string `json:"name,omitempty"`
AdditionalProperties map[string]interface{}
}
type _BusinessDTO BusinessDTO
// NewBusinessDTO instantiates a new BusinessDTO 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 NewBusinessDTO() *BusinessDTO {
this := BusinessDTO{}
return &this
}
// NewBusinessDTOWithDefaults instantiates a new BusinessDTO 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 NewBusinessDTOWithDefaults() *BusinessDTO {
this := BusinessDTO{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *BusinessDTO) GetId() int64 {
if o == nil || IsNil(o.Id) {
var ret int64
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BusinessDTO) GetIdOk() (*int64, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *BusinessDTO) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given int64 and assigns it to the Id field.
func (o *BusinessDTO) SetId(v int64) {
o.Id = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *BusinessDTO) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BusinessDTO) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *BusinessDTO) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *BusinessDTO) SetName(v string) {
o.Name = &v
}
func (o BusinessDTO) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BusinessDTO) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *BusinessDTO) UnmarshalJSON(data []byte) (err error) {
varBusinessDTO := _BusinessDTO{}
err = json.Unmarshal(data, &varBusinessDTO)
if err != nil {
return err
}
*o = BusinessDTO(varBusinessDTO)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "name")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableBusinessDTO struct {
value *BusinessDTO
isSet bool
}
func (v NullableBusinessDTO) Get() *BusinessDTO {
return v.value
}
func (v *NullableBusinessDTO) Set(val *BusinessDTO) {
v.value = val
v.isSet = true
}
func (v NullableBusinessDTO) IsSet() bool {
return v.isSet
}
func (v *NullableBusinessDTO) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBusinessDTO(val *BusinessDTO) *NullableBusinessDTO {
return &NullableBusinessDTO{value: val, isSet: true}
}
func (v NullableBusinessDTO) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBusinessDTO) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}