Files
authentik/packages/client-go/model_notification_request.go
T
Marc 'risson' Schmitt 2f70351c90 packages/client-go: init (#21139)
* packages/client-go: init

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>

* format

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* remove mod/sum

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix translate

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* no go replace

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* update rust makefile with pwd

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>

* fix build

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix docs

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* don't need a version ig?

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* exclude go client from cspell

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix main docker build

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
2026-03-25 15:26:50 +01:00

288 lines
7.9 KiB
Go
Generated

/*
authentik
Making authentication simple.
API version: 2026.5.0-rc1
Contact: hello@goauthentik.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"encoding/json"
)
// checks if the NotificationRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &NotificationRequest{}
// NotificationRequest Notification Serializer
type NotificationRequest struct {
Hyperlink NullableString `json:"hyperlink,omitempty"`
HyperlinkLabel NullableString `json:"hyperlink_label,omitempty"`
Event *EventRequest `json:"event,omitempty"`
Seen *bool `json:"seen,omitempty"`
AdditionalProperties map[string]interface{}
}
type _NotificationRequest NotificationRequest
// NewNotificationRequest instantiates a new NotificationRequest 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 NewNotificationRequest() *NotificationRequest {
this := NotificationRequest{}
return &this
}
// NewNotificationRequestWithDefaults instantiates a new NotificationRequest 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 NewNotificationRequestWithDefaults() *NotificationRequest {
this := NotificationRequest{}
return &this
}
// GetHyperlink returns the Hyperlink field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NotificationRequest) GetHyperlink() string {
if o == nil || IsNil(o.Hyperlink.Get()) {
var ret string
return ret
}
return *o.Hyperlink.Get()
}
// GetHyperlinkOk returns a tuple with the Hyperlink field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NotificationRequest) GetHyperlinkOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Hyperlink.Get(), o.Hyperlink.IsSet()
}
// HasHyperlink returns a boolean if a field has been set.
func (o *NotificationRequest) HasHyperlink() bool {
if o != nil && o.Hyperlink.IsSet() {
return true
}
return false
}
// SetHyperlink gets a reference to the given NullableString and assigns it to the Hyperlink field.
func (o *NotificationRequest) SetHyperlink(v string) {
o.Hyperlink.Set(&v)
}
// SetHyperlinkNil sets the value for Hyperlink to be an explicit nil
func (o *NotificationRequest) SetHyperlinkNil() {
o.Hyperlink.Set(nil)
}
// UnsetHyperlink ensures that no value is present for Hyperlink, not even an explicit nil
func (o *NotificationRequest) UnsetHyperlink() {
o.Hyperlink.Unset()
}
// GetHyperlinkLabel returns the HyperlinkLabel field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NotificationRequest) GetHyperlinkLabel() string {
if o == nil || IsNil(o.HyperlinkLabel.Get()) {
var ret string
return ret
}
return *o.HyperlinkLabel.Get()
}
// GetHyperlinkLabelOk returns a tuple with the HyperlinkLabel field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NotificationRequest) GetHyperlinkLabelOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.HyperlinkLabel.Get(), o.HyperlinkLabel.IsSet()
}
// HasHyperlinkLabel returns a boolean if a field has been set.
func (o *NotificationRequest) HasHyperlinkLabel() bool {
if o != nil && o.HyperlinkLabel.IsSet() {
return true
}
return false
}
// SetHyperlinkLabel gets a reference to the given NullableString and assigns it to the HyperlinkLabel field.
func (o *NotificationRequest) SetHyperlinkLabel(v string) {
o.HyperlinkLabel.Set(&v)
}
// SetHyperlinkLabelNil sets the value for HyperlinkLabel to be an explicit nil
func (o *NotificationRequest) SetHyperlinkLabelNil() {
o.HyperlinkLabel.Set(nil)
}
// UnsetHyperlinkLabel ensures that no value is present for HyperlinkLabel, not even an explicit nil
func (o *NotificationRequest) UnsetHyperlinkLabel() {
o.HyperlinkLabel.Unset()
}
// GetEvent returns the Event field value if set, zero value otherwise.
func (o *NotificationRequest) GetEvent() EventRequest {
if o == nil || IsNil(o.Event) {
var ret EventRequest
return ret
}
return *o.Event
}
// GetEventOk returns a tuple with the Event field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NotificationRequest) GetEventOk() (*EventRequest, bool) {
if o == nil || IsNil(o.Event) {
return nil, false
}
return o.Event, true
}
// HasEvent returns a boolean if a field has been set.
func (o *NotificationRequest) HasEvent() bool {
if o != nil && !IsNil(o.Event) {
return true
}
return false
}
// SetEvent gets a reference to the given EventRequest and assigns it to the Event field.
func (o *NotificationRequest) SetEvent(v EventRequest) {
o.Event = &v
}
// GetSeen returns the Seen field value if set, zero value otherwise.
func (o *NotificationRequest) GetSeen() bool {
if o == nil || IsNil(o.Seen) {
var ret bool
return ret
}
return *o.Seen
}
// GetSeenOk returns a tuple with the Seen field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NotificationRequest) GetSeenOk() (*bool, bool) {
if o == nil || IsNil(o.Seen) {
return nil, false
}
return o.Seen, true
}
// HasSeen returns a boolean if a field has been set.
func (o *NotificationRequest) HasSeen() bool {
if o != nil && !IsNil(o.Seen) {
return true
}
return false
}
// SetSeen gets a reference to the given bool and assigns it to the Seen field.
func (o *NotificationRequest) SetSeen(v bool) {
o.Seen = &v
}
func (o NotificationRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o NotificationRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Hyperlink.IsSet() {
toSerialize["hyperlink"] = o.Hyperlink.Get()
}
if o.HyperlinkLabel.IsSet() {
toSerialize["hyperlink_label"] = o.HyperlinkLabel.Get()
}
if !IsNil(o.Event) {
toSerialize["event"] = o.Event
}
if !IsNil(o.Seen) {
toSerialize["seen"] = o.Seen
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *NotificationRequest) UnmarshalJSON(data []byte) (err error) {
varNotificationRequest := _NotificationRequest{}
err = json.Unmarshal(data, &varNotificationRequest)
if err != nil {
return err
}
*o = NotificationRequest(varNotificationRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "hyperlink")
delete(additionalProperties, "hyperlink_label")
delete(additionalProperties, "event")
delete(additionalProperties, "seen")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableNotificationRequest struct {
value *NotificationRequest
isSet bool
}
func (v NullableNotificationRequest) Get() *NotificationRequest {
return v.value
}
func (v *NullableNotificationRequest) Set(val *NotificationRequest) {
v.value = val
v.isSet = true
}
func (v NullableNotificationRequest) IsSet() bool {
return v.isSet
}
func (v *NullableNotificationRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNotificationRequest(val *NotificationRequest) *NullableNotificationRequest {
return &NullableNotificationRequest{value: val, isSet: true}
}
func (v NullableNotificationRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNotificationRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}