snapshot of https://github.com/ory/keto.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
CI / Run lints and checks (push) Failing after 47s
CI / Run tests (push) Failing after 1s
CI / Run race tests (push) Failing after 5s
CI / Build CLI docs (push) Has been skipped
CI / Run buf actions (push) Failing after 5s
CodeQL / Analyze (go) (push) Failing after 3s
CodeQL / Analyze (javascript) (push) Failing after 2s
Docker Image Scanners / scanners (push) Failing after 3s
Format / format (push) Failing after 3s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Draft newsletter (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
Some checks failed
CI / Run lints and checks (push) Failing after 47s
CI / Run tests (push) Failing after 1s
CI / Run race tests (push) Failing after 5s
CI / Build CLI docs (push) Has been skipped
CI / Run buf actions (push) Failing after 5s
CodeQL / Analyze (go) (push) Failing after 3s
CodeQL / Analyze (javascript) (push) Failing after 2s
Docker Image Scanners / scanners (push) Failing after 3s
Format / format (push) Failing after 3s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Draft newsletter (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
This commit is contained in:
367
internal/httpclient/model_generic_error.go
generated
Normal file
367
internal/httpclient/model_generic_error.go
generated
Normal file
@@ -0,0 +1,367 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// GenericError struct for GenericError
|
||||
type GenericError struct {
|
||||
// The status code
|
||||
Code *int64 `json:"code,omitempty"`
|
||||
// Debug information This field is often not exposed to protect against leaking sensitive information.
|
||||
Debug *string `json:"debug,omitempty"`
|
||||
// Further error details
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
// The error ID Useful when trying to identify various errors in application logic.
|
||||
Id *string `json:"id,omitempty"`
|
||||
// Error message The error's message.
|
||||
Message string `json:"message"`
|
||||
// A human-readable reason for the error
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
|
||||
Request *string `json:"request,omitempty"`
|
||||
// The status description
|
||||
Status *string `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NewGenericError instantiates a new GenericError 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 NewGenericError(message string) *GenericError {
|
||||
this := GenericError{}
|
||||
this.Message = message
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGenericErrorWithDefaults instantiates a new GenericError 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 NewGenericErrorWithDefaults() *GenericError {
|
||||
this := GenericError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCode returns the Code field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetCode() int64 {
|
||||
if o == nil || o.Code == nil {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Code
|
||||
}
|
||||
|
||||
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetCodeOk() (*int64, bool) {
|
||||
if o == nil || o.Code == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Code, true
|
||||
}
|
||||
|
||||
// HasCode returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasCode() bool {
|
||||
if o != nil && o.Code != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCode gets a reference to the given int64 and assigns it to the Code field.
|
||||
func (o *GenericError) SetCode(v int64) {
|
||||
o.Code = &v
|
||||
}
|
||||
|
||||
// GetDebug returns the Debug field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetDebug() string {
|
||||
if o == nil || o.Debug == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Debug
|
||||
}
|
||||
|
||||
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetDebugOk() (*string, bool) {
|
||||
if o == nil || o.Debug == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Debug, true
|
||||
}
|
||||
|
||||
// HasDebug returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasDebug() bool {
|
||||
if o != nil && o.Debug != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDebug gets a reference to the given string and assigns it to the Debug field.
|
||||
func (o *GenericError) SetDebug(v string) {
|
||||
o.Debug = &v
|
||||
}
|
||||
|
||||
// GetDetails returns the Details field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetDetails() map[string]interface{} {
|
||||
if o == nil || o.Details == nil {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Details
|
||||
}
|
||||
|
||||
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetDetailsOk() (map[string]interface{}, bool) {
|
||||
if o == nil || o.Details == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Details, true
|
||||
}
|
||||
|
||||
// HasDetails returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasDetails() bool {
|
||||
if o != nil && o.Details != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
|
||||
func (o *GenericError) SetDetails(v map[string]interface{}) {
|
||||
o.Details = v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetId() string {
|
||||
if o == nil || o.Id == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetIdOk() (*string, bool) {
|
||||
if o == nil || o.Id == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasId() bool {
|
||||
if o != nil && o.Id != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *GenericError) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetMessage returns the Message field value
|
||||
func (o *GenericError) GetMessage() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Message
|
||||
}
|
||||
|
||||
// GetMessageOk returns a tuple with the Message field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetMessageOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Message, true
|
||||
}
|
||||
|
||||
// SetMessage sets field value
|
||||
func (o *GenericError) SetMessage(v string) {
|
||||
o.Message = v
|
||||
}
|
||||
|
||||
// GetReason returns the Reason field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetReason() string {
|
||||
if o == nil || o.Reason == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Reason
|
||||
}
|
||||
|
||||
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetReasonOk() (*string, bool) {
|
||||
if o == nil || o.Reason == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Reason, true
|
||||
}
|
||||
|
||||
// HasReason returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasReason() bool {
|
||||
if o != nil && o.Reason != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetReason gets a reference to the given string and assigns it to the Reason field.
|
||||
func (o *GenericError) SetReason(v string) {
|
||||
o.Reason = &v
|
||||
}
|
||||
|
||||
// GetRequest returns the Request field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetRequest() string {
|
||||
if o == nil || o.Request == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Request
|
||||
}
|
||||
|
||||
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetRequestOk() (*string, bool) {
|
||||
if o == nil || o.Request == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Request, true
|
||||
}
|
||||
|
||||
// HasRequest returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasRequest() bool {
|
||||
if o != nil && o.Request != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRequest gets a reference to the given string and assigns it to the Request field.
|
||||
func (o *GenericError) SetRequest(v string) {
|
||||
o.Request = &v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetStatus() string {
|
||||
if o == nil || o.Status == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetStatusOk() (*string, bool) {
|
||||
if o == nil || o.Status == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasStatus() bool {
|
||||
if o != nil && o.Status != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *GenericError) SetStatus(v string) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o GenericError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Code != nil {
|
||||
toSerialize["code"] = o.Code
|
||||
}
|
||||
if o.Debug != nil {
|
||||
toSerialize["debug"] = o.Debug
|
||||
}
|
||||
if o.Details != nil {
|
||||
toSerialize["details"] = o.Details
|
||||
}
|
||||
if o.Id != nil {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if true {
|
||||
toSerialize["message"] = o.Message
|
||||
}
|
||||
if o.Reason != nil {
|
||||
toSerialize["reason"] = o.Reason
|
||||
}
|
||||
if o.Request != nil {
|
||||
toSerialize["request"] = o.Request
|
||||
}
|
||||
if o.Status != nil {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableGenericError struct {
|
||||
value *GenericError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGenericError) Get() *GenericError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) Set(val *GenericError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGenericError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGenericError(val *GenericError) *NullableGenericError {
|
||||
return &NullableGenericError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGenericError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Reference in New Issue
Block a user