feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
413
pkg/gitbeta/model_create_authentication_payload.go
Normal file
413
pkg/gitbeta/model_create_authentication_payload.go
Normal file
|
|
@ -0,0 +1,413 @@
|
|||
/*
|
||||
STACKIT Git API
|
||||
|
||||
STACKIT Git management API.
|
||||
|
||||
API version: 1beta.0.4
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package gitbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateAuthenticationPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateAuthenticationPayload{}
|
||||
|
||||
/*
|
||||
types and functions for auto_discover_url
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType = *string
|
||||
|
||||
func getCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(arg CreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType) (ret CreateAuthenticationPayloadGetAutoDiscoverUrlRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType(arg *CreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType, val CreateAuthenticationPayloadGetAutoDiscoverUrlRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAuthenticationPayloadGetAutoDiscoverUrlArgType = string
|
||||
type CreateAuthenticationPayloadGetAutoDiscoverUrlRetType = string
|
||||
|
||||
/*
|
||||
types and functions for client_id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAuthenticationPayloadGetClientIdAttributeType = *string
|
||||
|
||||
func getCreateAuthenticationPayloadGetClientIdAttributeTypeOk(arg CreateAuthenticationPayloadGetClientIdAttributeType) (ret CreateAuthenticationPayloadGetClientIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAuthenticationPayloadGetClientIdAttributeType(arg *CreateAuthenticationPayloadGetClientIdAttributeType, val CreateAuthenticationPayloadGetClientIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAuthenticationPayloadGetClientIdArgType = string
|
||||
type CreateAuthenticationPayloadGetClientIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for client_secret
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAuthenticationPayloadGetClientSecretAttributeType = *string
|
||||
|
||||
func getCreateAuthenticationPayloadGetClientSecretAttributeTypeOk(arg CreateAuthenticationPayloadGetClientSecretAttributeType) (ret CreateAuthenticationPayloadGetClientSecretRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAuthenticationPayloadGetClientSecretAttributeType(arg *CreateAuthenticationPayloadGetClientSecretAttributeType, val CreateAuthenticationPayloadGetClientSecretRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAuthenticationPayloadGetClientSecretArgType = string
|
||||
type CreateAuthenticationPayloadGetClientSecretRetType = string
|
||||
|
||||
/*
|
||||
types and functions for icon_url
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAuthenticationPayloadGetIconUrlAttributeType = *string
|
||||
|
||||
func getCreateAuthenticationPayloadGetIconUrlAttributeTypeOk(arg CreateAuthenticationPayloadGetIconUrlAttributeType) (ret CreateAuthenticationPayloadGetIconUrlRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAuthenticationPayloadGetIconUrlAttributeType(arg *CreateAuthenticationPayloadGetIconUrlAttributeType, val CreateAuthenticationPayloadGetIconUrlRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAuthenticationPayloadGetIconUrlArgType = string
|
||||
type CreateAuthenticationPayloadGetIconUrlRetType = string
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAuthenticationPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateAuthenticationPayloadGetNameAttributeTypeOk(arg CreateAuthenticationPayloadGetNameAttributeType) (ret CreateAuthenticationPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAuthenticationPayloadGetNameAttributeType(arg *CreateAuthenticationPayloadGetNameAttributeType, val CreateAuthenticationPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAuthenticationPayloadGetNameArgType = string
|
||||
type CreateAuthenticationPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for provider
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAuthenticationPayloadGetProviderAttributeType = *string
|
||||
|
||||
func getCreateAuthenticationPayloadGetProviderAttributeTypeOk(arg CreateAuthenticationPayloadGetProviderAttributeType) (ret CreateAuthenticationPayloadGetProviderRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAuthenticationPayloadGetProviderAttributeType(arg *CreateAuthenticationPayloadGetProviderAttributeType, val CreateAuthenticationPayloadGetProviderRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAuthenticationPayloadGetProviderArgType = string
|
||||
type CreateAuthenticationPayloadGetProviderRetType = string
|
||||
|
||||
/*
|
||||
types and functions for scopes
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAuthenticationPayloadGetScopesAttributeType = *string
|
||||
|
||||
func getCreateAuthenticationPayloadGetScopesAttributeTypeOk(arg CreateAuthenticationPayloadGetScopesAttributeType) (ret CreateAuthenticationPayloadGetScopesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAuthenticationPayloadGetScopesAttributeType(arg *CreateAuthenticationPayloadGetScopesAttributeType, val CreateAuthenticationPayloadGetScopesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAuthenticationPayloadGetScopesArgType = string
|
||||
type CreateAuthenticationPayloadGetScopesRetType = string
|
||||
|
||||
// CreateAuthenticationPayload Properties to patch on an authentication. All fields are optional.
|
||||
type CreateAuthenticationPayload struct {
|
||||
// The well-known configuration url to use for this authentication definition.
|
||||
// REQUIRED
|
||||
AutoDiscoverUrl CreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType `json:"auto_discover_url" required:"true"`
|
||||
// The IDP client id to use.
|
||||
// REQUIRED
|
||||
ClientId CreateAuthenticationPayloadGetClientIdAttributeType `json:"client_id" required:"true"`
|
||||
// The IDP client secret to use.
|
||||
// REQUIRED
|
||||
ClientSecret CreateAuthenticationPayloadGetClientSecretAttributeType `json:"client_secret" required:"true"`
|
||||
// The url of the icon to use for this authentication definition.
|
||||
IconUrl CreateAuthenticationPayloadGetIconUrlAttributeType `json:"icon_url,omitempty"`
|
||||
// The name to identify an authentication definition associated with a STACKIT Git instance.
|
||||
// REQUIRED
|
||||
Name CreateAuthenticationPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
// The Oauth2 provider to use.
|
||||
Provider CreateAuthenticationPayloadGetProviderAttributeType `json:"provider,omitempty"`
|
||||
// Scopes defines the OIDC scopes to request.
|
||||
Scopes CreateAuthenticationPayloadGetScopesAttributeType `json:"scopes,omitempty"`
|
||||
}
|
||||
|
||||
type _CreateAuthenticationPayload CreateAuthenticationPayload
|
||||
|
||||
// NewCreateAuthenticationPayload instantiates a new CreateAuthenticationPayload 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 NewCreateAuthenticationPayload(autoDiscoverUrl CreateAuthenticationPayloadGetAutoDiscoverUrlArgType, clientId CreateAuthenticationPayloadGetClientIdArgType, clientSecret CreateAuthenticationPayloadGetClientSecretArgType, name CreateAuthenticationPayloadGetNameArgType) *CreateAuthenticationPayload {
|
||||
this := CreateAuthenticationPayload{}
|
||||
setCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType(&this.AutoDiscoverUrl, autoDiscoverUrl)
|
||||
setCreateAuthenticationPayloadGetClientIdAttributeType(&this.ClientId, clientId)
|
||||
setCreateAuthenticationPayloadGetClientSecretAttributeType(&this.ClientSecret, clientSecret)
|
||||
setCreateAuthenticationPayloadGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateAuthenticationPayloadWithDefaults instantiates a new CreateAuthenticationPayload 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 NewCreateAuthenticationPayloadWithDefaults() *CreateAuthenticationPayload {
|
||||
this := CreateAuthenticationPayload{}
|
||||
var provider string = "openidConnect"
|
||||
this.Provider = &provider
|
||||
var scopes string = "openid profile email"
|
||||
this.Scopes = &scopes
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAutoDiscoverUrl returns the AutoDiscoverUrl field value
|
||||
func (o *CreateAuthenticationPayload) GetAutoDiscoverUrl() (ret CreateAuthenticationPayloadGetAutoDiscoverUrlRetType) {
|
||||
ret, _ = o.GetAutoDiscoverUrlOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetAutoDiscoverUrlOk returns a tuple with the AutoDiscoverUrl field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAuthenticationPayload) GetAutoDiscoverUrlOk() (ret CreateAuthenticationPayloadGetAutoDiscoverUrlRetType, ok bool) {
|
||||
return getCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl)
|
||||
}
|
||||
|
||||
// SetAutoDiscoverUrl sets field value
|
||||
func (o *CreateAuthenticationPayload) SetAutoDiscoverUrl(v CreateAuthenticationPayloadGetAutoDiscoverUrlRetType) {
|
||||
setCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType(&o.AutoDiscoverUrl, v)
|
||||
}
|
||||
|
||||
// GetClientId returns the ClientId field value
|
||||
func (o *CreateAuthenticationPayload) GetClientId() (ret CreateAuthenticationPayloadGetClientIdRetType) {
|
||||
ret, _ = o.GetClientIdOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetClientIdOk returns a tuple with the ClientId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAuthenticationPayload) GetClientIdOk() (ret CreateAuthenticationPayloadGetClientIdRetType, ok bool) {
|
||||
return getCreateAuthenticationPayloadGetClientIdAttributeTypeOk(o.ClientId)
|
||||
}
|
||||
|
||||
// SetClientId sets field value
|
||||
func (o *CreateAuthenticationPayload) SetClientId(v CreateAuthenticationPayloadGetClientIdRetType) {
|
||||
setCreateAuthenticationPayloadGetClientIdAttributeType(&o.ClientId, v)
|
||||
}
|
||||
|
||||
// GetClientSecret returns the ClientSecret field value
|
||||
func (o *CreateAuthenticationPayload) GetClientSecret() (ret CreateAuthenticationPayloadGetClientSecretRetType) {
|
||||
ret, _ = o.GetClientSecretOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetClientSecretOk returns a tuple with the ClientSecret field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAuthenticationPayload) GetClientSecretOk() (ret CreateAuthenticationPayloadGetClientSecretRetType, ok bool) {
|
||||
return getCreateAuthenticationPayloadGetClientSecretAttributeTypeOk(o.ClientSecret)
|
||||
}
|
||||
|
||||
// SetClientSecret sets field value
|
||||
func (o *CreateAuthenticationPayload) SetClientSecret(v CreateAuthenticationPayloadGetClientSecretRetType) {
|
||||
setCreateAuthenticationPayloadGetClientSecretAttributeType(&o.ClientSecret, v)
|
||||
}
|
||||
|
||||
// GetIconUrl returns the IconUrl field value if set, zero value otherwise.
|
||||
func (o *CreateAuthenticationPayload) GetIconUrl() (res CreateAuthenticationPayloadGetIconUrlRetType) {
|
||||
res, _ = o.GetIconUrlOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIconUrlOk returns a tuple with the IconUrl field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAuthenticationPayload) GetIconUrlOk() (ret CreateAuthenticationPayloadGetIconUrlRetType, ok bool) {
|
||||
return getCreateAuthenticationPayloadGetIconUrlAttributeTypeOk(o.IconUrl)
|
||||
}
|
||||
|
||||
// HasIconUrl returns a boolean if a field has been set.
|
||||
func (o *CreateAuthenticationPayload) HasIconUrl() bool {
|
||||
_, ok := o.GetIconUrlOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field.
|
||||
func (o *CreateAuthenticationPayload) SetIconUrl(v CreateAuthenticationPayloadGetIconUrlRetType) {
|
||||
setCreateAuthenticationPayloadGetIconUrlAttributeType(&o.IconUrl, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateAuthenticationPayload) GetName() (ret CreateAuthenticationPayloadGetNameRetType) {
|
||||
ret, _ = o.GetNameOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAuthenticationPayload) GetNameOk() (ret CreateAuthenticationPayloadGetNameRetType, ok bool) {
|
||||
return getCreateAuthenticationPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateAuthenticationPayload) SetName(v CreateAuthenticationPayloadGetNameRetType) {
|
||||
setCreateAuthenticationPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetProvider returns the Provider field value if set, zero value otherwise.
|
||||
func (o *CreateAuthenticationPayload) GetProvider() (res CreateAuthenticationPayloadGetProviderRetType) {
|
||||
res, _ = o.GetProviderOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAuthenticationPayload) GetProviderOk() (ret CreateAuthenticationPayloadGetProviderRetType, ok bool) {
|
||||
return getCreateAuthenticationPayloadGetProviderAttributeTypeOk(o.Provider)
|
||||
}
|
||||
|
||||
// HasProvider returns a boolean if a field has been set.
|
||||
func (o *CreateAuthenticationPayload) HasProvider() bool {
|
||||
_, ok := o.GetProviderOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
||||
func (o *CreateAuthenticationPayload) SetProvider(v CreateAuthenticationPayloadGetProviderRetType) {
|
||||
setCreateAuthenticationPayloadGetProviderAttributeType(&o.Provider, v)
|
||||
}
|
||||
|
||||
// GetScopes returns the Scopes field value if set, zero value otherwise.
|
||||
func (o *CreateAuthenticationPayload) GetScopes() (res CreateAuthenticationPayloadGetScopesRetType) {
|
||||
res, _ = o.GetScopesOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAuthenticationPayload) GetScopesOk() (ret CreateAuthenticationPayloadGetScopesRetType, ok bool) {
|
||||
return getCreateAuthenticationPayloadGetScopesAttributeTypeOk(o.Scopes)
|
||||
}
|
||||
|
||||
// HasScopes returns a boolean if a field has been set.
|
||||
func (o *CreateAuthenticationPayload) HasScopes() bool {
|
||||
_, ok := o.GetScopesOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetScopes gets a reference to the given string and assigns it to the Scopes field.
|
||||
func (o *CreateAuthenticationPayload) SetScopes(v CreateAuthenticationPayloadGetScopesRetType) {
|
||||
setCreateAuthenticationPayloadGetScopesAttributeType(&o.Scopes, v)
|
||||
}
|
||||
|
||||
func (o CreateAuthenticationPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl); ok {
|
||||
toSerialize["AutoDiscoverUrl"] = val
|
||||
}
|
||||
if val, ok := getCreateAuthenticationPayloadGetClientIdAttributeTypeOk(o.ClientId); ok {
|
||||
toSerialize["ClientId"] = val
|
||||
}
|
||||
if val, ok := getCreateAuthenticationPayloadGetClientSecretAttributeTypeOk(o.ClientSecret); ok {
|
||||
toSerialize["ClientSecret"] = val
|
||||
}
|
||||
if val, ok := getCreateAuthenticationPayloadGetIconUrlAttributeTypeOk(o.IconUrl); ok {
|
||||
toSerialize["IconUrl"] = val
|
||||
}
|
||||
if val, ok := getCreateAuthenticationPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateAuthenticationPayloadGetProviderAttributeTypeOk(o.Provider); ok {
|
||||
toSerialize["Provider"] = val
|
||||
}
|
||||
if val, ok := getCreateAuthenticationPayloadGetScopesAttributeTypeOk(o.Scopes); ok {
|
||||
toSerialize["Scopes"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateAuthenticationPayload struct {
|
||||
value *CreateAuthenticationPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateAuthenticationPayload) Get() *CreateAuthenticationPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateAuthenticationPayload) Set(val *CreateAuthenticationPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateAuthenticationPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateAuthenticationPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateAuthenticationPayload(val *CreateAuthenticationPayload) *NullableCreateAuthenticationPayload {
|
||||
return &NullableCreateAuthenticationPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateAuthenticationPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateAuthenticationPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue