github.com/khulnasoft/codebase@v0.0.0-20231214144635-a707781cbb24/go-bitbucket/model_report.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 // Report struct for Report 20 type Report struct { 21 Object 22 // The UUID that can be used to identify the report. 23 Uuid *string `json:"uuid,omitempty"` 24 // The title of the report. 25 Title *string `json:"title,omitempty"` 26 // A string to describe the purpose of the report. 27 Details *string `json:"details,omitempty"` 28 // ID of the report provided by the report creator. It can be used to identify the report as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the report creator for updating or deleting this specific report. Needs to be unique. 29 ExternalId *string `json:"external_id,omitempty"` 30 // A string to describe the tool or company who created the report. 31 Reporter *string `json:"reporter,omitempty"` 32 // A URL linking to the results of the report in an external tool. 33 Link *string `json:"link,omitempty"` 34 // If enabled, a remote link is created in Jira for the issue associated with the commit the report belongs to. 35 RemoteLinkEnabled *bool `json:"remote_link_enabled,omitempty"` 36 // A URL to the report logo. If none is provided, the default insights logo will be used. 37 LogoUrl *string `json:"logo_url,omitempty"` 38 // The type of the report. 39 ReportType *string `json:"report_type,omitempty"` 40 // The state of the report. May be set to PENDING and later updated. 41 Result *string `json:"result,omitempty"` 42 // An array of data fields to display information on the report. Maximum 10. 43 Data *[]ReportData `json:"data,omitempty"` 44 // The timestamp when the report was created. 45 CreatedOn *time.Time `json:"created_on,omitempty"` 46 // The timestamp when the report was updated. 47 UpdatedOn *time.Time `json:"updated_on,omitempty"` 48 } 49 50 // NewReport instantiates a new Report object 51 // This constructor will assign default values to properties that have it defined, 52 // and makes sure properties required by API are set, but the set of arguments 53 // will change when the set of required properties is changed 54 func NewReport() *Report { 55 this := Report{} 56 return &this 57 } 58 59 // NewReportWithDefaults instantiates a new Report object 60 // This constructor will only assign default values to properties that have it defined, 61 // but it doesn't guarantee that properties required by API are set 62 func NewReportWithDefaults() *Report { 63 this := Report{} 64 return &this 65 } 66 67 // GetUuid returns the Uuid field value if set, zero value otherwise. 68 func (o *Report) GetUuid() string { 69 if o == nil || o.Uuid == nil { 70 var ret string 71 return ret 72 } 73 return *o.Uuid 74 } 75 76 // GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise 77 // and a boolean to check if the value has been set. 78 func (o *Report) GetUuidOk() (*string, bool) { 79 if o == nil || o.Uuid == nil { 80 return nil, false 81 } 82 return o.Uuid, true 83 } 84 85 // HasUuid returns a boolean if a field has been set. 86 func (o *Report) HasUuid() bool { 87 if o != nil && o.Uuid != nil { 88 return true 89 } 90 91 return false 92 } 93 94 // SetUuid gets a reference to the given string and assigns it to the Uuid field. 95 func (o *Report) SetUuid(v string) { 96 o.Uuid = &v 97 } 98 99 // GetTitle returns the Title field value if set, zero value otherwise. 100 func (o *Report) GetTitle() string { 101 if o == nil || o.Title == nil { 102 var ret string 103 return ret 104 } 105 return *o.Title 106 } 107 108 // GetTitleOk returns a tuple with the Title field value if set, nil otherwise 109 // and a boolean to check if the value has been set. 110 func (o *Report) GetTitleOk() (*string, bool) { 111 if o == nil || o.Title == nil { 112 return nil, false 113 } 114 return o.Title, true 115 } 116 117 // HasTitle returns a boolean if a field has been set. 118 func (o *Report) HasTitle() bool { 119 if o != nil && o.Title != nil { 120 return true 121 } 122 123 return false 124 } 125 126 // SetTitle gets a reference to the given string and assigns it to the Title field. 127 func (o *Report) SetTitle(v string) { 128 o.Title = &v 129 } 130 131 // GetDetails returns the Details field value if set, zero value otherwise. 132 func (o *Report) GetDetails() string { 133 if o == nil || o.Details == nil { 134 var ret string 135 return ret 136 } 137 return *o.Details 138 } 139 140 // GetDetailsOk returns a tuple with the Details field value if set, nil otherwise 141 // and a boolean to check if the value has been set. 142 func (o *Report) GetDetailsOk() (*string, bool) { 143 if o == nil || o.Details == nil { 144 return nil, false 145 } 146 return o.Details, true 147 } 148 149 // HasDetails returns a boolean if a field has been set. 150 func (o *Report) HasDetails() bool { 151 if o != nil && o.Details != nil { 152 return true 153 } 154 155 return false 156 } 157 158 // SetDetails gets a reference to the given string and assigns it to the Details field. 159 func (o *Report) SetDetails(v string) { 160 o.Details = &v 161 } 162 163 // GetExternalId returns the ExternalId field value if set, zero value otherwise. 164 func (o *Report) GetExternalId() string { 165 if o == nil || o.ExternalId == nil { 166 var ret string 167 return ret 168 } 169 return *o.ExternalId 170 } 171 172 // GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise 173 // and a boolean to check if the value has been set. 174 func (o *Report) GetExternalIdOk() (*string, bool) { 175 if o == nil || o.ExternalId == nil { 176 return nil, false 177 } 178 return o.ExternalId, true 179 } 180 181 // HasExternalId returns a boolean if a field has been set. 182 func (o *Report) HasExternalId() bool { 183 if o != nil && o.ExternalId != nil { 184 return true 185 } 186 187 return false 188 } 189 190 // SetExternalId gets a reference to the given string and assigns it to the ExternalId field. 191 func (o *Report) SetExternalId(v string) { 192 o.ExternalId = &v 193 } 194 195 // GetReporter returns the Reporter field value if set, zero value otherwise. 196 func (o *Report) GetReporter() string { 197 if o == nil || o.Reporter == nil { 198 var ret string 199 return ret 200 } 201 return *o.Reporter 202 } 203 204 // GetReporterOk returns a tuple with the Reporter field value if set, nil otherwise 205 // and a boolean to check if the value has been set. 206 func (o *Report) GetReporterOk() (*string, bool) { 207 if o == nil || o.Reporter == nil { 208 return nil, false 209 } 210 return o.Reporter, true 211 } 212 213 // HasReporter returns a boolean if a field has been set. 214 func (o *Report) HasReporter() bool { 215 if o != nil && o.Reporter != nil { 216 return true 217 } 218 219 return false 220 } 221 222 // SetReporter gets a reference to the given string and assigns it to the Reporter field. 223 func (o *Report) SetReporter(v string) { 224 o.Reporter = &v 225 } 226 227 // GetLink returns the Link field value if set, zero value otherwise. 228 func (o *Report) GetLink() string { 229 if o == nil || o.Link == nil { 230 var ret string 231 return ret 232 } 233 return *o.Link 234 } 235 236 // GetLinkOk returns a tuple with the Link field value if set, nil otherwise 237 // and a boolean to check if the value has been set. 238 func (o *Report) GetLinkOk() (*string, bool) { 239 if o == nil || o.Link == nil { 240 return nil, false 241 } 242 return o.Link, true 243 } 244 245 // HasLink returns a boolean if a field has been set. 246 func (o *Report) HasLink() bool { 247 if o != nil && o.Link != nil { 248 return true 249 } 250 251 return false 252 } 253 254 // SetLink gets a reference to the given string and assigns it to the Link field. 255 func (o *Report) SetLink(v string) { 256 o.Link = &v 257 } 258 259 // GetRemoteLinkEnabled returns the RemoteLinkEnabled field value if set, zero value otherwise. 260 func (o *Report) GetRemoteLinkEnabled() bool { 261 if o == nil || o.RemoteLinkEnabled == nil { 262 var ret bool 263 return ret 264 } 265 return *o.RemoteLinkEnabled 266 } 267 268 // GetRemoteLinkEnabledOk returns a tuple with the RemoteLinkEnabled field value if set, nil otherwise 269 // and a boolean to check if the value has been set. 270 func (o *Report) GetRemoteLinkEnabledOk() (*bool, bool) { 271 if o == nil || o.RemoteLinkEnabled == nil { 272 return nil, false 273 } 274 return o.RemoteLinkEnabled, true 275 } 276 277 // HasRemoteLinkEnabled returns a boolean if a field has been set. 278 func (o *Report) HasRemoteLinkEnabled() bool { 279 if o != nil && o.RemoteLinkEnabled != nil { 280 return true 281 } 282 283 return false 284 } 285 286 // SetRemoteLinkEnabled gets a reference to the given bool and assigns it to the RemoteLinkEnabled field. 287 func (o *Report) SetRemoteLinkEnabled(v bool) { 288 o.RemoteLinkEnabled = &v 289 } 290 291 // GetLogoUrl returns the LogoUrl field value if set, zero value otherwise. 292 func (o *Report) GetLogoUrl() string { 293 if o == nil || o.LogoUrl == nil { 294 var ret string 295 return ret 296 } 297 return *o.LogoUrl 298 } 299 300 // GetLogoUrlOk returns a tuple with the LogoUrl field value if set, nil otherwise 301 // and a boolean to check if the value has been set. 302 func (o *Report) GetLogoUrlOk() (*string, bool) { 303 if o == nil || o.LogoUrl == nil { 304 return nil, false 305 } 306 return o.LogoUrl, true 307 } 308 309 // HasLogoUrl returns a boolean if a field has been set. 310 func (o *Report) HasLogoUrl() bool { 311 if o != nil && o.LogoUrl != nil { 312 return true 313 } 314 315 return false 316 } 317 318 // SetLogoUrl gets a reference to the given string and assigns it to the LogoUrl field. 319 func (o *Report) SetLogoUrl(v string) { 320 o.LogoUrl = &v 321 } 322 323 // GetReportType returns the ReportType field value if set, zero value otherwise. 324 func (o *Report) GetReportType() string { 325 if o == nil || o.ReportType == nil { 326 var ret string 327 return ret 328 } 329 return *o.ReportType 330 } 331 332 // GetReportTypeOk returns a tuple with the ReportType field value if set, nil otherwise 333 // and a boolean to check if the value has been set. 334 func (o *Report) GetReportTypeOk() (*string, bool) { 335 if o == nil || o.ReportType == nil { 336 return nil, false 337 } 338 return o.ReportType, true 339 } 340 341 // HasReportType returns a boolean if a field has been set. 342 func (o *Report) HasReportType() bool { 343 if o != nil && o.ReportType != nil { 344 return true 345 } 346 347 return false 348 } 349 350 // SetReportType gets a reference to the given string and assigns it to the ReportType field. 351 func (o *Report) SetReportType(v string) { 352 o.ReportType = &v 353 } 354 355 // GetResult returns the Result field value if set, zero value otherwise. 356 func (o *Report) GetResult() string { 357 if o == nil || o.Result == nil { 358 var ret string 359 return ret 360 } 361 return *o.Result 362 } 363 364 // GetResultOk returns a tuple with the Result field value if set, nil otherwise 365 // and a boolean to check if the value has been set. 366 func (o *Report) GetResultOk() (*string, bool) { 367 if o == nil || o.Result == nil { 368 return nil, false 369 } 370 return o.Result, true 371 } 372 373 // HasResult returns a boolean if a field has been set. 374 func (o *Report) HasResult() bool { 375 if o != nil && o.Result != nil { 376 return true 377 } 378 379 return false 380 } 381 382 // SetResult gets a reference to the given string and assigns it to the Result field. 383 func (o *Report) SetResult(v string) { 384 o.Result = &v 385 } 386 387 // GetData returns the Data field value if set, zero value otherwise. 388 func (o *Report) GetData() []ReportData { 389 if o == nil || o.Data == nil { 390 var ret []ReportData 391 return ret 392 } 393 return *o.Data 394 } 395 396 // GetDataOk returns a tuple with the Data field value if set, nil otherwise 397 // and a boolean to check if the value has been set. 398 func (o *Report) GetDataOk() (*[]ReportData, bool) { 399 if o == nil || o.Data == nil { 400 return nil, false 401 } 402 return o.Data, true 403 } 404 405 // HasData returns a boolean if a field has been set. 406 func (o *Report) HasData() bool { 407 if o != nil && o.Data != nil { 408 return true 409 } 410 411 return false 412 } 413 414 // SetData gets a reference to the given []ReportData and assigns it to the Data field. 415 func (o *Report) SetData(v []ReportData) { 416 o.Data = &v 417 } 418 419 // GetCreatedOn returns the CreatedOn field value if set, zero value otherwise. 420 func (o *Report) GetCreatedOn() time.Time { 421 if o == nil || o.CreatedOn == nil { 422 var ret time.Time 423 return ret 424 } 425 return *o.CreatedOn 426 } 427 428 // GetCreatedOnOk returns a tuple with the CreatedOn field value if set, nil otherwise 429 // and a boolean to check if the value has been set. 430 func (o *Report) GetCreatedOnOk() (*time.Time, bool) { 431 if o == nil || o.CreatedOn == nil { 432 return nil, false 433 } 434 return o.CreatedOn, true 435 } 436 437 // HasCreatedOn returns a boolean if a field has been set. 438 func (o *Report) HasCreatedOn() bool { 439 if o != nil && o.CreatedOn != nil { 440 return true 441 } 442 443 return false 444 } 445 446 // SetCreatedOn gets a reference to the given time.Time and assigns it to the CreatedOn field. 447 func (o *Report) SetCreatedOn(v time.Time) { 448 o.CreatedOn = &v 449 } 450 451 // GetUpdatedOn returns the UpdatedOn field value if set, zero value otherwise. 452 func (o *Report) GetUpdatedOn() time.Time { 453 if o == nil || o.UpdatedOn == nil { 454 var ret time.Time 455 return ret 456 } 457 return *o.UpdatedOn 458 } 459 460 // GetUpdatedOnOk returns a tuple with the UpdatedOn field value if set, nil otherwise 461 // and a boolean to check if the value has been set. 462 func (o *Report) GetUpdatedOnOk() (*time.Time, bool) { 463 if o == nil || o.UpdatedOn == nil { 464 return nil, false 465 } 466 return o.UpdatedOn, true 467 } 468 469 // HasUpdatedOn returns a boolean if a field has been set. 470 func (o *Report) HasUpdatedOn() bool { 471 if o != nil && o.UpdatedOn != nil { 472 return true 473 } 474 475 return false 476 } 477 478 // SetUpdatedOn gets a reference to the given time.Time and assigns it to the UpdatedOn field. 479 func (o *Report) SetUpdatedOn(v time.Time) { 480 o.UpdatedOn = &v 481 } 482 483 func (o Report) MarshalJSON() ([]byte, error) { 484 toSerialize := map[string]interface{}{} 485 serializedObject, errObject := json.Marshal(o.Object) 486 if errObject != nil { 487 return []byte{}, errObject 488 } 489 errObject = json.Unmarshal([]byte(serializedObject), &toSerialize) 490 if errObject != nil { 491 return []byte{}, errObject 492 } 493 if o.Uuid != nil { 494 toSerialize["uuid"] = o.Uuid 495 } 496 if o.Title != nil { 497 toSerialize["title"] = o.Title 498 } 499 if o.Details != nil { 500 toSerialize["details"] = o.Details 501 } 502 if o.ExternalId != nil { 503 toSerialize["external_id"] = o.ExternalId 504 } 505 if o.Reporter != nil { 506 toSerialize["reporter"] = o.Reporter 507 } 508 if o.Link != nil { 509 toSerialize["link"] = o.Link 510 } 511 if o.RemoteLinkEnabled != nil { 512 toSerialize["remote_link_enabled"] = o.RemoteLinkEnabled 513 } 514 if o.LogoUrl != nil { 515 toSerialize["logo_url"] = o.LogoUrl 516 } 517 if o.ReportType != nil { 518 toSerialize["report_type"] = o.ReportType 519 } 520 if o.Result != nil { 521 toSerialize["result"] = o.Result 522 } 523 if o.Data != nil { 524 toSerialize["data"] = o.Data 525 } 526 if o.CreatedOn != nil { 527 toSerialize["created_on"] = o.CreatedOn 528 } 529 if o.UpdatedOn != nil { 530 toSerialize["updated_on"] = o.UpdatedOn 531 } 532 return json.Marshal(toSerialize) 533 } 534 535 type NullableReport struct { 536 value *Report 537 isSet bool 538 } 539 540 func (v NullableReport) Get() *Report { 541 return v.value 542 } 543 544 func (v *NullableReport) Set(val *Report) { 545 v.value = val 546 v.isSet = true 547 } 548 549 func (v NullableReport) IsSet() bool { 550 return v.isSet 551 } 552 553 func (v *NullableReport) Unset() { 554 v.value = nil 555 v.isSet = false 556 } 557 558 func NewNullableReport(val *Report) *NullableReport { 559 return &NullableReport{value: val, isSet: true} 560 } 561 562 func (v NullableReport) MarshalJSON() ([]byte, error) { 563 return json.Marshal(v.value) 564 } 565 566 func (v *NullableReport) UnmarshalJSON(src []byte) error { 567 v.isSet = true 568 return json.Unmarshal(src, &v.value) 569 }