mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* Move all public connectors to ce/plugins * Update tooling to account for new go modules under ce * Ensure we test all CE plugins in CI * Move Dummypay to ce/plugins for simplicity's sake in the generation scripts * Use versioned pkg/domain in plugins * Ensure that renovate updates all CE plugins in a single PR when pkg/domain tags are pushed to github * Ensure Justfile commands work over all CE plugins * Copy ce plugin go.mods in dev.Dockerfile * Only add a go.mod for new plugins if they are ce * Ensure generated generic client structs are named correctly for submodule * Add coverprofile for each ce plugin * Add set -e for Justfile for loops over plugins * Infer go version from flake.nix in connector template tool
210 lines
4.8 KiB
Go
210 lines
4.8 KiB
Go
/*
|
|
GENERIC connector API
|
|
|
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
|
|
API version: v0.1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package genericclient
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
// checks if the Account type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Account{}
|
|
|
|
// Account struct for Account
|
|
type Account struct {
|
|
Id string `json:"id"`
|
|
AccountName string `json:"accountName"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Metadata map[string]string `json:"metadata,omitempty"`
|
|
}
|
|
|
|
// NewAccount instantiates a new Account 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 NewAccount(id string, accountName string, createdAt time.Time) *Account {
|
|
this := Account{}
|
|
this.Id = id
|
|
this.AccountName = accountName
|
|
this.CreatedAt = createdAt
|
|
return &this
|
|
}
|
|
|
|
// NewAccountWithDefaults instantiates a new Account 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 NewAccountWithDefaults() *Account {
|
|
this := Account{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *Account) GetId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Account) GetIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Id, true
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *Account) SetId(v string) {
|
|
o.Id = v
|
|
}
|
|
|
|
// GetAccountName returns the AccountName field value
|
|
func (o *Account) GetAccountName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.AccountName
|
|
}
|
|
|
|
// GetAccountNameOk returns a tuple with the AccountName field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Account) GetAccountNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.AccountName, true
|
|
}
|
|
|
|
// SetAccountName sets field value
|
|
func (o *Account) SetAccountName(v string) {
|
|
o.AccountName = v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value
|
|
func (o *Account) GetCreatedAt() time.Time {
|
|
if o == nil {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
|
|
return o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Account) GetCreatedAtOk() (*time.Time, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.CreatedAt, true
|
|
}
|
|
|
|
// SetCreatedAt sets field value
|
|
func (o *Account) SetCreatedAt(v time.Time) {
|
|
o.CreatedAt = v
|
|
}
|
|
|
|
// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *Account) GetMetadata() map[string]string {
|
|
if o == nil {
|
|
var ret map[string]string
|
|
return ret
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *Account) GetMetadataOk() (*map[string]string, bool) {
|
|
if o == nil || IsNil(o.Metadata) {
|
|
return nil, false
|
|
}
|
|
return &o.Metadata, true
|
|
}
|
|
|
|
// HasMetadata returns a boolean if a field has been set.
|
|
func (o *Account) HasMetadata() bool {
|
|
if o != nil && IsNil(o.Metadata) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field.
|
|
func (o *Account) SetMetadata(v map[string]string) {
|
|
o.Metadata = v
|
|
}
|
|
|
|
func (o Account) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Account) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["id"] = o.Id
|
|
toSerialize["accountName"] = o.AccountName
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
if o.Metadata != nil {
|
|
toSerialize["metadata"] = o.Metadata
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableAccount struct {
|
|
value *Account
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAccount) Get() *Account {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAccount) Set(val *Account) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAccount) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAccount) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAccount(val *Account) *NullableAccount {
|
|
return &NullableAccount{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAccount) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAccount) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|