Skip to content

Commit

Permalink
fix: add yaml field to models
Browse files Browse the repository at this point in the history
  • Loading branch information
rhamzeh committed Oct 3, 2023
1 parent 857510d commit 5ba756a
Show file tree
Hide file tree
Showing 57 changed files with 137 additions and 137 deletions.
2 changes: 1 addition & 1 deletion model_any.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// Any struct for Any
type Any struct {
Type *string `json:"@type,omitempty"`
Type *string `json:"@type,omitempty"yaml:"@type,omitempty"`
}

// NewAny instantiates a new Any object
Expand Down
4 changes: 2 additions & 2 deletions model_assertion.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// Assertion struct for Assertion
type Assertion struct {
TupleKey CheckRequestTupleKey `json:"tuple_key"`
Expectation bool `json:"expectation"`
TupleKey CheckRequestTupleKey `json:"tuple_key"yaml:"tuple_key"`
Expectation bool `json:"expectation"yaml:"expectation"`
}

// NewAssertion instantiates a new Assertion object
Expand Down
8 changes: 4 additions & 4 deletions model_authorization_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (

// AuthorizationModel struct for AuthorizationModel
type AuthorizationModel struct {
Id *string `json:"id,omitempty"`
SchemaVersion string `json:"schema_version"`
TypeDefinitions *[]TypeDefinition `json:"type_definitions,omitempty"`
Conditions *map[string]Condition `json:"conditions,omitempty"`
Id *string `json:"id,omitempty"yaml:"id,omitempty"`
SchemaVersion string `json:"schema_version"yaml:"schema_version"`
TypeDefinitions *[]TypeDefinition `json:"type_definitions,omitempty"yaml:"type_definitions,omitempty"`
Conditions *map[string]Condition `json:"conditions,omitempty"yaml:"conditions,omitempty"`
}

// NewAuthorizationModel instantiates a new AuthorizationModel object
Expand Down
10 changes: 5 additions & 5 deletions model_check_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import (

// CheckRequest struct for CheckRequest
type CheckRequest struct {
TupleKey CheckRequestTupleKey `json:"tuple_key"`
ContextualTuples *ContextualTupleKeys `json:"contextual_tuples,omitempty"`
AuthorizationModelId *string `json:"authorization_model_id,omitempty"`
TupleKey CheckRequestTupleKey `json:"tuple_key"yaml:"tuple_key"`
ContextualTuples *ContextualTupleKeys `json:"contextual_tuples,omitempty"yaml:"contextual_tuples,omitempty"`
AuthorizationModelId *string `json:"authorization_model_id,omitempty"yaml:"authorization_model_id,omitempty"`
// Defaults to false. Making it true has performance implications.
Trace *bool `json:"trace,omitempty"`
Trace *bool `json:"trace,omitempty"yaml:"trace,omitempty"`
// Additional request context that will be used to evaluate any ABAC conditions encountered in the query evaluation.
Context *map[string]interface{} `json:"context,omitempty"`
Context *map[string]interface{} `json:"context,omitempty"yaml:"context,omitempty"`
}

// NewCheckRequest instantiates a new CheckRequest object
Expand Down
6 changes: 3 additions & 3 deletions model_check_request_tuple_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

// CheckRequestTupleKey struct for CheckRequestTupleKey
type CheckRequestTupleKey struct {
User string `json:"user"`
Relation string `json:"relation"`
Object string `json:"object"`
User string `json:"user"yaml:"user"`
Relation string `json:"relation"yaml:"relation"`
Object string `json:"object"yaml:"object"`
}

// NewCheckRequestTupleKey instantiates a new CheckRequestTupleKey object
Expand Down
4 changes: 2 additions & 2 deletions model_check_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

// CheckResponse struct for CheckResponse
type CheckResponse struct {
Allowed *bool `json:"allowed,omitempty"`
Allowed *bool `json:"allowed,omitempty"yaml:"allowed,omitempty"`
// For internal use only.
Resolution *string `json:"resolution,omitempty"`
Resolution *string `json:"resolution,omitempty"yaml:"resolution,omitempty"`
}

// NewCheckResponse instantiates a new CheckResponse object
Expand Down
2 changes: 1 addition & 1 deletion model_computed.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// Computed struct for Computed
type Computed struct {
Userset *string `json:"userset,omitempty"`
Userset *string `json:"userset,omitempty"yaml:"userset,omitempty"`
}

// NewComputed instantiates a new Computed object
Expand Down
6 changes: 3 additions & 3 deletions model_condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (

// Condition struct for Condition
type Condition struct {
Name string `json:"name"`
Name string `json:"name"yaml:"name"`
// A Google CEL expression, expressed as a string.
Expression string `json:"expression"`
Expression string `json:"expression"yaml:"expression"`
// A map of parameter names to the parameter's defined type reference.
Parameters *map[string]ConditionParamTypeRef `json:"parameters,omitempty"`
Parameters *map[string]ConditionParamTypeRef `json:"parameters,omitempty"yaml:"parameters,omitempty"`
}

// NewCondition instantiates a new Condition object
Expand Down
4 changes: 2 additions & 2 deletions model_condition_param_type_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// ConditionParamTypeRef struct for ConditionParamTypeRef
type ConditionParamTypeRef struct {
TypeName TypeName `json:"type_name"`
GenericTypes *[]ConditionParamTypeRef `json:"generic_types,omitempty"`
TypeName TypeName `json:"type_name"yaml:"type_name"`
GenericTypes *[]ConditionParamTypeRef `json:"generic_types,omitempty"yaml:"generic_types,omitempty"`
}

// NewConditionParamTypeRef instantiates a new ConditionParamTypeRef object
Expand Down
2 changes: 1 addition & 1 deletion model_contextual_tuple_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// ContextualTupleKeys struct for ContextualTupleKeys
type ContextualTupleKeys struct {
TupleKeys []TupleKey `json:"tuple_keys"`
TupleKeys []TupleKey `json:"tuple_keys"yaml:"tuple_keys"`
}

// NewContextualTupleKeys instantiates a new ContextualTupleKeys object
Expand Down
2 changes: 1 addition & 1 deletion model_create_store_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// CreateStoreRequest struct for CreateStoreRequest
type CreateStoreRequest struct {
Name string `json:"name"`
Name string `json:"name"yaml:"name"`
}

// NewCreateStoreRequest instantiates a new CreateStoreRequest object
Expand Down
8 changes: 4 additions & 4 deletions model_create_store_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (

// CreateStoreResponse struct for CreateStoreResponse
type CreateStoreResponse struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Id *string `json:"id,omitempty"yaml:"id,omitempty"`
Name *string `json:"name,omitempty"yaml:"name,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"yaml:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"yaml:"updated_at,omitempty"`
}

// NewCreateStoreResponse instantiates a new CreateStoreResponse object
Expand Down
4 changes: 2 additions & 2 deletions model_difference.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// Difference struct for Difference
type Difference struct {
Base Userset `json:"base"`
Subtract Userset `json:"subtract"`
Base Userset `json:"base"yaml:"base"`
Subtract Userset `json:"subtract"yaml:"subtract"`
}

// NewDifference instantiates a new Difference object
Expand Down
4 changes: 2 additions & 2 deletions model_expand_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// ExpandRequest struct for ExpandRequest
type ExpandRequest struct {
TupleKey ExpandRequestTupleKey `json:"tuple_key"`
AuthorizationModelId *string `json:"authorization_model_id,omitempty"`
TupleKey ExpandRequestTupleKey `json:"tuple_key"yaml:"tuple_key"`
AuthorizationModelId *string `json:"authorization_model_id,omitempty"yaml:"authorization_model_id,omitempty"`
}

// NewExpandRequest instantiates a new ExpandRequest object
Expand Down
4 changes: 2 additions & 2 deletions model_expand_request_tuple_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// ExpandRequestTupleKey struct for ExpandRequestTupleKey
type ExpandRequestTupleKey struct {
Relation string `json:"relation"`
Object string `json:"object"`
Relation string `json:"relation"yaml:"relation"`
Object string `json:"object"yaml:"object"`
}

// NewExpandRequestTupleKey instantiates a new ExpandRequestTupleKey object
Expand Down
2 changes: 1 addition & 1 deletion model_expand_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// ExpandResponse struct for ExpandResponse
type ExpandResponse struct {
Tree *UsersetTree `json:"tree,omitempty"`
Tree *UsersetTree `json:"tree,omitempty"yaml:"tree,omitempty"`
}

// NewExpandResponse instantiates a new ExpandResponse object
Expand Down
8 changes: 4 additions & 4 deletions model_get_store_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (

// GetStoreResponse struct for GetStoreResponse
type GetStoreResponse struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Id *string `json:"id,omitempty"yaml:"id,omitempty"`
Name *string `json:"name,omitempty"yaml:"name,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"yaml:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"yaml:"updated_at,omitempty"`
}

// NewGetStoreResponse instantiates a new GetStoreResponse object
Expand Down
4 changes: 2 additions & 2 deletions model_internal_error_message_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// InternalErrorMessageResponse struct for InternalErrorMessageResponse
type InternalErrorMessageResponse struct {
Code *InternalErrorCode `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Code *InternalErrorCode `json:"code,omitempty"yaml:"code,omitempty"`
Message *string `json:"message,omitempty"yaml:"message,omitempty"`
}

// NewInternalErrorMessageResponse instantiates a new InternalErrorMessageResponse object
Expand Down
6 changes: 3 additions & 3 deletions model_leaf.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

// Leaf A leaf node contains either - a set of users (which may be individual users, or usersets referencing other relations) - a computed node, which is the result of a computed userset value in the authorization model - a tupleToUserset nodes, containing the result of expanding a tupleToUserset value in a authorization model.
type Leaf struct {
Users *Users `json:"users,omitempty"`
Computed *Computed `json:"computed,omitempty"`
TupleToUserset *UsersetTreeTupleToUserset `json:"tupleToUserset,omitempty"`
Users *Users `json:"users,omitempty"yaml:"users,omitempty"`
Computed *Computed `json:"computed,omitempty"yaml:"computed,omitempty"`
TupleToUserset *UsersetTreeTupleToUserset `json:"tupleToUserset,omitempty"yaml:"tupleToUserset,omitempty"`
}

// NewLeaf instantiates a new Leaf object
Expand Down
12 changes: 6 additions & 6 deletions model_list_objects_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import (

// ListObjectsRequest struct for ListObjectsRequest
type ListObjectsRequest struct {
AuthorizationModelId *string `json:"authorization_model_id,omitempty"`
Type string `json:"type"`
Relation string `json:"relation"`
User string `json:"user"`
ContextualTuples *ContextualTupleKeys `json:"contextual_tuples,omitempty"`
AuthorizationModelId *string `json:"authorization_model_id,omitempty"yaml:"authorization_model_id,omitempty"`
Type string `json:"type"yaml:"type"`
Relation string `json:"relation"yaml:"relation"`
User string `json:"user"yaml:"user"`
ContextualTuples *ContextualTupleKeys `json:"contextual_tuples,omitempty"yaml:"contextual_tuples,omitempty"`
// Additional request context that will be used to evaluate any ABAC conditions encountered in the query evaluation.
Context *map[string]interface{} `json:"context,omitempty"`
Context *map[string]interface{} `json:"context,omitempty"yaml:"context,omitempty"`
}

// NewListObjectsRequest instantiates a new ListObjectsRequest object
Expand Down
2 changes: 1 addition & 1 deletion model_list_objects_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// ListObjectsResponse struct for ListObjectsResponse
type ListObjectsResponse struct {
Objects *[]string `json:"objects,omitempty"`
Objects *[]string `json:"objects,omitempty"yaml:"objects,omitempty"`
}

// NewListObjectsResponse instantiates a new ListObjectsResponse object
Expand Down
4 changes: 2 additions & 2 deletions model_list_stores_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

// ListStoresResponse struct for ListStoresResponse
type ListStoresResponse struct {
Stores *[]Store `json:"stores,omitempty"`
Stores *[]Store `json:"stores,omitempty"yaml:"stores,omitempty"`
// The continuation token will be empty if there are no more stores.
ContinuationToken *string `json:"continuation_token,omitempty"`
ContinuationToken *string `json:"continuation_token,omitempty"yaml:"continuation_token,omitempty"`
}

// NewListStoresResponse instantiates a new ListStoresResponse object
Expand Down
2 changes: 1 addition & 1 deletion model_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// Metadata struct for Metadata
type Metadata struct {
Relations *map[string]RelationMetadata `json:"relations,omitempty"`
Relations *map[string]RelationMetadata `json:"relations,omitempty"yaml:"relations,omitempty"`
}

// NewMetadata instantiates a new Metadata object
Expand Down
10 changes: 5 additions & 5 deletions model_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (

// Node struct for Node
type Node struct {
Name *string `json:"name,omitempty"`
Leaf *Leaf `json:"leaf,omitempty"`
Difference *UsersetTreeDifference `json:"difference,omitempty"`
Union *Nodes `json:"union,omitempty"`
Intersection *Nodes `json:"intersection,omitempty"`
Name *string `json:"name,omitempty"yaml:"name,omitempty"`
Leaf *Leaf `json:"leaf,omitempty"yaml:"leaf,omitempty"`
Difference *UsersetTreeDifference `json:"difference,omitempty"yaml:"difference,omitempty"`
Union *Nodes `json:"union,omitempty"yaml:"union,omitempty"`
Intersection *Nodes `json:"intersection,omitempty"yaml:"intersection,omitempty"`
}

// NewNode instantiates a new Node object
Expand Down
2 changes: 1 addition & 1 deletion model_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// Nodes struct for Nodes
type Nodes struct {
Nodes *[]Node `json:"nodes,omitempty"`
Nodes *[]Node `json:"nodes,omitempty"yaml:"nodes,omitempty"`
}

// NewNodes instantiates a new Nodes object
Expand Down
4 changes: 2 additions & 2 deletions model_object_relation.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// ObjectRelation struct for ObjectRelation
type ObjectRelation struct {
Object *string `json:"object,omitempty"`
Relation *string `json:"relation,omitempty"`
Object *string `json:"object,omitempty"yaml:"object,omitempty"`
Relation *string `json:"relation,omitempty"yaml:"relation,omitempty"`
}

// NewObjectRelation instantiates a new ObjectRelation object
Expand Down
4 changes: 2 additions & 2 deletions model_path_unknown_error_message_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// PathUnknownErrorMessageResponse struct for PathUnknownErrorMessageResponse
type PathUnknownErrorMessageResponse struct {
Code *NotFoundErrorCode `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Code *NotFoundErrorCode `json:"code,omitempty"yaml:"code,omitempty"`
Message *string `json:"message,omitempty"yaml:"message,omitempty"`
}

// NewPathUnknownErrorMessageResponse instantiates a new PathUnknownErrorMessageResponse object
Expand Down
4 changes: 2 additions & 2 deletions model_read_assertions_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

// ReadAssertionsResponse struct for ReadAssertionsResponse
type ReadAssertionsResponse struct {
AuthorizationModelId *string `json:"authorization_model_id,omitempty"`
Assertions *[]Assertion `json:"assertions,omitempty"`
AuthorizationModelId *string `json:"authorization_model_id,omitempty"yaml:"authorization_model_id,omitempty"`
Assertions *[]Assertion `json:"assertions,omitempty"yaml:"assertions,omitempty"`
}

// NewReadAssertionsResponse instantiates a new ReadAssertionsResponse object
Expand Down
2 changes: 1 addition & 1 deletion model_read_authorization_model_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

// ReadAuthorizationModelResponse struct for ReadAuthorizationModelResponse
type ReadAuthorizationModelResponse struct {
AuthorizationModel *AuthorizationModel `json:"authorization_model,omitempty"`
AuthorizationModel *AuthorizationModel `json:"authorization_model,omitempty"yaml:"authorization_model,omitempty"`
}

// NewReadAuthorizationModelResponse instantiates a new ReadAuthorizationModelResponse object
Expand Down
4 changes: 2 additions & 2 deletions model_read_authorization_models_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

// ReadAuthorizationModelsResponse struct for ReadAuthorizationModelsResponse
type ReadAuthorizationModelsResponse struct {
AuthorizationModels *[]AuthorizationModel `json:"authorization_models,omitempty"`
AuthorizationModels *[]AuthorizationModel `json:"authorization_models,omitempty"yaml:"authorization_models,omitempty"`
// The continuation token will be empty if there are no more models.
ContinuationToken *string `json:"continuation_token,omitempty"`
ContinuationToken *string `json:"continuation_token,omitempty"yaml:"continuation_token,omitempty"`
}

// NewReadAuthorizationModelsResponse instantiates a new ReadAuthorizationModelsResponse object
Expand Down
4 changes: 2 additions & 2 deletions model_read_changes_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

// ReadChangesResponse struct for ReadChangesResponse
type ReadChangesResponse struct {
Changes *[]TupleChange `json:"changes,omitempty"`
Changes *[]TupleChange `json:"changes,omitempty"yaml:"changes,omitempty"`
// The continuation token will be identical if there are no new changes.
ContinuationToken *string `json:"continuation_token,omitempty"`
ContinuationToken *string `json:"continuation_token,omitempty"yaml:"continuation_token,omitempty"`
}

// NewReadChangesResponse instantiates a new ReadChangesResponse object
Expand Down
6 changes: 3 additions & 3 deletions model_read_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

// ReadRequest struct for ReadRequest
type ReadRequest struct {
TupleKey *ReadRequestTupleKey `json:"tuple_key,omitempty"`
PageSize *int32 `json:"page_size,omitempty"`
ContinuationToken *string `json:"continuation_token,omitempty"`
TupleKey *ReadRequestTupleKey `json:"tuple_key,omitempty"yaml:"tuple_key,omitempty"`
PageSize *int32 `json:"page_size,omitempty"yaml:"page_size,omitempty"`
ContinuationToken *string `json:"continuation_token,omitempty"yaml:"continuation_token,omitempty"`
}

// NewReadRequest instantiates a new ReadRequest object
Expand Down
6 changes: 3 additions & 3 deletions model_read_request_tuple_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

// ReadRequestTupleKey struct for ReadRequestTupleKey
type ReadRequestTupleKey struct {
User *string `json:"user,omitempty"`
Relation *string `json:"relation,omitempty"`
Object *string `json:"object,omitempty"`
User *string `json:"user,omitempty"yaml:"user,omitempty"`
Relation *string `json:"relation,omitempty"yaml:"relation,omitempty"`
Object *string `json:"object,omitempty"yaml:"object,omitempty"`
}

// NewReadRequestTupleKey instantiates a new ReadRequestTupleKey object
Expand Down
Loading

0 comments on commit 5ba756a

Please sign in to comment.