github.com/khulnasoft/codebase@v0.0.0-20231214144635-a707781cbb24/go-bitbucket/model_report_annotation_all_of.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 "time" 17 ) 18 19 // ReportAnnotationAllOf A report for a commit. 20 type ReportAnnotationAllOf struct { 21 // ID of the annotation provided by the annotation creator. It can be used to identify the annotation as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the annotation creator for updating or deleting this specific annotation. Needs to be unique. 22 ExternalId *string `json:"external_id,omitempty"` 23 // The UUID that can be used to identify the annotation. 24 Uuid *string `json:"uuid,omitempty"` 25 // The type of the report. 26 AnnotationType *string `json:"annotation_type,omitempty"` 27 // The path of the file on which this annotation should be placed. This is the path of the file relative to the git repository. If no path is provided, then it will appear in the overview modal on all pull requests where the tip of the branch is the given commit, regardless of which files were modified. 28 Path *string `json:"path,omitempty"` 29 // The line number that the annotation should belong to. If no line number is provided, then it will default to 0 and in a pull request it will appear at the top of the file specified by the path field. 30 Line *int32 `json:"line,omitempty"` 31 // The message to display to users. 32 Summary *string `json:"summary,omitempty"` 33 // The details to show to users when clicking on the annotation. 34 Details *string `json:"details,omitempty"` 35 // The state of the report. May be set to PENDING and later updated. 36 Result *string `json:"result,omitempty"` 37 // The severity of the annotation. 38 Severity *string `json:"severity,omitempty"` 39 // A URL linking to the annotation in an external tool. 40 Link *string `json:"link,omitempty"` 41 // The timestamp when the report was created. 42 CreatedOn *time.Time `json:"created_on,omitempty"` 43 // The timestamp when the report was updated. 44 UpdatedOn *time.Time `json:"updated_on,omitempty"` 45 } 46 47 // NewReportAnnotationAllOf instantiates a new ReportAnnotationAllOf object 48 // This constructor will assign default values to properties that have it defined, 49 // and makes sure properties required by API are set, but the set of arguments 50 // will change when the set of required properties is changed 51 func NewReportAnnotationAllOf() *ReportAnnotationAllOf { 52 this := ReportAnnotationAllOf{} 53 return &this 54 } 55 56 // NewReportAnnotationAllOfWithDefaults instantiates a new ReportAnnotationAllOf object 57 // This constructor will only assign default values to properties that have it defined, 58 // but it doesn't guarantee that properties required by API are set 59 func NewReportAnnotationAllOfWithDefaults() *ReportAnnotationAllOf { 60 this := ReportAnnotationAllOf{} 61 return &this 62 } 63 64 // GetExternalId returns the ExternalId field value if set, zero value otherwise. 65 func (o *ReportAnnotationAllOf) GetExternalId() string { 66 if o == nil || o.ExternalId == nil { 67 var ret string 68 return ret 69 } 70 return *o.ExternalId 71 } 72 73 // GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise 74 // and a boolean to check if the value has been set. 75 func (o *ReportAnnotationAllOf) GetExternalIdOk() (*string, bool) { 76 if o == nil || o.ExternalId == nil { 77 return nil, false 78 } 79 return o.ExternalId, true 80 } 81 82 // HasExternalId returns a boolean if a field has been set. 83 func (o *ReportAnnotationAllOf) HasExternalId() bool { 84 if o != nil && o.ExternalId != nil { 85 return true 86 } 87 88 return false 89 } 90 91 // SetExternalId gets a reference to the given string and assigns it to the ExternalId field. 92 func (o *ReportAnnotationAllOf) SetExternalId(v string) { 93 o.ExternalId = &v 94 } 95 96 // GetUuid returns the Uuid field value if set, zero value otherwise. 97 func (o *ReportAnnotationAllOf) GetUuid() string { 98 if o == nil || o.Uuid == nil { 99 var ret string 100 return ret 101 } 102 return *o.Uuid 103 } 104 105 // GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise 106 // and a boolean to check if the value has been set. 107 func (o *ReportAnnotationAllOf) GetUuidOk() (*string, bool) { 108 if o == nil || o.Uuid == nil { 109 return nil, false 110 } 111 return o.Uuid, true 112 } 113 114 // HasUuid returns a boolean if a field has been set. 115 func (o *ReportAnnotationAllOf) HasUuid() bool { 116 if o != nil && o.Uuid != nil { 117 return true 118 } 119 120 return false 121 } 122 123 // SetUuid gets a reference to the given string and assigns it to the Uuid field. 124 func (o *ReportAnnotationAllOf) SetUuid(v string) { 125 o.Uuid = &v 126 } 127 128 // GetAnnotationType returns the AnnotationType field value if set, zero value otherwise. 129 func (o *ReportAnnotationAllOf) GetAnnotationType() string { 130 if o == nil || o.AnnotationType == nil { 131 var ret string 132 return ret 133 } 134 return *o.AnnotationType 135 } 136 137 // GetAnnotationTypeOk returns a tuple with the AnnotationType field value if set, nil otherwise 138 // and a boolean to check if the value has been set. 139 func (o *ReportAnnotationAllOf) GetAnnotationTypeOk() (*string, bool) { 140 if o == nil || o.AnnotationType == nil { 141 return nil, false 142 } 143 return o.AnnotationType, true 144 } 145 146 // HasAnnotationType returns a boolean if a field has been set. 147 func (o *ReportAnnotationAllOf) HasAnnotationType() bool { 148 if o != nil && o.AnnotationType != nil { 149 return true 150 } 151 152 return false 153 } 154 155 // SetAnnotationType gets a reference to the given string and assigns it to the AnnotationType field. 156 func (o *ReportAnnotationAllOf) SetAnnotationType(v string) { 157 o.AnnotationType = &v 158 } 159 160 // GetPath returns the Path field value if set, zero value otherwise. 161 func (o *ReportAnnotationAllOf) GetPath() string { 162 if o == nil || o.Path == nil { 163 var ret string 164 return ret 165 } 166 return *o.Path 167 } 168 169 // GetPathOk returns a tuple with the Path field value if set, nil otherwise 170 // and a boolean to check if the value has been set. 171 func (o *ReportAnnotationAllOf) GetPathOk() (*string, bool) { 172 if o == nil || o.Path == nil { 173 return nil, false 174 } 175 return o.Path, true 176 } 177 178 // HasPath returns a boolean if a field has been set. 179 func (o *ReportAnnotationAllOf) HasPath() bool { 180 if o != nil && o.Path != nil { 181 return true 182 } 183 184 return false 185 } 186 187 // SetPath gets a reference to the given string and assigns it to the Path field. 188 func (o *ReportAnnotationAllOf) SetPath(v string) { 189 o.Path = &v 190 } 191 192 // GetLine returns the Line field value if set, zero value otherwise. 193 func (o *ReportAnnotationAllOf) GetLine() int32 { 194 if o == nil || o.Line == nil { 195 var ret int32 196 return ret 197 } 198 return *o.Line 199 } 200 201 // GetLineOk returns a tuple with the Line field value if set, nil otherwise 202 // and a boolean to check if the value has been set. 203 func (o *ReportAnnotationAllOf) GetLineOk() (*int32, bool) { 204 if o == nil || o.Line == nil { 205 return nil, false 206 } 207 return o.Line, true 208 } 209 210 // HasLine returns a boolean if a field has been set. 211 func (o *ReportAnnotationAllOf) HasLine() bool { 212 if o != nil && o.Line != nil { 213 return true 214 } 215 216 return false 217 } 218 219 // SetLine gets a reference to the given int32 and assigns it to the Line field. 220 func (o *ReportAnnotationAllOf) SetLine(v int32) { 221 o.Line = &v 222 } 223 224 // GetSummary returns the Summary field value if set, zero value otherwise. 225 func (o *ReportAnnotationAllOf) GetSummary() string { 226 if o == nil || o.Summary == nil { 227 var ret string 228 return ret 229 } 230 return *o.Summary 231 } 232 233 // GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise 234 // and a boolean to check if the value has been set. 235 func (o *ReportAnnotationAllOf) GetSummaryOk() (*string, bool) { 236 if o == nil || o.Summary == nil { 237 return nil, false 238 } 239 return o.Summary, true 240 } 241 242 // HasSummary returns a boolean if a field has been set. 243 func (o *ReportAnnotationAllOf) HasSummary() bool { 244 if o != nil && o.Summary != nil { 245 return true 246 } 247 248 return false 249 } 250 251 // SetSummary gets a reference to the given string and assigns it to the Summary field. 252 func (o *ReportAnnotationAllOf) SetSummary(v string) { 253 o.Summary = &v 254 } 255 256 // GetDetails returns the Details field value if set, zero value otherwise. 257 func (o *ReportAnnotationAllOf) GetDetails() string { 258 if o == nil || o.Details == nil { 259 var ret string 260 return ret 261 } 262 return *o.Details 263 } 264 265 // GetDetailsOk returns a tuple with the Details field value if set, nil otherwise 266 // and a boolean to check if the value has been set. 267 func (o *ReportAnnotationAllOf) GetDetailsOk() (*string, bool) { 268 if o == nil || o.Details == nil { 269 return nil, false 270 } 271 return o.Details, true 272 } 273 274 // HasDetails returns a boolean if a field has been set. 275 func (o *ReportAnnotationAllOf) HasDetails() bool { 276 if o != nil && o.Details != nil { 277 return true 278 } 279 280 return false 281 } 282 283 // SetDetails gets a reference to the given string and assigns it to the Details field. 284 func (o *ReportAnnotationAllOf) SetDetails(v string) { 285 o.Details = &v 286 } 287 288 // GetResult returns the Result field value if set, zero value otherwise. 289 func (o *ReportAnnotationAllOf) GetResult() string { 290 if o == nil || o.Result == nil { 291 var ret string 292 return ret 293 } 294 return *o.Result 295 } 296 297 // GetResultOk returns a tuple with the Result field value if set, nil otherwise 298 // and a boolean to check if the value has been set. 299 func (o *ReportAnnotationAllOf) GetResultOk() (*string, bool) { 300 if o == nil || o.Result == nil { 301 return nil, false 302 } 303 return o.Result, true 304 } 305 306 // HasResult returns a boolean if a field has been set. 307 func (o *ReportAnnotationAllOf) HasResult() bool { 308 if o != nil && o.Result != nil { 309 return true 310 } 311 312 return false 313 } 314 315 // SetResult gets a reference to the given string and assigns it to the Result field. 316 func (o *ReportAnnotationAllOf) SetResult(v string) { 317 o.Result = &v 318 } 319 320 // GetSeverity returns the Severity field value if set, zero value otherwise. 321 func (o *ReportAnnotationAllOf) GetSeverity() string { 322 if o == nil || o.Severity == nil { 323 var ret string 324 return ret 325 } 326 return *o.Severity 327 } 328 329 // GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise 330 // and a boolean to check if the value has been set. 331 func (o *ReportAnnotationAllOf) GetSeverityOk() (*string, bool) { 332 if o == nil || o.Severity == nil { 333 return nil, false 334 } 335 return o.Severity, true 336 } 337 338 // HasSeverity returns a boolean if a field has been set. 339 func (o *ReportAnnotationAllOf) HasSeverity() bool { 340 if o != nil && o.Severity != nil { 341 return true 342 } 343 344 return false 345 } 346 347 // SetSeverity gets a reference to the given string and assigns it to the Severity field. 348 func (o *ReportAnnotationAllOf) SetSeverity(v string) { 349 o.Severity = &v 350 } 351 352 // GetLink returns the Link field value if set, zero value otherwise. 353 func (o *ReportAnnotationAllOf) GetLink() string { 354 if o == nil || o.Link == nil { 355 var ret string 356 return ret 357 } 358 return *o.Link 359 } 360 361 // GetLinkOk returns a tuple with the Link field value if set, nil otherwise 362 // and a boolean to check if the value has been set. 363 func (o *ReportAnnotationAllOf) GetLinkOk() (*string, bool) { 364 if o == nil || o.Link == nil { 365 return nil, false 366 } 367 return o.Link, true 368 } 369 370 // HasLink returns a boolean if a field has been set. 371 func (o *ReportAnnotationAllOf) HasLink() bool { 372 if o != nil && o.Link != nil { 373 return true 374 } 375 376 return false 377 } 378 379 // SetLink gets a reference to the given string and assigns it to the Link field. 380 func (o *ReportAnnotationAllOf) SetLink(v string) { 381 o.Link = &v 382 } 383 384 // GetCreatedOn returns the CreatedOn field value if set, zero value otherwise. 385 func (o *ReportAnnotationAllOf) GetCreatedOn() time.Time { 386 if o == nil || o.CreatedOn == nil { 387 var ret time.Time 388 return ret 389 } 390 return *o.CreatedOn 391 } 392 393 // GetCreatedOnOk returns a tuple with the CreatedOn field value if set, nil otherwise 394 // and a boolean to check if the value has been set. 395 func (o *ReportAnnotationAllOf) GetCreatedOnOk() (*time.Time, bool) { 396 if o == nil || o.CreatedOn == nil { 397 return nil, false 398 } 399 return o.CreatedOn, true 400 } 401 402 // HasCreatedOn returns a boolean if a field has been set. 403 func (o *ReportAnnotationAllOf) HasCreatedOn() bool { 404 if o != nil && o.CreatedOn != nil { 405 return true 406 } 407 408 return false 409 } 410 411 // SetCreatedOn gets a reference to the given time.Time and assigns it to the CreatedOn field. 412 func (o *ReportAnnotationAllOf) SetCreatedOn(v time.Time) { 413 o.CreatedOn = &v 414 } 415 416 // GetUpdatedOn returns the UpdatedOn field value if set, zero value otherwise. 417 func (o *ReportAnnotationAllOf) GetUpdatedOn() time.Time { 418 if o == nil || o.UpdatedOn == nil { 419 var ret time.Time 420 return ret 421 } 422 return *o.UpdatedOn 423 } 424 425 // GetUpdatedOnOk returns a tuple with the UpdatedOn field value if set, nil otherwise 426 // and a boolean to check if the value has been set. 427 func (o *ReportAnnotationAllOf) GetUpdatedOnOk() (*time.Time, bool) { 428 if o == nil || o.UpdatedOn == nil { 429 return nil, false 430 } 431 return o.UpdatedOn, true 432 } 433 434 // HasUpdatedOn returns a boolean if a field has been set. 435 func (o *ReportAnnotationAllOf) HasUpdatedOn() bool { 436 if o != nil && o.UpdatedOn != nil { 437 return true 438 } 439 440 return false 441 } 442 443 // SetUpdatedOn gets a reference to the given time.Time and assigns it to the UpdatedOn field. 444 func (o *ReportAnnotationAllOf) SetUpdatedOn(v time.Time) { 445 o.UpdatedOn = &v 446 } 447 448 func (o ReportAnnotationAllOf) MarshalJSON() ([]byte, error) { 449 toSerialize := map[string]interface{}{} 450 if o.ExternalId != nil { 451 toSerialize["external_id"] = o.ExternalId 452 } 453 if o.Uuid != nil { 454 toSerialize["uuid"] = o.Uuid 455 } 456 if o.AnnotationType != nil { 457 toSerialize["annotation_type"] = o.AnnotationType 458 } 459 if o.Path != nil { 460 toSerialize["path"] = o.Path 461 } 462 if o.Line != nil { 463 toSerialize["line"] = o.Line 464 } 465 if o.Summary != nil { 466 toSerialize["summary"] = o.Summary 467 } 468 if o.Details != nil { 469 toSerialize["details"] = o.Details 470 } 471 if o.Result != nil { 472 toSerialize["result"] = o.Result 473 } 474 if o.Severity != nil { 475 toSerialize["severity"] = o.Severity 476 } 477 if o.Link != nil { 478 toSerialize["link"] = o.Link 479 } 480 if o.CreatedOn != nil { 481 toSerialize["created_on"] = o.CreatedOn 482 } 483 if o.UpdatedOn != nil { 484 toSerialize["updated_on"] = o.UpdatedOn 485 } 486 return json.Marshal(toSerialize) 487 } 488 489 type NullableReportAnnotationAllOf struct { 490 value *ReportAnnotationAllOf 491 isSet bool 492 } 493 494 func (v NullableReportAnnotationAllOf) Get() *ReportAnnotationAllOf { 495 return v.value 496 } 497 498 func (v *NullableReportAnnotationAllOf) Set(val *ReportAnnotationAllOf) { 499 v.value = val 500 v.isSet = true 501 } 502 503 func (v NullableReportAnnotationAllOf) IsSet() bool { 504 return v.isSet 505 } 506 507 func (v *NullableReportAnnotationAllOf) Unset() { 508 v.value = nil 509 v.isSet = false 510 } 511 512 func NewNullableReportAnnotationAllOf(val *ReportAnnotationAllOf) *NullableReportAnnotationAllOf { 513 return &NullableReportAnnotationAllOf{value: val, isSet: true} 514 } 515 516 func (v NullableReportAnnotationAllOf) MarshalJSON() ([]byte, error) { 517 return json.Marshal(v.value) 518 } 519 520 func (v *NullableReportAnnotationAllOf) UnmarshalJSON(src []byte) error { 521 v.isSet = true 522 return json.Unmarshal(src, &v.value) 523 }