orchestrator-swagger-go-client/model_task_message.go

223 lines
5.5 KiB
Go

/*
Anthrove Orchestrator API
This service handles the communication between the manager and the plugs
API version: 1.0
Contact: support@anthrove.art
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// TaskMessage struct for TaskMessage
type TaskMessage struct {
Body *string `json:"body,omitempty"`
CreatedAt *string `json:"created_at,omitempty"`
Title *string `json:"title,omitempty"`
UserSourceId *string `json:"user_source_id,omitempty"`
}
// NewTaskMessage instantiates a new TaskMessage 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 NewTaskMessage() *TaskMessage {
this := TaskMessage{}
return &this
}
// NewTaskMessageWithDefaults instantiates a new TaskMessage 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 NewTaskMessageWithDefaults() *TaskMessage {
this := TaskMessage{}
return &this
}
// GetBody returns the Body field value if set, zero value otherwise.
func (o *TaskMessage) GetBody() string {
if o == nil || o.Body == nil {
var ret string
return ret
}
return *o.Body
}
// GetBodyOk returns a tuple with the Body field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskMessage) GetBodyOk() (*string, bool) {
if o == nil || o.Body == nil {
return nil, false
}
return o.Body, true
}
// HasBody returns a boolean if a field has been set.
func (o *TaskMessage) HasBody() bool {
if o != nil && o.Body != nil {
return true
}
return false
}
// SetBody gets a reference to the given string and assigns it to the Body field.
func (o *TaskMessage) SetBody(v string) {
o.Body = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *TaskMessage) GetCreatedAt() string {
if o == nil || o.CreatedAt == nil {
var ret string
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskMessage) GetCreatedAtOk() (*string, bool) {
if o == nil || o.CreatedAt == nil {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *TaskMessage) HasCreatedAt() bool {
if o != nil && o.CreatedAt != nil {
return true
}
return false
}
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
func (o *TaskMessage) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *TaskMessage) GetTitle() string {
if o == nil || o.Title == nil {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskMessage) GetTitleOk() (*string, bool) {
if o == nil || o.Title == nil {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *TaskMessage) HasTitle() bool {
if o != nil && o.Title != nil {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *TaskMessage) SetTitle(v string) {
o.Title = &v
}
// GetUserSourceId returns the UserSourceId field value if set, zero value otherwise.
func (o *TaskMessage) GetUserSourceId() string {
if o == nil || o.UserSourceId == nil {
var ret string
return ret
}
return *o.UserSourceId
}
// GetUserSourceIdOk returns a tuple with the UserSourceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskMessage) GetUserSourceIdOk() (*string, bool) {
if o == nil || o.UserSourceId == nil {
return nil, false
}
return o.UserSourceId, true
}
// HasUserSourceId returns a boolean if a field has been set.
func (o *TaskMessage) HasUserSourceId() bool {
if o != nil && o.UserSourceId != nil {
return true
}
return false
}
// SetUserSourceId gets a reference to the given string and assigns it to the UserSourceId field.
func (o *TaskMessage) SetUserSourceId(v string) {
o.UserSourceId = &v
}
func (o TaskMessage) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Body != nil {
toSerialize["body"] = o.Body
}
if o.CreatedAt != nil {
toSerialize["created_at"] = o.CreatedAt
}
if o.Title != nil {
toSerialize["title"] = o.Title
}
if o.UserSourceId != nil {
toSerialize["user_source_id"] = o.UserSourceId
}
return json.Marshal(toSerialize)
}
type NullableTaskMessage struct {
value *TaskMessage
isSet bool
}
func (v NullableTaskMessage) Get() *TaskMessage {
return v.value
}
func (v *NullableTaskMessage) Set(val *TaskMessage) {
v.value = val
v.isSet = true
}
func (v NullableTaskMessage) IsSet() bool {
return v.isSet
}
func (v *NullableTaskMessage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTaskMessage(val *TaskMessage) *NullableTaskMessage {
return &NullableTaskMessage{value: val, isSet: true}
}
func (v NullableTaskMessage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTaskMessage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}