Files
openapi-go-answer/model_schema_get_smtp_config_resp.go
2023-09-26 16:20:01 +08:00

378 lines
11 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 SchemaGetSMTPConfigResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaGetSMTPConfigResp{}
// SchemaGetSMTPConfigResp struct for SchemaGetSMTPConfigResp
type SchemaGetSMTPConfigResp 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"`
}
// NewSchemaGetSMTPConfigResp instantiates a new SchemaGetSMTPConfigResp 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 NewSchemaGetSMTPConfigResp() *SchemaGetSMTPConfigResp {
this := SchemaGetSMTPConfigResp{}
return &this
}
// NewSchemaGetSMTPConfigRespWithDefaults instantiates a new SchemaGetSMTPConfigResp 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 NewSchemaGetSMTPConfigRespWithDefaults() *SchemaGetSMTPConfigResp {
this := SchemaGetSMTPConfigResp{}
return &this
}
// GetEncryption returns the Encryption field value if set, zero value otherwise.
func (o *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) SetEncryption(v string) {
o.Encryption = &v
}
// GetFromEmail returns the FromEmail field value if set, zero value otherwise.
func (o *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) SetFromEmail(v string) {
o.FromEmail = &v
}
// GetFromName returns the FromName field value if set, zero value otherwise.
func (o *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) SetFromName(v string) {
o.FromName = &v
}
// GetSmtpAuthentication returns the SmtpAuthentication field value if set, zero value otherwise.
func (o *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) SetSmtpAuthentication(v bool) {
o.SmtpAuthentication = &v
}
// GetSmtpHost returns the SmtpHost field value if set, zero value otherwise.
func (o *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) SetSmtpHost(v string) {
o.SmtpHost = &v
}
// GetSmtpPassword returns the SmtpPassword field value if set, zero value otherwise.
func (o *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) SetSmtpPassword(v string) {
o.SmtpPassword = &v
}
// GetSmtpPort returns the SmtpPort field value if set, zero value otherwise.
func (o *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) SetSmtpPort(v int32) {
o.SmtpPort = &v
}
// GetSmtpUsername returns the SmtpUsername field value if set, zero value otherwise.
func (o *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) 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 *SchemaGetSMTPConfigResp) SetSmtpUsername(v string) {
o.SmtpUsername = &v
}
func (o SchemaGetSMTPConfigResp) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaGetSMTPConfigResp) 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
}
return toSerialize, nil
}
type NullableSchemaGetSMTPConfigResp struct {
value *SchemaGetSMTPConfigResp
isSet bool
}
func (v NullableSchemaGetSMTPConfigResp) Get() *SchemaGetSMTPConfigResp {
return v.value
}
func (v *NullableSchemaGetSMTPConfigResp) Set(val *SchemaGetSMTPConfigResp) {
v.value = val
v.isSet = true
}
func (v NullableSchemaGetSMTPConfigResp) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaGetSMTPConfigResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaGetSMTPConfigResp(val *SchemaGetSMTPConfigResp) *NullableSchemaGetSMTPConfigResp {
return &NullableSchemaGetSMTPConfigResp{value: val, isSet: true}
}
func (v NullableSchemaGetSMTPConfigResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaGetSMTPConfigResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}