mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.3 KiB
Go
193 lines
5.3 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 WorldPipelineReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &WorldPipelineReq{}
|
|
|
|
// WorldPipelineReq struct for WorldPipelineReq
|
|
type WorldPipelineReq struct {
|
|
// Feeds is the RSS/Atom feed URLs to read, at most 64. Each must be an http(s) URL whose host is on the server's allowlist — the SSRF guard is applied here, at the write, so a stored pipeline can never name a host the fetcher would refuse. Blank entries are dropped and duplicates collapse.
|
|
Feeds []string `json:"feeds,omitempty"`
|
|
// Filters narrows the merged feed. Terms are trimmed, de-duplicated case-insensitively, and capped at 64 per axis.
|
|
Filters *WorldFilters `json:"filters,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _WorldPipelineReq WorldPipelineReq
|
|
|
|
// NewWorldPipelineReq instantiates a new WorldPipelineReq 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 NewWorldPipelineReq() *WorldPipelineReq {
|
|
this := WorldPipelineReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewWorldPipelineReqWithDefaults instantiates a new WorldPipelineReq 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 NewWorldPipelineReqWithDefaults() *WorldPipelineReq {
|
|
this := WorldPipelineReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetFeeds returns the Feeds field value if set, zero value otherwise.
|
|
func (o *WorldPipelineReq) GetFeeds() []string {
|
|
if o == nil || IsNil(o.Feeds) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Feeds
|
|
}
|
|
|
|
// GetFeedsOk returns a tuple with the Feeds field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WorldPipelineReq) GetFeedsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Feeds) {
|
|
return nil, false
|
|
}
|
|
return o.Feeds, true
|
|
}
|
|
|
|
// HasFeeds returns a boolean if a field has been set.
|
|
func (o *WorldPipelineReq) HasFeeds() bool {
|
|
if o != nil && !IsNil(o.Feeds) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFeeds gets a reference to the given []string and assigns it to the Feeds field.
|
|
func (o *WorldPipelineReq) SetFeeds(v []string) {
|
|
o.Feeds = v
|
|
}
|
|
|
|
// GetFilters returns the Filters field value if set, zero value otherwise.
|
|
func (o *WorldPipelineReq) GetFilters() WorldFilters {
|
|
if o == nil || IsNil(o.Filters) {
|
|
var ret WorldFilters
|
|
return ret
|
|
}
|
|
return *o.Filters
|
|
}
|
|
|
|
// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WorldPipelineReq) GetFiltersOk() (*WorldFilters, bool) {
|
|
if o == nil || IsNil(o.Filters) {
|
|
return nil, false
|
|
}
|
|
return o.Filters, true
|
|
}
|
|
|
|
// HasFilters returns a boolean if a field has been set.
|
|
func (o *WorldPipelineReq) HasFilters() bool {
|
|
if o != nil && !IsNil(o.Filters) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFilters gets a reference to the given WorldFilters and assigns it to the Filters field.
|
|
func (o *WorldPipelineReq) SetFilters(v WorldFilters) {
|
|
o.Filters = &v
|
|
}
|
|
|
|
func (o WorldPipelineReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o WorldPipelineReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Feeds) {
|
|
toSerialize["feeds"] = o.Feeds
|
|
}
|
|
if !IsNil(o.Filters) {
|
|
toSerialize["filters"] = o.Filters
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *WorldPipelineReq) UnmarshalJSON(data []byte) (err error) {
|
|
varWorldPipelineReq := _WorldPipelineReq{}
|
|
|
|
err = json.Unmarshal(data, &varWorldPipelineReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = WorldPipelineReq(varWorldPipelineReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "feeds")
|
|
delete(additionalProperties, "filters")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableWorldPipelineReq struct {
|
|
value *WorldPipelineReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableWorldPipelineReq) Get() *WorldPipelineReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableWorldPipelineReq) Set(val *WorldPipelineReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableWorldPipelineReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableWorldPipelineReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableWorldPipelineReq(val *WorldPipelineReq) *NullableWorldPipelineReq {
|
|
return &NullableWorldPipelineReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableWorldPipelineReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableWorldPipelineReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|