go-monobank/model_user_info.go
2024-04-10 22:18:44 +03:00

313 lines
10 KiB
Go
Raw Permalink 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.

/*
Monobank open API
API для отримання інформації про виписки та стан особистого рахунку та рахунків ФОП. Для надання доступу потрібно пройти авторизацію у особистому кабінеті https://api.monobank.ua/ та отримати токен для персонального використання. Якщо у вас є запитання щодо роботи API, запрошуємо до ком'юніті у [Telegram-групі](https://t.me/joinchat/FiAEWhDf-QzTqM4wzEtffw). API недоступне для клієнтів до 16 років, дані за дитячими рахунками доступні з батьківського акаунту. Якщо у вас є сервіс і ви хочете централізовано приєднатися до API для надання послуг клієнтам, потрібно підключитися до [API для провайдерів послуг](/docs/corporate.html), що має більше можливостей. Якщо дані клієнтів не будуть надходити на ваші сервери або ви робите сервіс для своєї родини, використання корпоративного API необов'язкове. Розробка бібліотек або програм, які будуть використовувати клієнти особисто (дані клієнта не будуть проходити черeз вузли розробника), також не потребують використання корпоративного API. Це надасть змогу клієнтам monobank авторизуватись у вашому сервісі (наприклад, у фінансовому менеджері) для надання інформації про стан рахунку або виписки. У разі виявлення експлуатації цього API в якості корпоративного, банк залишає за собою право накласти санкції на компанію.
API version: v2303
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package monobank
import (
"encoding/json"
)
// checks if the UserInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UserInfo{}
// UserInfo Опис клієнта та його рахунків і банок.
type UserInfo struct {
// Ідентифікатор клієнта (збігається з id для send.monobank.ua)
ClientId *string `json:"clientId,omitempty"`
// Ім'я клієнта
Name *string `json:"name,omitempty"`
// URL для надсиляння подій по зміні балансу рахунку
WebHookUrl *string `json:"webHookUrl,omitempty"`
// Перелік прав, які які надає сервіс (1 літера на 1 permission).
Permissions *string `json:"permissions,omitempty"`
// Перелік доступних рахунків
Accounts []UserInfoAccountsInner `json:"accounts,omitempty"`
// Перелік банок
Jars []UserInfoJarsInner `json:"jars,omitempty"`
}
// NewUserInfo instantiates a new UserInfo 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 NewUserInfo() *UserInfo {
this := UserInfo{}
return &this
}
// NewUserInfoWithDefaults instantiates a new UserInfo 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 NewUserInfoWithDefaults() *UserInfo {
this := UserInfo{}
return &this
}
// GetClientId returns the ClientId field value if set, zero value otherwise.
func (o *UserInfo) GetClientId() string {
if o == nil || IsNil(o.ClientId) {
var ret string
return ret
}
return *o.ClientId
}
// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserInfo) GetClientIdOk() (*string, bool) {
if o == nil || IsNil(o.ClientId) {
return nil, false
}
return o.ClientId, true
}
// HasClientId returns a boolean if a field has been set.
func (o *UserInfo) HasClientId() bool {
if o != nil && !IsNil(o.ClientId) {
return true
}
return false
}
// SetClientId gets a reference to the given string and assigns it to the ClientId field.
func (o *UserInfo) SetClientId(v string) {
o.ClientId = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *UserInfo) 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 *UserInfo) 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 *UserInfo) 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 *UserInfo) SetName(v string) {
o.Name = &v
}
// GetWebHookUrl returns the WebHookUrl field value if set, zero value otherwise.
func (o *UserInfo) GetWebHookUrl() string {
if o == nil || IsNil(o.WebHookUrl) {
var ret string
return ret
}
return *o.WebHookUrl
}
// GetWebHookUrlOk returns a tuple with the WebHookUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserInfo) GetWebHookUrlOk() (*string, bool) {
if o == nil || IsNil(o.WebHookUrl) {
return nil, false
}
return o.WebHookUrl, true
}
// HasWebHookUrl returns a boolean if a field has been set.
func (o *UserInfo) HasWebHookUrl() bool {
if o != nil && !IsNil(o.WebHookUrl) {
return true
}
return false
}
// SetWebHookUrl gets a reference to the given string and assigns it to the WebHookUrl field.
func (o *UserInfo) SetWebHookUrl(v string) {
o.WebHookUrl = &v
}
// GetPermissions returns the Permissions field value if set, zero value otherwise.
func (o *UserInfo) GetPermissions() string {
if o == nil || IsNil(o.Permissions) {
var ret string
return ret
}
return *o.Permissions
}
// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserInfo) GetPermissionsOk() (*string, bool) {
if o == nil || IsNil(o.Permissions) {
return nil, false
}
return o.Permissions, true
}
// HasPermissions returns a boolean if a field has been set.
func (o *UserInfo) HasPermissions() bool {
if o != nil && !IsNil(o.Permissions) {
return true
}
return false
}
// SetPermissions gets a reference to the given string and assigns it to the Permissions field.
func (o *UserInfo) SetPermissions(v string) {
o.Permissions = &v
}
// GetAccounts returns the Accounts field value if set, zero value otherwise.
func (o *UserInfo) GetAccounts() []UserInfoAccountsInner {
if o == nil || IsNil(o.Accounts) {
var ret []UserInfoAccountsInner
return ret
}
return o.Accounts
}
// GetAccountsOk returns a tuple with the Accounts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserInfo) GetAccountsOk() ([]UserInfoAccountsInner, bool) {
if o == nil || IsNil(o.Accounts) {
return nil, false
}
return o.Accounts, true
}
// HasAccounts returns a boolean if a field has been set.
func (o *UserInfo) HasAccounts() bool {
if o != nil && !IsNil(o.Accounts) {
return true
}
return false
}
// SetAccounts gets a reference to the given []UserInfoAccountsInner and assigns it to the Accounts field.
func (o *UserInfo) SetAccounts(v []UserInfoAccountsInner) {
o.Accounts = v
}
// GetJars returns the Jars field value if set, zero value otherwise.
func (o *UserInfo) GetJars() []UserInfoJarsInner {
if o == nil || IsNil(o.Jars) {
var ret []UserInfoJarsInner
return ret
}
return o.Jars
}
// GetJarsOk returns a tuple with the Jars field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserInfo) GetJarsOk() ([]UserInfoJarsInner, bool) {
if o == nil || IsNil(o.Jars) {
return nil, false
}
return o.Jars, true
}
// HasJars returns a boolean if a field has been set.
func (o *UserInfo) HasJars() bool {
if o != nil && !IsNil(o.Jars) {
return true
}
return false
}
// SetJars gets a reference to the given []UserInfoJarsInner and assigns it to the Jars field.
func (o *UserInfo) SetJars(v []UserInfoJarsInner) {
o.Jars = v
}
func (o UserInfo) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UserInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ClientId) {
toSerialize["clientId"] = o.ClientId
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.WebHookUrl) {
toSerialize["webHookUrl"] = o.WebHookUrl
}
if !IsNil(o.Permissions) {
toSerialize["permissions"] = o.Permissions
}
if !IsNil(o.Accounts) {
toSerialize["accounts"] = o.Accounts
}
if !IsNil(o.Jars) {
toSerialize["jars"] = o.Jars
}
return toSerialize, nil
}
type NullableUserInfo struct {
value *UserInfo
isSet bool
}
func (v NullableUserInfo) Get() *UserInfo {
return v.value
}
func (v *NullableUserInfo) Set(val *UserInfo) {
v.value = val
v.isSet = true
}
func (v NullableUserInfo) IsSet() bool {
return v.isSet
}
func (v *NullableUserInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUserInfo(val *UserInfo) *NullableUserInfo {
return &NullableUserInfo{value: val, isSet: true}
}
func (v NullableUserInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUserInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}