mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
308 lines
7.9 KiB
Go
308 lines
7.9 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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the RewardCheck type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RewardCheck{}
|
|
|
|
// RewardCheck struct for RewardCheck
|
|
type RewardCheck struct {
|
|
// AuthorMatch is whether the author is the member's linked identity: yes, no or unknown.
|
|
AuthorMatch *string `json:"author_match,omitempty"`
|
|
// FetchedAt is when the source was fetched.
|
|
FetchedAt *time.Time `json:"fetched_at,omitempty"`
|
|
// Public is whether the source is readable by anyone.
|
|
Public *bool `json:"public,omitempty"`
|
|
// RefFound is whether the member's own ref code was found. It is stated only where a ref code is expected, which is a post.
|
|
RefFound *bool `json:"ref_found,omitempty"`
|
|
// Status is the HTTP status the fetch answered.
|
|
Status *int64 `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RewardCheck RewardCheck
|
|
|
|
// NewRewardCheck instantiates a new RewardCheck 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 NewRewardCheck() *RewardCheck {
|
|
this := RewardCheck{}
|
|
return &this
|
|
}
|
|
|
|
// NewRewardCheckWithDefaults instantiates a new RewardCheck 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 NewRewardCheckWithDefaults() *RewardCheck {
|
|
this := RewardCheck{}
|
|
return &this
|
|
}
|
|
|
|
// GetAuthorMatch returns the AuthorMatch field value if set, zero value otherwise.
|
|
func (o *RewardCheck) GetAuthorMatch() string {
|
|
if o == nil || IsNil(o.AuthorMatch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AuthorMatch
|
|
}
|
|
|
|
// GetAuthorMatchOk returns a tuple with the AuthorMatch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RewardCheck) GetAuthorMatchOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AuthorMatch) {
|
|
return nil, false
|
|
}
|
|
return o.AuthorMatch, true
|
|
}
|
|
|
|
// HasAuthorMatch returns a boolean if a field has been set.
|
|
func (o *RewardCheck) HasAuthorMatch() bool {
|
|
if o != nil && !IsNil(o.AuthorMatch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAuthorMatch gets a reference to the given string and assigns it to the AuthorMatch field.
|
|
func (o *RewardCheck) SetAuthorMatch(v string) {
|
|
o.AuthorMatch = &v
|
|
}
|
|
|
|
// GetFetchedAt returns the FetchedAt field value if set, zero value otherwise.
|
|
func (o *RewardCheck) GetFetchedAt() time.Time {
|
|
if o == nil || IsNil(o.FetchedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.FetchedAt
|
|
}
|
|
|
|
// GetFetchedAtOk returns a tuple with the FetchedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RewardCheck) GetFetchedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.FetchedAt) {
|
|
return nil, false
|
|
}
|
|
return o.FetchedAt, true
|
|
}
|
|
|
|
// HasFetchedAt returns a boolean if a field has been set.
|
|
func (o *RewardCheck) HasFetchedAt() bool {
|
|
if o != nil && !IsNil(o.FetchedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFetchedAt gets a reference to the given time.Time and assigns it to the FetchedAt field.
|
|
func (o *RewardCheck) SetFetchedAt(v time.Time) {
|
|
o.FetchedAt = &v
|
|
}
|
|
|
|
// GetPublic returns the Public field value if set, zero value otherwise.
|
|
func (o *RewardCheck) 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 *RewardCheck) 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 *RewardCheck) 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 *RewardCheck) SetPublic(v bool) {
|
|
o.Public = &v
|
|
}
|
|
|
|
// GetRefFound returns the RefFound field value if set, zero value otherwise.
|
|
func (o *RewardCheck) GetRefFound() bool {
|
|
if o == nil || IsNil(o.RefFound) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.RefFound
|
|
}
|
|
|
|
// GetRefFoundOk returns a tuple with the RefFound field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RewardCheck) GetRefFoundOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.RefFound) {
|
|
return nil, false
|
|
}
|
|
return o.RefFound, true
|
|
}
|
|
|
|
// HasRefFound returns a boolean if a field has been set.
|
|
func (o *RewardCheck) HasRefFound() bool {
|
|
if o != nil && !IsNil(o.RefFound) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefFound gets a reference to the given bool and assigns it to the RefFound field.
|
|
func (o *RewardCheck) SetRefFound(v bool) {
|
|
o.RefFound = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *RewardCheck) GetStatus() int64 {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret int64
|
|
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 *RewardCheck) GetStatusOk() (*int64, 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 *RewardCheck) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given int64 and assigns it to the Status field.
|
|
func (o *RewardCheck) SetStatus(v int64) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o RewardCheck) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RewardCheck) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AuthorMatch) {
|
|
toSerialize["author_match"] = o.AuthorMatch
|
|
}
|
|
if !IsNil(o.FetchedAt) {
|
|
toSerialize["fetched_at"] = o.FetchedAt
|
|
}
|
|
if !IsNil(o.Public) {
|
|
toSerialize["public"] = o.Public
|
|
}
|
|
if !IsNil(o.RefFound) {
|
|
toSerialize["ref_found"] = o.RefFound
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RewardCheck) UnmarshalJSON(data []byte) (err error) {
|
|
varRewardCheck := _RewardCheck{}
|
|
|
|
err = json.Unmarshal(data, &varRewardCheck)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RewardCheck(varRewardCheck)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "author_match")
|
|
delete(additionalProperties, "fetched_at")
|
|
delete(additionalProperties, "public")
|
|
delete(additionalProperties, "ref_found")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRewardCheck struct {
|
|
value *RewardCheck
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRewardCheck) Get() *RewardCheck {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRewardCheck) Set(val *RewardCheck) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRewardCheck) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRewardCheck) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRewardCheck(val *RewardCheck) *NullableRewardCheck {
|
|
return &NullableRewardCheck{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRewardCheck) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRewardCheck) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|