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:
241
internal/httpclient/model_relationship.go
generated
Normal file
241
internal/httpclient/model_relationship.go
generated
Normal file
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
* 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"
|
||||
)
|
||||
|
||||
// Relationship Relationship
|
||||
type Relationship struct {
|
||||
// Namespace of the Relation Tuple
|
||||
Namespace string `json:"namespace"`
|
||||
// Object of the Relation Tuple
|
||||
Object string `json:"object"`
|
||||
// Relation of the Relation Tuple
|
||||
Relation string `json:"relation"`
|
||||
// SubjectID of the Relation Tuple Either SubjectSet or SubjectID can be provided.
|
||||
SubjectId *string `json:"subject_id,omitempty"`
|
||||
SubjectSet *SubjectSet `json:"subject_set,omitempty"`
|
||||
}
|
||||
|
||||
// NewRelationship instantiates a new Relationship 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 NewRelationship(namespace string, object string, relation string) *Relationship {
|
||||
this := Relationship{}
|
||||
this.Namespace = namespace
|
||||
this.Object = object
|
||||
this.Relation = relation
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRelationshipWithDefaults instantiates a new Relationship 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 NewRelationshipWithDefaults() *Relationship {
|
||||
this := Relationship{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNamespace returns the Namespace field value
|
||||
func (o *Relationship) GetNamespace() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Namespace
|
||||
}
|
||||
|
||||
// GetNamespaceOk returns a tuple with the Namespace field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetNamespaceOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Namespace, true
|
||||
}
|
||||
|
||||
// SetNamespace sets field value
|
||||
func (o *Relationship) SetNamespace(v string) {
|
||||
o.Namespace = v
|
||||
}
|
||||
|
||||
// GetObject returns the Object field value
|
||||
func (o *Relationship) GetObject() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Object
|
||||
}
|
||||
|
||||
// GetObjectOk returns a tuple with the Object field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetObjectOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Object, true
|
||||
}
|
||||
|
||||
// SetObject sets field value
|
||||
func (o *Relationship) SetObject(v string) {
|
||||
o.Object = v
|
||||
}
|
||||
|
||||
// GetRelation returns the Relation field value
|
||||
func (o *Relationship) GetRelation() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Relation
|
||||
}
|
||||
|
||||
// GetRelationOk returns a tuple with the Relation field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetRelationOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Relation, true
|
||||
}
|
||||
|
||||
// SetRelation sets field value
|
||||
func (o *Relationship) SetRelation(v string) {
|
||||
o.Relation = v
|
||||
}
|
||||
|
||||
// GetSubjectId returns the SubjectId field value if set, zero value otherwise.
|
||||
func (o *Relationship) GetSubjectId() string {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectId
|
||||
}
|
||||
|
||||
// GetSubjectIdOk returns a tuple with the SubjectId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetSubjectIdOk() (*string, bool) {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectId, true
|
||||
}
|
||||
|
||||
// HasSubjectId returns a boolean if a field has been set.
|
||||
func (o *Relationship) HasSubjectId() bool {
|
||||
if o != nil && o.SubjectId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectId gets a reference to the given string and assigns it to the SubjectId field.
|
||||
func (o *Relationship) SetSubjectId(v string) {
|
||||
o.SubjectId = &v
|
||||
}
|
||||
|
||||
// GetSubjectSet returns the SubjectSet field value if set, zero value otherwise.
|
||||
func (o *Relationship) GetSubjectSet() SubjectSet {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
var ret SubjectSet
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectSet
|
||||
}
|
||||
|
||||
// GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetSubjectSetOk() (*SubjectSet, bool) {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectSet, true
|
||||
}
|
||||
|
||||
// HasSubjectSet returns a boolean if a field has been set.
|
||||
func (o *Relationship) HasSubjectSet() bool {
|
||||
if o != nil && o.SubjectSet != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field.
|
||||
func (o *Relationship) SetSubjectSet(v SubjectSet) {
|
||||
o.SubjectSet = &v
|
||||
}
|
||||
|
||||
func (o Relationship) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["namespace"] = o.Namespace
|
||||
}
|
||||
if true {
|
||||
toSerialize["object"] = o.Object
|
||||
}
|
||||
if true {
|
||||
toSerialize["relation"] = o.Relation
|
||||
}
|
||||
if o.SubjectId != nil {
|
||||
toSerialize["subject_id"] = o.SubjectId
|
||||
}
|
||||
if o.SubjectSet != nil {
|
||||
toSerialize["subject_set"] = o.SubjectSet
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableRelationship struct {
|
||||
value *Relationship
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRelationship) Get() *Relationship {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRelationship) Set(val *Relationship) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRelationship) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRelationship) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRelationship(val *Relationship) *NullableRelationship {
|
||||
return &NullableRelationship{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRelationship) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRelationship) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Reference in New Issue
Block a user