/*
 * 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"
)

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

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

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

// GetResult returns the Result field value if set, zero value otherwise.
func (o *StreamResultOfV1SearchResponse) GetResult() V1SearchResponse {
	if o == nil || o.Result == nil {
		var ret V1SearchResponse
		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 *StreamResultOfV1SearchResponse) GetResultOk() (*V1SearchResponse, 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 *StreamResultOfV1SearchResponse) HasResult() bool {
	if o != nil && o.Result != nil {
		return true
	}

	return false
}

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

// GetError returns the Error field value if set, zero value otherwise.
func (o *StreamResultOfV1SearchResponse) 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 *StreamResultOfV1SearchResponse) 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 *StreamResultOfV1SearchResponse) 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 *StreamResultOfV1SearchResponse) SetError(v RpcStatus) {
	o.Error = &v
}

func (o StreamResultOfV1SearchResponse) 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 NullableStreamResultOfV1SearchResponse struct {
	value *StreamResultOfV1SearchResponse
	isSet bool
}

func (v NullableStreamResultOfV1SearchResponse) Get() *StreamResultOfV1SearchResponse {
	return v.value
}

func (v *NullableStreamResultOfV1SearchResponse) Set(val *StreamResultOfV1SearchResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableStreamResultOfV1SearchResponse(val *StreamResultOfV1SearchResponse) *NullableStreamResultOfV1SearchResponse {
	return &NullableStreamResultOfV1SearchResponse{value: val, isSet: true}
}

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

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


