mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 03:19:51 +03:00
2f70351c90
* 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>
317 lines
9.1 KiB
Go
Generated
317 lines
9.1 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 PatchedScopeMappingRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PatchedScopeMappingRequest{}
|
|
|
|
// PatchedScopeMappingRequest ScopeMapping Serializer
|
|
type PatchedScopeMappingRequest struct {
|
|
// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.
|
|
Managed NullableString `json:"managed,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Expression *string `json:"expression,omitempty"`
|
|
// Scope name requested by the client
|
|
ScopeName *string `json:"scope_name,omitempty"`
|
|
// Description shown to the user when consenting. If left empty, the user won't be informed.
|
|
Description *string `json:"description,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PatchedScopeMappingRequest PatchedScopeMappingRequest
|
|
|
|
// NewPatchedScopeMappingRequest instantiates a new PatchedScopeMappingRequest 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 NewPatchedScopeMappingRequest() *PatchedScopeMappingRequest {
|
|
this := PatchedScopeMappingRequest{}
|
|
return &this
|
|
}
|
|
|
|
// NewPatchedScopeMappingRequestWithDefaults instantiates a new PatchedScopeMappingRequest 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 NewPatchedScopeMappingRequestWithDefaults() *PatchedScopeMappingRequest {
|
|
this := PatchedScopeMappingRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *PatchedScopeMappingRequest) GetManaged() string {
|
|
if o == nil || IsNil(o.Managed.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Managed.Get()
|
|
}
|
|
|
|
// GetManagedOk returns a tuple with the Managed 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 *PatchedScopeMappingRequest) GetManagedOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.Managed.Get(), o.Managed.IsSet()
|
|
}
|
|
|
|
// HasManaged returns a boolean if a field has been set.
|
|
func (o *PatchedScopeMappingRequest) HasManaged() bool {
|
|
if o != nil && o.Managed.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetManaged gets a reference to the given NullableString and assigns it to the Managed field.
|
|
func (o *PatchedScopeMappingRequest) SetManaged(v string) {
|
|
o.Managed.Set(&v)
|
|
}
|
|
|
|
// SetManagedNil sets the value for Managed to be an explicit nil
|
|
func (o *PatchedScopeMappingRequest) SetManagedNil() {
|
|
o.Managed.Set(nil)
|
|
}
|
|
|
|
// UnsetManaged ensures that no value is present for Managed, not even an explicit nil
|
|
func (o *PatchedScopeMappingRequest) UnsetManaged() {
|
|
o.Managed.Unset()
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *PatchedScopeMappingRequest) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedScopeMappingRequest) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *PatchedScopeMappingRequest) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *PatchedScopeMappingRequest) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetExpression returns the Expression field value if set, zero value otherwise.
|
|
func (o *PatchedScopeMappingRequest) GetExpression() string {
|
|
if o == nil || IsNil(o.Expression) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Expression
|
|
}
|
|
|
|
// GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedScopeMappingRequest) GetExpressionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Expression) {
|
|
return nil, false
|
|
}
|
|
return o.Expression, true
|
|
}
|
|
|
|
// HasExpression returns a boolean if a field has been set.
|
|
func (o *PatchedScopeMappingRequest) HasExpression() bool {
|
|
if o != nil && !IsNil(o.Expression) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExpression gets a reference to the given string and assigns it to the Expression field.
|
|
func (o *PatchedScopeMappingRequest) SetExpression(v string) {
|
|
o.Expression = &v
|
|
}
|
|
|
|
// GetScopeName returns the ScopeName field value if set, zero value otherwise.
|
|
func (o *PatchedScopeMappingRequest) GetScopeName() string {
|
|
if o == nil || IsNil(o.ScopeName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ScopeName
|
|
}
|
|
|
|
// GetScopeNameOk returns a tuple with the ScopeName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedScopeMappingRequest) GetScopeNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ScopeName) {
|
|
return nil, false
|
|
}
|
|
return o.ScopeName, true
|
|
}
|
|
|
|
// HasScopeName returns a boolean if a field has been set.
|
|
func (o *PatchedScopeMappingRequest) HasScopeName() bool {
|
|
if o != nil && !IsNil(o.ScopeName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScopeName gets a reference to the given string and assigns it to the ScopeName field.
|
|
func (o *PatchedScopeMappingRequest) SetScopeName(v string) {
|
|
o.ScopeName = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *PatchedScopeMappingRequest) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedScopeMappingRequest) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *PatchedScopeMappingRequest) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *PatchedScopeMappingRequest) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
func (o PatchedScopeMappingRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PatchedScopeMappingRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Managed.IsSet() {
|
|
toSerialize["managed"] = o.Managed.Get()
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Expression) {
|
|
toSerialize["expression"] = o.Expression
|
|
}
|
|
if !IsNil(o.ScopeName) {
|
|
toSerialize["scope_name"] = o.ScopeName
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PatchedScopeMappingRequest) UnmarshalJSON(data []byte) (err error) {
|
|
varPatchedScopeMappingRequest := _PatchedScopeMappingRequest{}
|
|
|
|
err = json.Unmarshal(data, &varPatchedScopeMappingRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PatchedScopeMappingRequest(varPatchedScopeMappingRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "managed")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "expression")
|
|
delete(additionalProperties, "scope_name")
|
|
delete(additionalProperties, "description")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePatchedScopeMappingRequest struct {
|
|
value *PatchedScopeMappingRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePatchedScopeMappingRequest) Get() *PatchedScopeMappingRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePatchedScopeMappingRequest) Set(val *PatchedScopeMappingRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePatchedScopeMappingRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePatchedScopeMappingRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePatchedScopeMappingRequest(val *PatchedScopeMappingRequest) *NullablePatchedScopeMappingRequest {
|
|
return &NullablePatchedScopeMappingRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePatchedScopeMappingRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePatchedScopeMappingRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|