github.com/khulnasoft/codebase@v0.0.0-20231214144635-a707781cbb24/go-bitbucket/model_report_data.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  // ReportData A key-value element that will be displayed along with the report.
    19  type ReportData struct {
    20  	// The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string.
    21  	Type *string `json:"type,omitempty"`
    22  	// A string describing what this data field represents.
    23  	Title *string `json:"title,omitempty"`
    24  	// The value of the data element.
    25  	Value *map[string]interface{} `json:"value,omitempty"`
    26  }
    27  
    28  // NewReportData instantiates a new ReportData object
    29  // This constructor will assign default values to properties that have it defined,
    30  // and makes sure properties required by API are set, but the set of arguments
    31  // will change when the set of required properties is changed
    32  func NewReportData() *ReportData {
    33  	this := ReportData{}
    34  	return &this
    35  }
    36  
    37  // NewReportDataWithDefaults instantiates a new ReportData object
    38  // This constructor will only assign default values to properties that have it defined,
    39  // but it doesn't guarantee that properties required by API are set
    40  func NewReportDataWithDefaults() *ReportData {
    41  	this := ReportData{}
    42  	return &this
    43  }
    44  
    45  // GetType returns the Type field value if set, zero value otherwise.
    46  func (o *ReportData) GetType() string {
    47  	if o == nil || o.Type == nil {
    48  		var ret string
    49  		return ret
    50  	}
    51  	return *o.Type
    52  }
    53  
    54  // GetTypeOk returns a tuple with the Type field value if set, nil otherwise
    55  // and a boolean to check if the value has been set.
    56  func (o *ReportData) GetTypeOk() (*string, bool) {
    57  	if o == nil || o.Type == nil {
    58  		return nil, false
    59  	}
    60  	return o.Type, true
    61  }
    62  
    63  // HasType returns a boolean if a field has been set.
    64  func (o *ReportData) HasType() bool {
    65  	if o != nil && o.Type != nil {
    66  		return true
    67  	}
    68  
    69  	return false
    70  }
    71  
    72  // SetType gets a reference to the given string and assigns it to the Type field.
    73  func (o *ReportData) SetType(v string) {
    74  	o.Type = &v
    75  }
    76  
    77  // GetTitle returns the Title field value if set, zero value otherwise.
    78  func (o *ReportData) GetTitle() string {
    79  	if o == nil || o.Title == nil {
    80  		var ret string
    81  		return ret
    82  	}
    83  	return *o.Title
    84  }
    85  
    86  // GetTitleOk returns a tuple with the Title field value if set, nil otherwise
    87  // and a boolean to check if the value has been set.
    88  func (o *ReportData) GetTitleOk() (*string, bool) {
    89  	if o == nil || o.Title == nil {
    90  		return nil, false
    91  	}
    92  	return o.Title, true
    93  }
    94  
    95  // HasTitle returns a boolean if a field has been set.
    96  func (o *ReportData) HasTitle() bool {
    97  	if o != nil && o.Title != nil {
    98  		return true
    99  	}
   100  
   101  	return false
   102  }
   103  
   104  // SetTitle gets a reference to the given string and assigns it to the Title field.
   105  func (o *ReportData) SetTitle(v string) {
   106  	o.Title = &v
   107  }
   108  
   109  // GetValue returns the Value field value if set, zero value otherwise.
   110  func (o *ReportData) GetValue() map[string]interface{} {
   111  	if o == nil || o.Value == nil {
   112  		var ret map[string]interface{}
   113  		return ret
   114  	}
   115  	return *o.Value
   116  }
   117  
   118  // GetValueOk returns a tuple with the Value field value if set, nil otherwise
   119  // and a boolean to check if the value has been set.
   120  func (o *ReportData) GetValueOk() (*map[string]interface{}, bool) {
   121  	if o == nil || o.Value == nil {
   122  		return nil, false
   123  	}
   124  	return o.Value, true
   125  }
   126  
   127  // HasValue returns a boolean if a field has been set.
   128  func (o *ReportData) HasValue() bool {
   129  	if o != nil && o.Value != nil {
   130  		return true
   131  	}
   132  
   133  	return false
   134  }
   135  
   136  // SetValue gets a reference to the given map[string]interface{} and assigns it to the Value field.
   137  func (o *ReportData) SetValue(v map[string]interface{}) {
   138  	o.Value = &v
   139  }
   140  
   141  func (o ReportData) MarshalJSON() ([]byte, error) {
   142  	toSerialize := map[string]interface{}{}
   143  	if o.Type != nil {
   144  		toSerialize["type"] = o.Type
   145  	}
   146  	if o.Title != nil {
   147  		toSerialize["title"] = o.Title
   148  	}
   149  	if o.Value != nil {
   150  		toSerialize["value"] = o.Value
   151  	}
   152  	return json.Marshal(toSerialize)
   153  }
   154  
   155  type NullableReportData struct {
   156  	value *ReportData
   157  	isSet bool
   158  }
   159  
   160  func (v NullableReportData) Get() *ReportData {
   161  	return v.value
   162  }
   163  
   164  func (v *NullableReportData) Set(val *ReportData) {
   165  	v.value = val
   166  	v.isSet = true
   167  }
   168  
   169  func (v NullableReportData) IsSet() bool {
   170  	return v.isSet
   171  }
   172  
   173  func (v *NullableReportData) Unset() {
   174  	v.value = nil
   175  	v.isSet = false
   176  }
   177  
   178  func NewNullableReportData(val *ReportData) *NullableReportData {
   179  	return &NullableReportData{value: val, isSet: true}
   180  }
   181  
   182  func (v NullableReportData) MarshalJSON() ([]byte, error) {
   183  	return json.Marshal(v.value)
   184  }
   185  
   186  func (v *NullableReportData) UnmarshalJSON(src []byte) error {
   187  	v.isSet = true
   188  	return json.Unmarshal(src, &v.value)
   189  }