From 4a00e3e0abccb82434b31115ba8cd26733b58062 Mon Sep 17 00:00:00 2001 From: ory-bot <60093411+ory-bot@users.noreply.github.com> Date: Wed, 31 Jan 2024 08:36:47 +0000 Subject: [PATCH] autogen(openapi): regenerate swagger spec and internal client [skip ci] --- .../model_accept_o_auth2_consent_request.go | 43 +++++++++++++++++-- .../model_o_auth2_consent_session.go | 37 ++++++++++++++++ 2 files changed, 77 insertions(+), 3 deletions(-) diff --git a/internal/httpclient/model_accept_o_auth2_consent_request.go b/internal/httpclient/model_accept_o_auth2_consent_request.go index 758576adc3e..ff84659a399 100644 --- a/internal/httpclient/model_accept_o_auth2_consent_request.go +++ b/internal/httpclient/model_accept_o_auth2_consent_request.go @@ -21,9 +21,10 @@ var _ MappedNullable = &AcceptOAuth2ConsentRequest{} // AcceptOAuth2ConsentRequest struct for AcceptOAuth2ConsentRequest type AcceptOAuth2ConsentRequest struct { - GrantAccessTokenAudience []string `json:"grant_access_token_audience,omitempty"` - GrantScope []string `json:"grant_scope,omitempty"` - HandledAt *time.Time `json:"handled_at,omitempty"` + Context interface{} `json:"context,omitempty"` + GrantAccessTokenAudience []string `json:"grant_access_token_audience,omitempty"` + GrantScope []string `json:"grant_scope,omitempty"` + HandledAt *time.Time `json:"handled_at,omitempty"` // Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. Remember *bool `json:"remember,omitempty"` // RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. @@ -48,6 +49,39 @@ func NewAcceptOAuth2ConsentRequestWithDefaults() *AcceptOAuth2ConsentRequest { return &this } +// GetContext returns the Context field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AcceptOAuth2ConsentRequest) GetContext() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context 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 *AcceptOAuth2ConsentRequest) GetContextOk() (*interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return &o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *AcceptOAuth2ConsentRequest) HasContext() bool { + if o != nil && IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given interface{} and assigns it to the Context field. +func (o *AcceptOAuth2ConsentRequest) SetContext(v interface{}) { + o.Context = v +} + // GetGrantAccessTokenAudience returns the GrantAccessTokenAudience field value if set, zero value otherwise. func (o *AcceptOAuth2ConsentRequest) GetGrantAccessTokenAudience() []string { if o == nil || IsNil(o.GrantAccessTokenAudience) { @@ -250,6 +284,9 @@ func (o AcceptOAuth2ConsentRequest) MarshalJSON() ([]byte, error) { func (o AcceptOAuth2ConsentRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if o.Context != nil { + toSerialize["context"] = o.Context + } if !IsNil(o.GrantAccessTokenAudience) { toSerialize["grant_access_token_audience"] = o.GrantAccessTokenAudience } diff --git a/internal/httpclient/model_o_auth2_consent_session.go b/internal/httpclient/model_o_auth2_consent_session.go index f2e6c5c13ae..92772ab891f 100644 --- a/internal/httpclient/model_o_auth2_consent_session.go +++ b/internal/httpclient/model_o_auth2_consent_session.go @@ -22,6 +22,7 @@ var _ MappedNullable = &OAuth2ConsentSession{} // OAuth2ConsentSession A completed OAuth 2.0 Consent Session. type OAuth2ConsentSession struct { ConsentRequest *OAuth2ConsentRequest `json:"consent_request,omitempty"` + Context interface{} `json:"context,omitempty"` ExpiresAt *OAuth2ConsentSessionExpiresAt `json:"expires_at,omitempty"` GrantAccessTokenAudience []string `json:"grant_access_token_audience,omitempty"` GrantScope []string `json:"grant_scope,omitempty"` @@ -82,6 +83,39 @@ func (o *OAuth2ConsentSession) SetConsentRequest(v OAuth2ConsentRequest) { o.ConsentRequest = &v } +// GetContext returns the Context field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OAuth2ConsentSession) GetContext() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context 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 *OAuth2ConsentSession) GetContextOk() (*interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return &o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *OAuth2ConsentSession) HasContext() bool { + if o != nil && IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given interface{} and assigns it to the Context field. +func (o *OAuth2ConsentSession) SetContext(v interface{}) { + o.Context = v +} + // GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. func (o *OAuth2ConsentSession) GetExpiresAt() OAuth2ConsentSessionExpiresAt { if o == nil || IsNil(o.ExpiresAt) { @@ -319,6 +353,9 @@ func (o OAuth2ConsentSession) ToMap() (map[string]interface{}, error) { if !IsNil(o.ConsentRequest) { toSerialize["consent_request"] = o.ConsentRequest } + if o.Context != nil { + toSerialize["context"] = o.Context + } if !IsNil(o.ExpiresAt) { toSerialize["expires_at"] = o.ExpiresAt }