/*
 * peridot/proto/v1/batch.proto
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: version not set
 */

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package peridotopenapi

import (
	"encoding/json"
)

// StreamResultOfApiHttpBody struct for StreamResultOfApiHttpBody
type StreamResultOfApiHttpBody struct {
	Result *ApiHttpBody `json:"result,omitempty"`
	Error *RpcStatus `json:"error,omitempty"`
}

// NewStreamResultOfApiHttpBody instantiates a new StreamResultOfApiHttpBody 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 NewStreamResultOfApiHttpBody() *StreamResultOfApiHttpBody {
	this := StreamResultOfApiHttpBody{}
	return &this
}

// NewStreamResultOfApiHttpBodyWithDefaults instantiates a new StreamResultOfApiHttpBody 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 NewStreamResultOfApiHttpBodyWithDefaults() *StreamResultOfApiHttpBody {
	this := StreamResultOfApiHttpBody{}
	return &this
}

// GetResult returns the Result field value if set, zero value otherwise.
func (o *StreamResultOfApiHttpBody) GetResult() ApiHttpBody {
	if o == nil || o.Result == nil {
		var ret ApiHttpBody
		return ret
	}
	return *o.Result
}

// GetResultOk returns a tuple with the Result field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamResultOfApiHttpBody) GetResultOk() (*ApiHttpBody, bool) {
	if o == nil || o.Result == nil {
		return nil, false
	}
	return o.Result, true
}

// HasResult returns a boolean if a field has been set.
func (o *StreamResultOfApiHttpBody) HasResult() bool {
	if o != nil && o.Result != nil {
		return true
	}

	return false
}

// SetResult gets a reference to the given ApiHttpBody and assigns it to the Result field.
func (o *StreamResultOfApiHttpBody) SetResult(v ApiHttpBody) {
	o.Result = &v
}

// GetError returns the Error field value if set, zero value otherwise.
func (o *StreamResultOfApiHttpBody) GetError() RpcStatus {
	if o == nil || o.Error == nil {
		var ret RpcStatus
		return ret
	}
	return *o.Error
}

// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamResultOfApiHttpBody) GetErrorOk() (*RpcStatus, bool) {
	if o == nil || o.Error == nil {
		return nil, false
	}
	return o.Error, true
}

// HasError returns a boolean if a field has been set.
func (o *StreamResultOfApiHttpBody) HasError() bool {
	if o != nil && o.Error != nil {
		return true
	}

	return false
}

// SetError gets a reference to the given RpcStatus and assigns it to the Error field.
func (o *StreamResultOfApiHttpBody) SetError(v RpcStatus) {
	o.Error = &v
}

func (o StreamResultOfApiHttpBody) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Result != nil {
		toSerialize["result"] = o.Result
	}
	if o.Error != nil {
		toSerialize["error"] = o.Error
	}
	return json.Marshal(toSerialize)
}

type NullableStreamResultOfApiHttpBody struct {
	value *StreamResultOfApiHttpBody
	isSet bool
}

func (v NullableStreamResultOfApiHttpBody) Get() *StreamResultOfApiHttpBody {
	return v.value
}

func (v *NullableStreamResultOfApiHttpBody) Set(val *StreamResultOfApiHttpBody) {
	v.value = val
	v.isSet = true
}

func (v NullableStreamResultOfApiHttpBody) IsSet() bool {
	return v.isSet
}

func (v *NullableStreamResultOfApiHttpBody) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableStreamResultOfApiHttpBody(val *StreamResultOfApiHttpBody) *NullableStreamResultOfApiHttpBody {
	return &NullableStreamResultOfApiHttpBody{value: val, isSet: true}
}

func (v NullableStreamResultOfApiHttpBody) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableStreamResultOfApiHttpBody) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


