github.com/khulnasoft/codebase@v0.0.0-20231214144635-a707781cbb24/go-bitbucket/model_error_error.go (about) 1 /* 2 * Bitbucket API 3 * 4 * Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework. 5 * 6 * API version: 2.0 7 * Contact: support@bitbucket.org 8 */ 9 10 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 12 package bitbucket 13 14 import ( 15 "encoding/json" 16 ) 17 18 // ErrorError struct for ErrorError 19 type ErrorError struct { 20 Message string `json:"message"` 21 Detail *string `json:"detail,omitempty"` 22 // Optional structured data that is endpoint-specific. 23 Data *map[string]interface{} `json:"data,omitempty"` 24 } 25 26 // NewErrorError instantiates a new ErrorError object 27 // This constructor will assign default values to properties that have it defined, 28 // and makes sure properties required by API are set, but the set of arguments 29 // will change when the set of required properties is changed 30 func NewErrorError(message string) *ErrorError { 31 this := ErrorError{} 32 this.Message = message 33 return &this 34 } 35 36 // NewErrorErrorWithDefaults instantiates a new ErrorError object 37 // This constructor will only assign default values to properties that have it defined, 38 // but it doesn't guarantee that properties required by API are set 39 func NewErrorErrorWithDefaults() *ErrorError { 40 this := ErrorError{} 41 return &this 42 } 43 44 // GetMessage returns the Message field value 45 func (o *ErrorError) GetMessage() string { 46 if o == nil { 47 var ret string 48 return ret 49 } 50 51 return o.Message 52 } 53 54 // GetMessageOk returns a tuple with the Message field value 55 // and a boolean to check if the value has been set. 56 func (o *ErrorError) GetMessageOk() (*string, bool) { 57 if o == nil { 58 return nil, false 59 } 60 return &o.Message, true 61 } 62 63 // SetMessage sets field value 64 func (o *ErrorError) SetMessage(v string) { 65 o.Message = v 66 } 67 68 // GetDetail returns the Detail field value if set, zero value otherwise. 69 func (o *ErrorError) GetDetail() string { 70 if o == nil || o.Detail == nil { 71 var ret string 72 return ret 73 } 74 return *o.Detail 75 } 76 77 // GetDetailOk returns a tuple with the Detail field value if set, nil otherwise 78 // and a boolean to check if the value has been set. 79 func (o *ErrorError) GetDetailOk() (*string, bool) { 80 if o == nil || o.Detail == nil { 81 return nil, false 82 } 83 return o.Detail, true 84 } 85 86 // HasDetail returns a boolean if a field has been set. 87 func (o *ErrorError) HasDetail() bool { 88 if o != nil && o.Detail != nil { 89 return true 90 } 91 92 return false 93 } 94 95 // SetDetail gets a reference to the given string and assigns it to the Detail field. 96 func (o *ErrorError) SetDetail(v string) { 97 o.Detail = &v 98 } 99 100 // GetData returns the Data field value if set, zero value otherwise. 101 func (o *ErrorError) GetData() map[string]interface{} { 102 if o == nil || o.Data == nil { 103 var ret map[string]interface{} 104 return ret 105 } 106 return *o.Data 107 } 108 109 // GetDataOk returns a tuple with the Data field value if set, nil otherwise 110 // and a boolean to check if the value has been set. 111 func (o *ErrorError) GetDataOk() (*map[string]interface{}, bool) { 112 if o == nil || o.Data == nil { 113 return nil, false 114 } 115 return o.Data, true 116 } 117 118 // HasData returns a boolean if a field has been set. 119 func (o *ErrorError) HasData() bool { 120 if o != nil && o.Data != nil { 121 return true 122 } 123 124 return false 125 } 126 127 // SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. 128 func (o *ErrorError) SetData(v map[string]interface{}) { 129 o.Data = &v 130 } 131 132 func (o ErrorError) MarshalJSON() ([]byte, error) { 133 toSerialize := map[string]interface{}{} 134 if true { 135 toSerialize["message"] = o.Message 136 } 137 if o.Detail != nil { 138 toSerialize["detail"] = o.Detail 139 } 140 if o.Data != nil { 141 toSerialize["data"] = o.Data 142 } 143 return json.Marshal(toSerialize) 144 } 145 146 type NullableErrorError struct { 147 value *ErrorError 148 isSet bool 149 } 150 151 func (v NullableErrorError) Get() *ErrorError { 152 return v.value 153 } 154 155 func (v *NullableErrorError) Set(val *ErrorError) { 156 v.value = val 157 v.isSet = true 158 } 159 160 func (v NullableErrorError) IsSet() bool { 161 return v.isSet 162 } 163 164 func (v *NullableErrorError) Unset() { 165 v.value = nil 166 v.isSet = false 167 } 168 169 func NewNullableErrorError(val *ErrorError) *NullableErrorError { 170 return &NullableErrorError{value: val, isSet: true} 171 } 172 173 func (v NullableErrorError) MarshalJSON() ([]byte, error) { 174 return json.Marshal(v.value) 175 } 176 177 func (v *NullableErrorError) UnmarshalJSON(src []byte) error { 178 v.isSet = true 179 return json.Unmarshal(src, &v.value) 180 }