Files
sdk/model_risk_risk_learn_out.go

155 lines
4.2 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 RiskRiskLearnOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RiskRiskLearnOut{}
// RiskRiskLearnOut struct for RiskRiskLearnOut
type RiskRiskLearnOut struct {
// Learned is how many of the events the model actually learned from, and is also what the call is metered at: one screen per event learned from. It is the batch minus the events already in this organisation's record, so a retried batch reports — and is charged — zero.
Learned *int64 `json:"learned,omitempty"`
AdditionalProperties map[string]interface{}
}
type _RiskRiskLearnOut RiskRiskLearnOut
// NewRiskRiskLearnOut instantiates a new RiskRiskLearnOut 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 NewRiskRiskLearnOut() *RiskRiskLearnOut {
this := RiskRiskLearnOut{}
return &this
}
// NewRiskRiskLearnOutWithDefaults instantiates a new RiskRiskLearnOut 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 NewRiskRiskLearnOutWithDefaults() *RiskRiskLearnOut {
this := RiskRiskLearnOut{}
return &this
}
// GetLearned returns the Learned field value if set, zero value otherwise.
func (o *RiskRiskLearnOut) GetLearned() int64 {
if o == nil || IsNil(o.Learned) {
var ret int64
return ret
}
return *o.Learned
}
// GetLearnedOk returns a tuple with the Learned field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskLearnOut) GetLearnedOk() (*int64, bool) {
if o == nil || IsNil(o.Learned) {
return nil, false
}
return o.Learned, true
}
// HasLearned returns a boolean if a field has been set.
func (o *RiskRiskLearnOut) HasLearned() bool {
if o != nil && !IsNil(o.Learned) {
return true
}
return false
}
// SetLearned gets a reference to the given int64 and assigns it to the Learned field.
func (o *RiskRiskLearnOut) SetLearned(v int64) {
o.Learned = &v
}
func (o RiskRiskLearnOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RiskRiskLearnOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Learned) {
toSerialize["learned"] = o.Learned
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RiskRiskLearnOut) UnmarshalJSON(data []byte) (err error) {
varRiskRiskLearnOut := _RiskRiskLearnOut{}
err = json.Unmarshal(data, &varRiskRiskLearnOut)
if err != nil {
return err
}
*o = RiskRiskLearnOut(varRiskRiskLearnOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "learned")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRiskRiskLearnOut struct {
value *RiskRiskLearnOut
isSet bool
}
func (v NullableRiskRiskLearnOut) Get() *RiskRiskLearnOut {
return v.value
}
func (v *NullableRiskRiskLearnOut) Set(val *RiskRiskLearnOut) {
v.value = val
v.isSet = true
}
func (v NullableRiskRiskLearnOut) IsSet() bool {
return v.isSet
}
func (v *NullableRiskRiskLearnOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRiskRiskLearnOut(val *RiskRiskLearnOut) *NullableRiskRiskLearnOut {
return &NullableRiskRiskLearnOut{value: val, isSet: true}
}
func (v NullableRiskRiskLearnOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRiskRiskLearnOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}