414 lines
12 KiB
Go
414 lines
12 KiB
Go
/*
|
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
|
|
API version: 1.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package answer_sdk
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the SchemaUpdateSMTPConfigReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaUpdateSMTPConfigReq{}
|
|
|
|
// SchemaUpdateSMTPConfigReq struct for SchemaUpdateSMTPConfigReq
|
|
type SchemaUpdateSMTPConfigReq struct {
|
|
// \"\" SSL
|
|
Encryption *string `json:"encryption,omitempty"`
|
|
FromEmail *string `json:"from_email,omitempty"`
|
|
FromName *string `json:"from_name,omitempty"`
|
|
SmtpAuthentication *bool `json:"smtp_authentication,omitempty"`
|
|
SmtpHost *string `json:"smtp_host,omitempty"`
|
|
SmtpPassword *string `json:"smtp_password,omitempty"`
|
|
SmtpPort *int32 `json:"smtp_port,omitempty"`
|
|
SmtpUsername *string `json:"smtp_username,omitempty"`
|
|
TestEmailRecipient *string `json:"test_email_recipient,omitempty"`
|
|
}
|
|
|
|
// NewSchemaUpdateSMTPConfigReq instantiates a new SchemaUpdateSMTPConfigReq 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 NewSchemaUpdateSMTPConfigReq() *SchemaUpdateSMTPConfigReq {
|
|
this := SchemaUpdateSMTPConfigReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaUpdateSMTPConfigReqWithDefaults instantiates a new SchemaUpdateSMTPConfigReq 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 NewSchemaUpdateSMTPConfigReqWithDefaults() *SchemaUpdateSMTPConfigReq {
|
|
this := SchemaUpdateSMTPConfigReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetEncryption returns the Encryption field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetEncryption() string {
|
|
if o == nil || IsNil(o.Encryption) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Encryption
|
|
}
|
|
|
|
// GetEncryptionOk returns a tuple with the Encryption field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetEncryptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Encryption) {
|
|
return nil, false
|
|
}
|
|
return o.Encryption, true
|
|
}
|
|
|
|
// HasEncryption returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasEncryption() bool {
|
|
if o != nil && !IsNil(o.Encryption) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEncryption gets a reference to the given string and assigns it to the Encryption field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetEncryption(v string) {
|
|
o.Encryption = &v
|
|
}
|
|
|
|
// GetFromEmail returns the FromEmail field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetFromEmail() string {
|
|
if o == nil || IsNil(o.FromEmail) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.FromEmail
|
|
}
|
|
|
|
// GetFromEmailOk returns a tuple with the FromEmail field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetFromEmailOk() (*string, bool) {
|
|
if o == nil || IsNil(o.FromEmail) {
|
|
return nil, false
|
|
}
|
|
return o.FromEmail, true
|
|
}
|
|
|
|
// HasFromEmail returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasFromEmail() bool {
|
|
if o != nil && !IsNil(o.FromEmail) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFromEmail gets a reference to the given string and assigns it to the FromEmail field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetFromEmail(v string) {
|
|
o.FromEmail = &v
|
|
}
|
|
|
|
// GetFromName returns the FromName field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetFromName() string {
|
|
if o == nil || IsNil(o.FromName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.FromName
|
|
}
|
|
|
|
// GetFromNameOk returns a tuple with the FromName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetFromNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.FromName) {
|
|
return nil, false
|
|
}
|
|
return o.FromName, true
|
|
}
|
|
|
|
// HasFromName returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasFromName() bool {
|
|
if o != nil && !IsNil(o.FromName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFromName gets a reference to the given string and assigns it to the FromName field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetFromName(v string) {
|
|
o.FromName = &v
|
|
}
|
|
|
|
// GetSmtpAuthentication returns the SmtpAuthentication field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpAuthentication() bool {
|
|
if o == nil || IsNil(o.SmtpAuthentication) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.SmtpAuthentication
|
|
}
|
|
|
|
// GetSmtpAuthenticationOk returns a tuple with the SmtpAuthentication field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpAuthenticationOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.SmtpAuthentication) {
|
|
return nil, false
|
|
}
|
|
return o.SmtpAuthentication, true
|
|
}
|
|
|
|
// HasSmtpAuthentication returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasSmtpAuthentication() bool {
|
|
if o != nil && !IsNil(o.SmtpAuthentication) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSmtpAuthentication gets a reference to the given bool and assigns it to the SmtpAuthentication field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetSmtpAuthentication(v bool) {
|
|
o.SmtpAuthentication = &v
|
|
}
|
|
|
|
// GetSmtpHost returns the SmtpHost field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpHost() string {
|
|
if o == nil || IsNil(o.SmtpHost) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SmtpHost
|
|
}
|
|
|
|
// GetSmtpHostOk returns a tuple with the SmtpHost field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpHostOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SmtpHost) {
|
|
return nil, false
|
|
}
|
|
return o.SmtpHost, true
|
|
}
|
|
|
|
// HasSmtpHost returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasSmtpHost() bool {
|
|
if o != nil && !IsNil(o.SmtpHost) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSmtpHost gets a reference to the given string and assigns it to the SmtpHost field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetSmtpHost(v string) {
|
|
o.SmtpHost = &v
|
|
}
|
|
|
|
// GetSmtpPassword returns the SmtpPassword field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpPassword() string {
|
|
if o == nil || IsNil(o.SmtpPassword) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SmtpPassword
|
|
}
|
|
|
|
// GetSmtpPasswordOk returns a tuple with the SmtpPassword field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpPasswordOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SmtpPassword) {
|
|
return nil, false
|
|
}
|
|
return o.SmtpPassword, true
|
|
}
|
|
|
|
// HasSmtpPassword returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasSmtpPassword() bool {
|
|
if o != nil && !IsNil(o.SmtpPassword) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSmtpPassword gets a reference to the given string and assigns it to the SmtpPassword field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetSmtpPassword(v string) {
|
|
o.SmtpPassword = &v
|
|
}
|
|
|
|
// GetSmtpPort returns the SmtpPort field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpPort() int32 {
|
|
if o == nil || IsNil(o.SmtpPort) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.SmtpPort
|
|
}
|
|
|
|
// GetSmtpPortOk returns a tuple with the SmtpPort field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpPortOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.SmtpPort) {
|
|
return nil, false
|
|
}
|
|
return o.SmtpPort, true
|
|
}
|
|
|
|
// HasSmtpPort returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasSmtpPort() bool {
|
|
if o != nil && !IsNil(o.SmtpPort) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSmtpPort gets a reference to the given int32 and assigns it to the SmtpPort field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetSmtpPort(v int32) {
|
|
o.SmtpPort = &v
|
|
}
|
|
|
|
// GetSmtpUsername returns the SmtpUsername field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpUsername() string {
|
|
if o == nil || IsNil(o.SmtpUsername) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SmtpUsername
|
|
}
|
|
|
|
// GetSmtpUsernameOk returns a tuple with the SmtpUsername field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetSmtpUsernameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SmtpUsername) {
|
|
return nil, false
|
|
}
|
|
return o.SmtpUsername, true
|
|
}
|
|
|
|
// HasSmtpUsername returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasSmtpUsername() bool {
|
|
if o != nil && !IsNil(o.SmtpUsername) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSmtpUsername gets a reference to the given string and assigns it to the SmtpUsername field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetSmtpUsername(v string) {
|
|
o.SmtpUsername = &v
|
|
}
|
|
|
|
// GetTestEmailRecipient returns the TestEmailRecipient field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetTestEmailRecipient() string {
|
|
if o == nil || IsNil(o.TestEmailRecipient) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.TestEmailRecipient
|
|
}
|
|
|
|
// GetTestEmailRecipientOk returns a tuple with the TestEmailRecipient field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) GetTestEmailRecipientOk() (*string, bool) {
|
|
if o == nil || IsNil(o.TestEmailRecipient) {
|
|
return nil, false
|
|
}
|
|
return o.TestEmailRecipient, true
|
|
}
|
|
|
|
// HasTestEmailRecipient returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateSMTPConfigReq) HasTestEmailRecipient() bool {
|
|
if o != nil && !IsNil(o.TestEmailRecipient) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTestEmailRecipient gets a reference to the given string and assigns it to the TestEmailRecipient field.
|
|
func (o *SchemaUpdateSMTPConfigReq) SetTestEmailRecipient(v string) {
|
|
o.TestEmailRecipient = &v
|
|
}
|
|
|
|
func (o SchemaUpdateSMTPConfigReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaUpdateSMTPConfigReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Encryption) {
|
|
toSerialize["encryption"] = o.Encryption
|
|
}
|
|
if !IsNil(o.FromEmail) {
|
|
toSerialize["from_email"] = o.FromEmail
|
|
}
|
|
if !IsNil(o.FromName) {
|
|
toSerialize["from_name"] = o.FromName
|
|
}
|
|
if !IsNil(o.SmtpAuthentication) {
|
|
toSerialize["smtp_authentication"] = o.SmtpAuthentication
|
|
}
|
|
if !IsNil(o.SmtpHost) {
|
|
toSerialize["smtp_host"] = o.SmtpHost
|
|
}
|
|
if !IsNil(o.SmtpPassword) {
|
|
toSerialize["smtp_password"] = o.SmtpPassword
|
|
}
|
|
if !IsNil(o.SmtpPort) {
|
|
toSerialize["smtp_port"] = o.SmtpPort
|
|
}
|
|
if !IsNil(o.SmtpUsername) {
|
|
toSerialize["smtp_username"] = o.SmtpUsername
|
|
}
|
|
if !IsNil(o.TestEmailRecipient) {
|
|
toSerialize["test_email_recipient"] = o.TestEmailRecipient
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaUpdateSMTPConfigReq struct {
|
|
value *SchemaUpdateSMTPConfigReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaUpdateSMTPConfigReq) Get() *SchemaUpdateSMTPConfigReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateSMTPConfigReq) Set(val *SchemaUpdateSMTPConfigReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaUpdateSMTPConfigReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateSMTPConfigReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaUpdateSMTPConfigReq(val *SchemaUpdateSMTPConfigReq) *NullableSchemaUpdateSMTPConfigReq {
|
|
return &NullableSchemaUpdateSMTPConfigReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaUpdateSMTPConfigReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateSMTPConfigReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|