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>
263 lines
7.6 KiB
Go
Generated
263 lines
7.6 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 TransactionApplicationRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TransactionApplicationRequest{}
|
|
|
|
// TransactionApplicationRequest Serializer for creating a provider and an application in one transaction
|
|
type TransactionApplicationRequest struct {
|
|
App ApplicationRequest `json:"app"`
|
|
ProviderModel ProviderModelEnum `json:"provider_model"`
|
|
Provider ModelRequest `json:"provider"`
|
|
PolicyBindings []TransactionPolicyBindingRequest `json:"policy_bindings,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TransactionApplicationRequest TransactionApplicationRequest
|
|
|
|
// NewTransactionApplicationRequest instantiates a new TransactionApplicationRequest 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 NewTransactionApplicationRequest(app ApplicationRequest, providerModel ProviderModelEnum, provider ModelRequest) *TransactionApplicationRequest {
|
|
this := TransactionApplicationRequest{}
|
|
this.App = app
|
|
this.ProviderModel = providerModel
|
|
this.Provider = provider
|
|
return &this
|
|
}
|
|
|
|
// NewTransactionApplicationRequestWithDefaults instantiates a new TransactionApplicationRequest 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 NewTransactionApplicationRequestWithDefaults() *TransactionApplicationRequest {
|
|
this := TransactionApplicationRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetApp returns the App field value
|
|
func (o *TransactionApplicationRequest) GetApp() ApplicationRequest {
|
|
if o == nil {
|
|
var ret ApplicationRequest
|
|
return ret
|
|
}
|
|
|
|
return o.App
|
|
}
|
|
|
|
// GetAppOk returns a tuple with the App field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TransactionApplicationRequest) GetAppOk() (*ApplicationRequest, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.App, true
|
|
}
|
|
|
|
// SetApp sets field value
|
|
func (o *TransactionApplicationRequest) SetApp(v ApplicationRequest) {
|
|
o.App = v
|
|
}
|
|
|
|
// GetProviderModel returns the ProviderModel field value
|
|
func (o *TransactionApplicationRequest) GetProviderModel() ProviderModelEnum {
|
|
if o == nil {
|
|
var ret ProviderModelEnum
|
|
return ret
|
|
}
|
|
|
|
return o.ProviderModel
|
|
}
|
|
|
|
// GetProviderModelOk returns a tuple with the ProviderModel field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TransactionApplicationRequest) GetProviderModelOk() (*ProviderModelEnum, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.ProviderModel, true
|
|
}
|
|
|
|
// SetProviderModel sets field value
|
|
func (o *TransactionApplicationRequest) SetProviderModel(v ProviderModelEnum) {
|
|
o.ProviderModel = v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value
|
|
func (o *TransactionApplicationRequest) GetProvider() ModelRequest {
|
|
if o == nil {
|
|
var ret ModelRequest
|
|
return ret
|
|
}
|
|
|
|
return o.Provider
|
|
}
|
|
|
|
// GetProviderOk returns a tuple with the Provider field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TransactionApplicationRequest) GetProviderOk() (*ModelRequest, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Provider, true
|
|
}
|
|
|
|
// SetProvider sets field value
|
|
func (o *TransactionApplicationRequest) SetProvider(v ModelRequest) {
|
|
o.Provider = v
|
|
}
|
|
|
|
// GetPolicyBindings returns the PolicyBindings field value if set, zero value otherwise.
|
|
func (o *TransactionApplicationRequest) GetPolicyBindings() []TransactionPolicyBindingRequest {
|
|
if o == nil || IsNil(o.PolicyBindings) {
|
|
var ret []TransactionPolicyBindingRequest
|
|
return ret
|
|
}
|
|
return o.PolicyBindings
|
|
}
|
|
|
|
// GetPolicyBindingsOk returns a tuple with the PolicyBindings field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TransactionApplicationRequest) GetPolicyBindingsOk() ([]TransactionPolicyBindingRequest, bool) {
|
|
if o == nil || IsNil(o.PolicyBindings) {
|
|
return nil, false
|
|
}
|
|
return o.PolicyBindings, true
|
|
}
|
|
|
|
// HasPolicyBindings returns a boolean if a field has been set.
|
|
func (o *TransactionApplicationRequest) HasPolicyBindings() bool {
|
|
if o != nil && !IsNil(o.PolicyBindings) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPolicyBindings gets a reference to the given []TransactionPolicyBindingRequest and assigns it to the PolicyBindings field.
|
|
func (o *TransactionApplicationRequest) SetPolicyBindings(v []TransactionPolicyBindingRequest) {
|
|
o.PolicyBindings = v
|
|
}
|
|
|
|
func (o TransactionApplicationRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TransactionApplicationRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["app"] = o.App
|
|
toSerialize["provider_model"] = o.ProviderModel
|
|
toSerialize["provider"] = o.Provider
|
|
if !IsNil(o.PolicyBindings) {
|
|
toSerialize["policy_bindings"] = o.PolicyBindings
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TransactionApplicationRequest) 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{
|
|
"app",
|
|
"provider_model",
|
|
"provider",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varTransactionApplicationRequest := _TransactionApplicationRequest{}
|
|
|
|
err = json.Unmarshal(data, &varTransactionApplicationRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TransactionApplicationRequest(varTransactionApplicationRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "app")
|
|
delete(additionalProperties, "provider_model")
|
|
delete(additionalProperties, "provider")
|
|
delete(additionalProperties, "policy_bindings")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTransactionApplicationRequest struct {
|
|
value *TransactionApplicationRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTransactionApplicationRequest) Get() *TransactionApplicationRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTransactionApplicationRequest) Set(val *TransactionApplicationRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTransactionApplicationRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTransactionApplicationRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTransactionApplicationRequest(val *TransactionApplicationRequest) *NullableTransactionApplicationRequest {
|
|
return &NullableTransactionApplicationRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTransactionApplicationRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTransactionApplicationRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|