## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
374 lines
14 KiB
Go
374 lines
14 KiB
Go
/*
|
|
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 PatchAuthenticationPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PatchAuthenticationPayload{}
|
|
|
|
/*
|
|
types and functions for auto_discover_url
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType = *string
|
|
|
|
func getPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(arg PatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType) (ret PatchAuthenticationPayloadGetAutoDiscoverUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType(arg *PatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType, val PatchAuthenticationPayloadGetAutoDiscoverUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PatchAuthenticationPayloadGetAutoDiscoverUrlArgType = string
|
|
type PatchAuthenticationPayloadGetAutoDiscoverUrlRetType = string
|
|
|
|
/*
|
|
types and functions for client_id
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PatchAuthenticationPayloadGetClientIdAttributeType = *string
|
|
|
|
func getPatchAuthenticationPayloadGetClientIdAttributeTypeOk(arg PatchAuthenticationPayloadGetClientIdAttributeType) (ret PatchAuthenticationPayloadGetClientIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPatchAuthenticationPayloadGetClientIdAttributeType(arg *PatchAuthenticationPayloadGetClientIdAttributeType, val PatchAuthenticationPayloadGetClientIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PatchAuthenticationPayloadGetClientIdArgType = string
|
|
type PatchAuthenticationPayloadGetClientIdRetType = string
|
|
|
|
/*
|
|
types and functions for client_secret
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PatchAuthenticationPayloadGetClientSecretAttributeType = *string
|
|
|
|
func getPatchAuthenticationPayloadGetClientSecretAttributeTypeOk(arg PatchAuthenticationPayloadGetClientSecretAttributeType) (ret PatchAuthenticationPayloadGetClientSecretRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPatchAuthenticationPayloadGetClientSecretAttributeType(arg *PatchAuthenticationPayloadGetClientSecretAttributeType, val PatchAuthenticationPayloadGetClientSecretRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PatchAuthenticationPayloadGetClientSecretArgType = string
|
|
type PatchAuthenticationPayloadGetClientSecretRetType = string
|
|
|
|
/*
|
|
types and functions for icon_url
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PatchAuthenticationPayloadGetIconUrlAttributeType = *string
|
|
|
|
func getPatchAuthenticationPayloadGetIconUrlAttributeTypeOk(arg PatchAuthenticationPayloadGetIconUrlAttributeType) (ret PatchAuthenticationPayloadGetIconUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPatchAuthenticationPayloadGetIconUrlAttributeType(arg *PatchAuthenticationPayloadGetIconUrlAttributeType, val PatchAuthenticationPayloadGetIconUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PatchAuthenticationPayloadGetIconUrlArgType = string
|
|
type PatchAuthenticationPayloadGetIconUrlRetType = string
|
|
|
|
/*
|
|
types and functions for provider
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PatchAuthenticationPayloadGetProviderAttributeType = *string
|
|
|
|
func getPatchAuthenticationPayloadGetProviderAttributeTypeOk(arg PatchAuthenticationPayloadGetProviderAttributeType) (ret PatchAuthenticationPayloadGetProviderRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPatchAuthenticationPayloadGetProviderAttributeType(arg *PatchAuthenticationPayloadGetProviderAttributeType, val PatchAuthenticationPayloadGetProviderRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PatchAuthenticationPayloadGetProviderArgType = string
|
|
type PatchAuthenticationPayloadGetProviderRetType = string
|
|
|
|
/*
|
|
types and functions for scopes
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PatchAuthenticationPayloadGetScopesAttributeType = *string
|
|
|
|
func getPatchAuthenticationPayloadGetScopesAttributeTypeOk(arg PatchAuthenticationPayloadGetScopesAttributeType) (ret PatchAuthenticationPayloadGetScopesRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPatchAuthenticationPayloadGetScopesAttributeType(arg *PatchAuthenticationPayloadGetScopesAttributeType, val PatchAuthenticationPayloadGetScopesRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PatchAuthenticationPayloadGetScopesArgType = string
|
|
type PatchAuthenticationPayloadGetScopesRetType = string
|
|
|
|
// PatchAuthenticationPayload Properties to patch on an authentication. All fields are optional.
|
|
type PatchAuthenticationPayload struct {
|
|
// The well-known configuration url to use for this authentication definition.
|
|
AutoDiscoverUrl PatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType `json:"auto_discover_url,omitempty"`
|
|
// The IDP client id to use.
|
|
ClientId PatchAuthenticationPayloadGetClientIdAttributeType `json:"client_id,omitempty"`
|
|
// The IDP client secret to use.
|
|
ClientSecret PatchAuthenticationPayloadGetClientSecretAttributeType `json:"client_secret,omitempty"`
|
|
// The url of the icon to use for this authentication definition.
|
|
IconUrl PatchAuthenticationPayloadGetIconUrlAttributeType `json:"icon_url,omitempty"`
|
|
// The Oauth2 provider to use.
|
|
Provider PatchAuthenticationPayloadGetProviderAttributeType `json:"provider,omitempty"`
|
|
// Scopes defines the OIDC scopes to request.
|
|
Scopes PatchAuthenticationPayloadGetScopesAttributeType `json:"scopes,omitempty"`
|
|
}
|
|
|
|
// NewPatchAuthenticationPayload instantiates a new PatchAuthenticationPayload 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 NewPatchAuthenticationPayload() *PatchAuthenticationPayload {
|
|
this := PatchAuthenticationPayload{}
|
|
return &this
|
|
}
|
|
|
|
// NewPatchAuthenticationPayloadWithDefaults instantiates a new PatchAuthenticationPayload 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 NewPatchAuthenticationPayloadWithDefaults() *PatchAuthenticationPayload {
|
|
this := PatchAuthenticationPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetAutoDiscoverUrl returns the AutoDiscoverUrl field value if set, zero value otherwise.
|
|
func (o *PatchAuthenticationPayload) GetAutoDiscoverUrl() (res PatchAuthenticationPayloadGetAutoDiscoverUrlRetType) {
|
|
res, _ = o.GetAutoDiscoverUrlOk()
|
|
return
|
|
}
|
|
|
|
// GetAutoDiscoverUrlOk returns a tuple with the AutoDiscoverUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchAuthenticationPayload) GetAutoDiscoverUrlOk() (ret PatchAuthenticationPayloadGetAutoDiscoverUrlRetType, ok bool) {
|
|
return getPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl)
|
|
}
|
|
|
|
// HasAutoDiscoverUrl returns a boolean if a field has been set.
|
|
func (o *PatchAuthenticationPayload) HasAutoDiscoverUrl() bool {
|
|
_, ok := o.GetAutoDiscoverUrlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetAutoDiscoverUrl gets a reference to the given string and assigns it to the AutoDiscoverUrl field.
|
|
func (o *PatchAuthenticationPayload) SetAutoDiscoverUrl(v PatchAuthenticationPayloadGetAutoDiscoverUrlRetType) {
|
|
setPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType(&o.AutoDiscoverUrl, v)
|
|
}
|
|
|
|
// GetClientId returns the ClientId field value if set, zero value otherwise.
|
|
func (o *PatchAuthenticationPayload) GetClientId() (res PatchAuthenticationPayloadGetClientIdRetType) {
|
|
res, _ = o.GetClientIdOk()
|
|
return
|
|
}
|
|
|
|
// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchAuthenticationPayload) GetClientIdOk() (ret PatchAuthenticationPayloadGetClientIdRetType, ok bool) {
|
|
return getPatchAuthenticationPayloadGetClientIdAttributeTypeOk(o.ClientId)
|
|
}
|
|
|
|
// HasClientId returns a boolean if a field has been set.
|
|
func (o *PatchAuthenticationPayload) HasClientId() bool {
|
|
_, ok := o.GetClientIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetClientId gets a reference to the given string and assigns it to the ClientId field.
|
|
func (o *PatchAuthenticationPayload) SetClientId(v PatchAuthenticationPayloadGetClientIdRetType) {
|
|
setPatchAuthenticationPayloadGetClientIdAttributeType(&o.ClientId, v)
|
|
}
|
|
|
|
// GetClientSecret returns the ClientSecret field value if set, zero value otherwise.
|
|
func (o *PatchAuthenticationPayload) GetClientSecret() (res PatchAuthenticationPayloadGetClientSecretRetType) {
|
|
res, _ = o.GetClientSecretOk()
|
|
return
|
|
}
|
|
|
|
// GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchAuthenticationPayload) GetClientSecretOk() (ret PatchAuthenticationPayloadGetClientSecretRetType, ok bool) {
|
|
return getPatchAuthenticationPayloadGetClientSecretAttributeTypeOk(o.ClientSecret)
|
|
}
|
|
|
|
// HasClientSecret returns a boolean if a field has been set.
|
|
func (o *PatchAuthenticationPayload) HasClientSecret() bool {
|
|
_, ok := o.GetClientSecretOk()
|
|
return ok
|
|
}
|
|
|
|
// SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field.
|
|
func (o *PatchAuthenticationPayload) SetClientSecret(v PatchAuthenticationPayloadGetClientSecretRetType) {
|
|
setPatchAuthenticationPayloadGetClientSecretAttributeType(&o.ClientSecret, v)
|
|
}
|
|
|
|
// GetIconUrl returns the IconUrl field value if set, zero value otherwise.
|
|
func (o *PatchAuthenticationPayload) GetIconUrl() (res PatchAuthenticationPayloadGetIconUrlRetType) {
|
|
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 *PatchAuthenticationPayload) GetIconUrlOk() (ret PatchAuthenticationPayloadGetIconUrlRetType, ok bool) {
|
|
return getPatchAuthenticationPayloadGetIconUrlAttributeTypeOk(o.IconUrl)
|
|
}
|
|
|
|
// HasIconUrl returns a boolean if a field has been set.
|
|
func (o *PatchAuthenticationPayload) HasIconUrl() bool {
|
|
_, ok := o.GetIconUrlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field.
|
|
func (o *PatchAuthenticationPayload) SetIconUrl(v PatchAuthenticationPayloadGetIconUrlRetType) {
|
|
setPatchAuthenticationPayloadGetIconUrlAttributeType(&o.IconUrl, v)
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *PatchAuthenticationPayload) GetProvider() (res PatchAuthenticationPayloadGetProviderRetType) {
|
|
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 *PatchAuthenticationPayload) GetProviderOk() (ret PatchAuthenticationPayloadGetProviderRetType, ok bool) {
|
|
return getPatchAuthenticationPayloadGetProviderAttributeTypeOk(o.Provider)
|
|
}
|
|
|
|
// HasProvider returns a boolean if a field has been set.
|
|
func (o *PatchAuthenticationPayload) HasProvider() bool {
|
|
_, ok := o.GetProviderOk()
|
|
return ok
|
|
}
|
|
|
|
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
|
func (o *PatchAuthenticationPayload) SetProvider(v PatchAuthenticationPayloadGetProviderRetType) {
|
|
setPatchAuthenticationPayloadGetProviderAttributeType(&o.Provider, v)
|
|
}
|
|
|
|
// GetScopes returns the Scopes field value if set, zero value otherwise.
|
|
func (o *PatchAuthenticationPayload) GetScopes() (res PatchAuthenticationPayloadGetScopesRetType) {
|
|
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 *PatchAuthenticationPayload) GetScopesOk() (ret PatchAuthenticationPayloadGetScopesRetType, ok bool) {
|
|
return getPatchAuthenticationPayloadGetScopesAttributeTypeOk(o.Scopes)
|
|
}
|
|
|
|
// HasScopes returns a boolean if a field has been set.
|
|
func (o *PatchAuthenticationPayload) HasScopes() bool {
|
|
_, ok := o.GetScopesOk()
|
|
return ok
|
|
}
|
|
|
|
// SetScopes gets a reference to the given string and assigns it to the Scopes field.
|
|
func (o *PatchAuthenticationPayload) SetScopes(v PatchAuthenticationPayloadGetScopesRetType) {
|
|
setPatchAuthenticationPayloadGetScopesAttributeType(&o.Scopes, v)
|
|
}
|
|
|
|
func (o PatchAuthenticationPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl); ok {
|
|
toSerialize["AutoDiscoverUrl"] = val
|
|
}
|
|
if val, ok := getPatchAuthenticationPayloadGetClientIdAttributeTypeOk(o.ClientId); ok {
|
|
toSerialize["ClientId"] = val
|
|
}
|
|
if val, ok := getPatchAuthenticationPayloadGetClientSecretAttributeTypeOk(o.ClientSecret); ok {
|
|
toSerialize["ClientSecret"] = val
|
|
}
|
|
if val, ok := getPatchAuthenticationPayloadGetIconUrlAttributeTypeOk(o.IconUrl); ok {
|
|
toSerialize["IconUrl"] = val
|
|
}
|
|
if val, ok := getPatchAuthenticationPayloadGetProviderAttributeTypeOk(o.Provider); ok {
|
|
toSerialize["Provider"] = val
|
|
}
|
|
if val, ok := getPatchAuthenticationPayloadGetScopesAttributeTypeOk(o.Scopes); ok {
|
|
toSerialize["Scopes"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullablePatchAuthenticationPayload struct {
|
|
value *PatchAuthenticationPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePatchAuthenticationPayload) Get() *PatchAuthenticationPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePatchAuthenticationPayload) Set(val *PatchAuthenticationPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePatchAuthenticationPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePatchAuthenticationPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePatchAuthenticationPayload(val *PatchAuthenticationPayload) *NullablePatchAuthenticationPayload {
|
|
return &NullablePatchAuthenticationPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePatchAuthenticationPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePatchAuthenticationPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|