/* * 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" ) // PostCheckPermissionBody Check Permission using Post Request Body type PostCheckPermissionBody struct { // Namespace to query Namespace *string `json:"namespace,omitempty"` // Object to query Object *string `json:"object,omitempty"` // Relation to query Relation *string `json:"relation,omitempty"` // SubjectID to query Either SubjectSet or SubjectID can be provided. SubjectId *string `json:"subject_id,omitempty"` SubjectSet *SubjectSet `json:"subject_set,omitempty"` } // NewPostCheckPermissionBody instantiates a new PostCheckPermissionBody 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 NewPostCheckPermissionBody() *PostCheckPermissionBody { this := PostCheckPermissionBody{} return &this } // NewPostCheckPermissionBodyWithDefaults instantiates a new PostCheckPermissionBody 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 NewPostCheckPermissionBodyWithDefaults() *PostCheckPermissionBody { this := PostCheckPermissionBody{} return &this } // GetNamespace returns the Namespace field value if set, zero value otherwise. func (o *PostCheckPermissionBody) GetNamespace() string { if o == nil || o.Namespace == nil { var ret string return ret } return *o.Namespace } // GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PostCheckPermissionBody) GetNamespaceOk() (*string, bool) { if o == nil || o.Namespace == nil { return nil, false } return o.Namespace, true } // HasNamespace returns a boolean if a field has been set. func (o *PostCheckPermissionBody) HasNamespace() bool { if o != nil && o.Namespace != nil { return true } return false } // SetNamespace gets a reference to the given string and assigns it to the Namespace field. func (o *PostCheckPermissionBody) SetNamespace(v string) { o.Namespace = &v } // GetObject returns the Object field value if set, zero value otherwise. func (o *PostCheckPermissionBody) GetObject() string { if o == nil || o.Object == nil { var ret string return ret } return *o.Object } // GetObjectOk returns a tuple with the Object field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PostCheckPermissionBody) GetObjectOk() (*string, bool) { if o == nil || o.Object == nil { return nil, false } return o.Object, true } // HasObject returns a boolean if a field has been set. func (o *PostCheckPermissionBody) HasObject() bool { if o != nil && o.Object != nil { return true } return false } // SetObject gets a reference to the given string and assigns it to the Object field. func (o *PostCheckPermissionBody) SetObject(v string) { o.Object = &v } // GetRelation returns the Relation field value if set, zero value otherwise. func (o *PostCheckPermissionBody) GetRelation() string { if o == nil || o.Relation == nil { var ret string return ret } return *o.Relation } // GetRelationOk returns a tuple with the Relation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PostCheckPermissionBody) GetRelationOk() (*string, bool) { if o == nil || o.Relation == nil { return nil, false } return o.Relation, true } // HasRelation returns a boolean if a field has been set. func (o *PostCheckPermissionBody) HasRelation() bool { if o != nil && o.Relation != nil { return true } return false } // SetRelation gets a reference to the given string and assigns it to the Relation field. func (o *PostCheckPermissionBody) SetRelation(v string) { o.Relation = &v } // GetSubjectId returns the SubjectId field value if set, zero value otherwise. func (o *PostCheckPermissionBody) 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 *PostCheckPermissionBody) 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 *PostCheckPermissionBody) 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 *PostCheckPermissionBody) SetSubjectId(v string) { o.SubjectId = &v } // GetSubjectSet returns the SubjectSet field value if set, zero value otherwise. func (o *PostCheckPermissionBody) 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 *PostCheckPermissionBody) 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 *PostCheckPermissionBody) 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 *PostCheckPermissionBody) SetSubjectSet(v SubjectSet) { o.SubjectSet = &v } func (o PostCheckPermissionBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Namespace != nil { toSerialize["namespace"] = o.Namespace } if o.Object != nil { toSerialize["object"] = o.Object } if o.Relation != nil { 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 NullablePostCheckPermissionBody struct { value *PostCheckPermissionBody isSet bool } func (v NullablePostCheckPermissionBody) Get() *PostCheckPermissionBody { return v.value } func (v *NullablePostCheckPermissionBody) Set(val *PostCheckPermissionBody) { v.value = val v.isSet = true } func (v NullablePostCheckPermissionBody) IsSet() bool { return v.isSet } func (v *NullablePostCheckPermissionBody) Unset() { v.value = nil v.isSet = false } func NewNullablePostCheckPermissionBody(val *PostCheckPermissionBody) *NullablePostCheckPermissionBody { return &NullablePostCheckPermissionBody{value: val, isSet: true} } func (v NullablePostCheckPermissionBody) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullablePostCheckPermissionBody) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }