/* Hindsight HTTP API HTTP API for Hindsight API version: 0.4.11 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package hindsight import ( "encoding/json" "bytes" "fmt" ) // checks if the FileRetainResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &FileRetainResponse{} // FileRetainResponse Response model for file upload endpoint. type FileRetainResponse struct { // Operation IDs for tracking file conversion operations. Use GET /v1/default/banks/{bank_id}/operations to list operations. OperationIds []string `json:"operation_ids"` } type _FileRetainResponse FileRetainResponse // NewFileRetainResponse instantiates a new FileRetainResponse 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 NewFileRetainResponse(operationIds []string) *FileRetainResponse { this := FileRetainResponse{} this.OperationIds = operationIds return &this } // NewFileRetainResponseWithDefaults instantiates a new FileRetainResponse 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 NewFileRetainResponseWithDefaults() *FileRetainResponse { this := FileRetainResponse{} return &this } // GetOperationIds returns the OperationIds field value func (o *FileRetainResponse) GetOperationIds() []string { if o == nil { var ret []string return ret } return o.OperationIds } // GetOperationIdsOk returns a tuple with the OperationIds field value // and a boolean to check if the value has been set. func (o *FileRetainResponse) GetOperationIdsOk() ([]string, bool) { if o == nil { return nil, false } return o.OperationIds, true } // SetOperationIds sets field value func (o *FileRetainResponse) SetOperationIds(v []string) { o.OperationIds = v } func (o FileRetainResponse) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o FileRetainResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["operation_ids"] = o.OperationIds return toSerialize, nil } func (o *FileRetainResponse) UnmarshalJSON(data []byte) (err error) { // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ "operation_ids", } allProperties := make(map[string]interface{}) err = json.Unmarshal(data, &allProperties) if err != nil { return err; } for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } } varFileRetainResponse := _FileRetainResponse{} decoder := json.NewDecoder(bytes.NewReader(data)) decoder.DisallowUnknownFields() err = decoder.Decode(&varFileRetainResponse) if err != nil { return err } *o = FileRetainResponse(varFileRetainResponse) return err } type NullableFileRetainResponse struct { value *FileRetainResponse isSet bool } func (v NullableFileRetainResponse) Get() *FileRetainResponse { return v.value } func (v *NullableFileRetainResponse) Set(val *FileRetainResponse) { v.value = val v.isSet = true } func (v NullableFileRetainResponse) IsSet() bool { return v.isSet } func (v *NullableFileRetainResponse) Unset() { v.value = nil v.isSet = false } func NewNullableFileRetainResponse(val *FileRetainResponse) *NullableFileRetainResponse { return &NullableFileRetainResponse{value: val, isSet: true} } func (v NullableFileRetainResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFileRetainResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }