mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
497 lines
13 KiB
Go
497 lines
13 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the MarketplacePatchReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &MarketplacePatchReq{}
|
|
|
|
// MarketplacePatchReq struct for MarketplacePatchReq
|
|
type MarketplacePatchReq struct {
|
|
// Category groups the listing in the shop window.
|
|
Category *string `json:"category,omitempty"`
|
|
// Currency denominates Price.
|
|
Currency *string `json:"currency,omitempty"`
|
|
// Description is the long copy, at most 4096 characters.
|
|
Description *string `json:"description,omitempty"`
|
|
// Docs is where the listing's documentation lives; empty clears it.
|
|
Docs *string `json:"docs,omitempty"`
|
|
// Expert replaces an expert listing's whole profile — rate, areas, languages, time zone and weekly hours; absent keeps it. Refused on any other kind.
|
|
Expert *MarketplaceExpertIn `json:"expert,omitempty"`
|
|
// ID is the listing to edit, from the path.
|
|
Id *string `json:"id,omitempty"`
|
|
// Price is the decimal USD price, exact to 18 places; \"0\" makes it free.
|
|
Price *string `json:"price,omitempty"`
|
|
// Public makes the listing discoverable by other orgs, or withdraws it.
|
|
Public *bool `json:"public,omitempty"`
|
|
// Recipient is the payout wallet id, in the publishing org.
|
|
Recipient *string `json:"recipient,omitempty"`
|
|
// Title is the shop-window name, 1-200 characters.
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _MarketplacePatchReq MarketplacePatchReq
|
|
|
|
// NewMarketplacePatchReq instantiates a new MarketplacePatchReq 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 NewMarketplacePatchReq() *MarketplacePatchReq {
|
|
this := MarketplacePatchReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewMarketplacePatchReqWithDefaults instantiates a new MarketplacePatchReq 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 NewMarketplacePatchReqWithDefaults() *MarketplacePatchReq {
|
|
this := MarketplacePatchReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetCategory returns the Category field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetCategory() string {
|
|
if o == nil || IsNil(o.Category) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Category
|
|
}
|
|
|
|
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetCategoryOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Category) {
|
|
return nil, false
|
|
}
|
|
return o.Category, true
|
|
}
|
|
|
|
// HasCategory returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasCategory() bool {
|
|
if o != nil && !IsNil(o.Category) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCategory gets a reference to the given string and assigns it to the Category field.
|
|
func (o *MarketplacePatchReq) SetCategory(v string) {
|
|
o.Category = &v
|
|
}
|
|
|
|
// GetCurrency returns the Currency field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetCurrency() string {
|
|
if o == nil || IsNil(o.Currency) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Currency
|
|
}
|
|
|
|
// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetCurrencyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Currency) {
|
|
return nil, false
|
|
}
|
|
return o.Currency, true
|
|
}
|
|
|
|
// HasCurrency returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasCurrency() bool {
|
|
if o != nil && !IsNil(o.Currency) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCurrency gets a reference to the given string and assigns it to the Currency field.
|
|
func (o *MarketplacePatchReq) SetCurrency(v string) {
|
|
o.Currency = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *MarketplacePatchReq) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetDocs returns the Docs field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetDocs() string {
|
|
if o == nil || IsNil(o.Docs) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Docs
|
|
}
|
|
|
|
// GetDocsOk returns a tuple with the Docs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetDocsOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Docs) {
|
|
return nil, false
|
|
}
|
|
return o.Docs, true
|
|
}
|
|
|
|
// HasDocs returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasDocs() bool {
|
|
if o != nil && !IsNil(o.Docs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocs gets a reference to the given string and assigns it to the Docs field.
|
|
func (o *MarketplacePatchReq) SetDocs(v string) {
|
|
o.Docs = &v
|
|
}
|
|
|
|
// GetExpert returns the Expert field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetExpert() MarketplaceExpertIn {
|
|
if o == nil || IsNil(o.Expert) {
|
|
var ret MarketplaceExpertIn
|
|
return ret
|
|
}
|
|
return *o.Expert
|
|
}
|
|
|
|
// GetExpertOk returns a tuple with the Expert field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetExpertOk() (*MarketplaceExpertIn, bool) {
|
|
if o == nil || IsNil(o.Expert) {
|
|
return nil, false
|
|
}
|
|
return o.Expert, true
|
|
}
|
|
|
|
// HasExpert returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasExpert() bool {
|
|
if o != nil && !IsNil(o.Expert) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExpert gets a reference to the given MarketplaceExpertIn and assigns it to the Expert field.
|
|
func (o *MarketplacePatchReq) SetExpert(v MarketplaceExpertIn) {
|
|
o.Expert = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
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 *MarketplacePatchReq) GetIdOk() (*string, 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 *MarketplacePatchReq) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *MarketplacePatchReq) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetPrice returns the Price field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetPrice() string {
|
|
if o == nil || IsNil(o.Price) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Price
|
|
}
|
|
|
|
// GetPriceOk returns a tuple with the Price field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetPriceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Price) {
|
|
return nil, false
|
|
}
|
|
return o.Price, true
|
|
}
|
|
|
|
// HasPrice returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasPrice() bool {
|
|
if o != nil && !IsNil(o.Price) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrice gets a reference to the given string and assigns it to the Price field.
|
|
func (o *MarketplacePatchReq) SetPrice(v string) {
|
|
o.Price = &v
|
|
}
|
|
|
|
// GetPublic returns the Public field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetPublic() bool {
|
|
if o == nil || IsNil(o.Public) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Public
|
|
}
|
|
|
|
// GetPublicOk returns a tuple with the Public field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetPublicOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Public) {
|
|
return nil, false
|
|
}
|
|
return o.Public, true
|
|
}
|
|
|
|
// HasPublic returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasPublic() bool {
|
|
if o != nil && !IsNil(o.Public) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPublic gets a reference to the given bool and assigns it to the Public field.
|
|
func (o *MarketplacePatchReq) SetPublic(v bool) {
|
|
o.Public = &v
|
|
}
|
|
|
|
// GetRecipient returns the Recipient field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetRecipient() string {
|
|
if o == nil || IsNil(o.Recipient) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Recipient
|
|
}
|
|
|
|
// GetRecipientOk returns a tuple with the Recipient field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetRecipientOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Recipient) {
|
|
return nil, false
|
|
}
|
|
return o.Recipient, true
|
|
}
|
|
|
|
// HasRecipient returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasRecipient() bool {
|
|
if o != nil && !IsNil(o.Recipient) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecipient gets a reference to the given string and assigns it to the Recipient field.
|
|
func (o *MarketplacePatchReq) SetRecipient(v string) {
|
|
o.Recipient = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *MarketplacePatchReq) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketplacePatchReq) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *MarketplacePatchReq) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *MarketplacePatchReq) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o MarketplacePatchReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o MarketplacePatchReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Category) {
|
|
toSerialize["category"] = o.Category
|
|
}
|
|
if !IsNil(o.Currency) {
|
|
toSerialize["currency"] = o.Currency
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Docs) {
|
|
toSerialize["docs"] = o.Docs
|
|
}
|
|
if !IsNil(o.Expert) {
|
|
toSerialize["expert"] = o.Expert
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Price) {
|
|
toSerialize["price"] = o.Price
|
|
}
|
|
if !IsNil(o.Public) {
|
|
toSerialize["public"] = o.Public
|
|
}
|
|
if !IsNil(o.Recipient) {
|
|
toSerialize["recipient"] = o.Recipient
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *MarketplacePatchReq) UnmarshalJSON(data []byte) (err error) {
|
|
varMarketplacePatchReq := _MarketplacePatchReq{}
|
|
|
|
err = json.Unmarshal(data, &varMarketplacePatchReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = MarketplacePatchReq(varMarketplacePatchReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "category")
|
|
delete(additionalProperties, "currency")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "docs")
|
|
delete(additionalProperties, "expert")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "price")
|
|
delete(additionalProperties, "public")
|
|
delete(additionalProperties, "recipient")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableMarketplacePatchReq struct {
|
|
value *MarketplacePatchReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMarketplacePatchReq) Get() *MarketplacePatchReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMarketplacePatchReq) Set(val *MarketplacePatchReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMarketplacePatchReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMarketplacePatchReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMarketplacePatchReq(val *MarketplacePatchReq) *NullableMarketplacePatchReq {
|
|
return &NullableMarketplacePatchReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMarketplacePatchReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMarketplacePatchReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|