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>
354 lines
8.9 KiB
Go
Generated
354 lines
8.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"
|
|
"fmt"
|
|
)
|
|
|
|
// checks if the GroupRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GroupRequest{}
|
|
|
|
// GroupRequest Group Serializer
|
|
type GroupRequest struct {
|
|
Name string `json:"name"`
|
|
// Users added to this group will be superusers.
|
|
IsSuperuser *bool `json:"is_superuser,omitempty"`
|
|
Parents []string `json:"parents,omitempty"`
|
|
Users []int32 `json:"users,omitempty"`
|
|
Attributes map[string]interface{} `json:"attributes,omitempty"`
|
|
Roles []string `json:"roles,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GroupRequest GroupRequest
|
|
|
|
// NewGroupRequest instantiates a new GroupRequest 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 NewGroupRequest(name string) *GroupRequest {
|
|
this := GroupRequest{}
|
|
this.Name = name
|
|
return &this
|
|
}
|
|
|
|
// NewGroupRequestWithDefaults instantiates a new GroupRequest 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 NewGroupRequestWithDefaults() *GroupRequest {
|
|
this := GroupRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *GroupRequest) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupRequest) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *GroupRequest) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetIsSuperuser returns the IsSuperuser field value if set, zero value otherwise.
|
|
func (o *GroupRequest) GetIsSuperuser() bool {
|
|
if o == nil || IsNil(o.IsSuperuser) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.IsSuperuser
|
|
}
|
|
|
|
// GetIsSuperuserOk returns a tuple with the IsSuperuser field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupRequest) GetIsSuperuserOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.IsSuperuser) {
|
|
return nil, false
|
|
}
|
|
return o.IsSuperuser, true
|
|
}
|
|
|
|
// HasIsSuperuser returns a boolean if a field has been set.
|
|
func (o *GroupRequest) HasIsSuperuser() bool {
|
|
if o != nil && !IsNil(o.IsSuperuser) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIsSuperuser gets a reference to the given bool and assigns it to the IsSuperuser field.
|
|
func (o *GroupRequest) SetIsSuperuser(v bool) {
|
|
o.IsSuperuser = &v
|
|
}
|
|
|
|
// GetParents returns the Parents field value if set, zero value otherwise.
|
|
func (o *GroupRequest) GetParents() []string {
|
|
if o == nil || IsNil(o.Parents) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Parents
|
|
}
|
|
|
|
// GetParentsOk returns a tuple with the Parents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupRequest) GetParentsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Parents) {
|
|
return nil, false
|
|
}
|
|
return o.Parents, true
|
|
}
|
|
|
|
// HasParents returns a boolean if a field has been set.
|
|
func (o *GroupRequest) HasParents() bool {
|
|
if o != nil && !IsNil(o.Parents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParents gets a reference to the given []string and assigns it to the Parents field.
|
|
func (o *GroupRequest) SetParents(v []string) {
|
|
o.Parents = v
|
|
}
|
|
|
|
// GetUsers returns the Users field value if set, zero value otherwise.
|
|
func (o *GroupRequest) GetUsers() []int32 {
|
|
if o == nil || IsNil(o.Users) {
|
|
var ret []int32
|
|
return ret
|
|
}
|
|
return o.Users
|
|
}
|
|
|
|
// GetUsersOk returns a tuple with the Users field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupRequest) GetUsersOk() ([]int32, bool) {
|
|
if o == nil || IsNil(o.Users) {
|
|
return nil, false
|
|
}
|
|
return o.Users, true
|
|
}
|
|
|
|
// HasUsers returns a boolean if a field has been set.
|
|
func (o *GroupRequest) HasUsers() bool {
|
|
if o != nil && !IsNil(o.Users) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUsers gets a reference to the given []int32 and assigns it to the Users field.
|
|
func (o *GroupRequest) SetUsers(v []int32) {
|
|
o.Users = v
|
|
}
|
|
|
|
// GetAttributes returns the Attributes field value if set, zero value otherwise.
|
|
func (o *GroupRequest) GetAttributes() map[string]interface{} {
|
|
if o == nil || IsNil(o.Attributes) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Attributes
|
|
}
|
|
|
|
// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupRequest) GetAttributesOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Attributes) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Attributes, true
|
|
}
|
|
|
|
// HasAttributes returns a boolean if a field has been set.
|
|
func (o *GroupRequest) HasAttributes() bool {
|
|
if o != nil && !IsNil(o.Attributes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field.
|
|
func (o *GroupRequest) SetAttributes(v map[string]interface{}) {
|
|
o.Attributes = v
|
|
}
|
|
|
|
// GetRoles returns the Roles field value if set, zero value otherwise.
|
|
func (o *GroupRequest) GetRoles() []string {
|
|
if o == nil || IsNil(o.Roles) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Roles
|
|
}
|
|
|
|
// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupRequest) GetRolesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Roles) {
|
|
return nil, false
|
|
}
|
|
return o.Roles, true
|
|
}
|
|
|
|
// HasRoles returns a boolean if a field has been set.
|
|
func (o *GroupRequest) HasRoles() bool {
|
|
if o != nil && !IsNil(o.Roles) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRoles gets a reference to the given []string and assigns it to the Roles field.
|
|
func (o *GroupRequest) SetRoles(v []string) {
|
|
o.Roles = v
|
|
}
|
|
|
|
func (o GroupRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GroupRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
if !IsNil(o.IsSuperuser) {
|
|
toSerialize["is_superuser"] = o.IsSuperuser
|
|
}
|
|
if !IsNil(o.Parents) {
|
|
toSerialize["parents"] = o.Parents
|
|
}
|
|
if !IsNil(o.Users) {
|
|
toSerialize["users"] = o.Users
|
|
}
|
|
if !IsNil(o.Attributes) {
|
|
toSerialize["attributes"] = o.Attributes
|
|
}
|
|
if !IsNil(o.Roles) {
|
|
toSerialize["roles"] = o.Roles
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GroupRequest) UnmarshalJSON(data []byte) (err error) {
|
|
// This validates that all required properties are included in the JSON object
|
|
// by unmarshalling the object into a generic map with string keys and checking
|
|
// that every required field exists as a key in the generic map.
|
|
requiredProperties := []string{
|
|
"name",
|
|
}
|
|
|
|
allProperties := make(map[string]interface{})
|
|
|
|
err = json.Unmarshal(data, &allProperties)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
for _, requiredProperty := range requiredProperties {
|
|
if _, exists := allProperties[requiredProperty]; !exists {
|
|
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
|
}
|
|
}
|
|
|
|
varGroupRequest := _GroupRequest{}
|
|
|
|
err = json.Unmarshal(data, &varGroupRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GroupRequest(varGroupRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "is_superuser")
|
|
delete(additionalProperties, "parents")
|
|
delete(additionalProperties, "users")
|
|
delete(additionalProperties, "attributes")
|
|
delete(additionalProperties, "roles")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGroupRequest struct {
|
|
value *GroupRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGroupRequest) Get() *GroupRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGroupRequest) Set(val *GroupRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGroupRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGroupRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGroupRequest(val *GroupRequest) *NullableGroupRequest {
|
|
return &NullableGroupRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGroupRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGroupRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|