├── .codecov.yml ├── .fossa.yml ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ ├── config.yaml │ └── feature_request.yaml ├── dependabot.yaml ├── dependabot.yml └── workflows │ ├── main.yaml │ └── semgrep.yaml ├── .gitignore ├── .openapi-generator-ignore ├── .openapi-generator ├── FILES └── VERSION ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE.txt ├── README.md ├── api_client.go ├── api_client_test.go ├── api_open_fga.go ├── api_open_fga_test.go ├── client ├── client.go ├── client_test.go └── errors.go ├── configuration.go ├── credentials └── credentials.go ├── docs ├── AbortedMessageResponse.md ├── Any.md ├── Assertion.md ├── AssertionTupleKey.md ├── AuthErrorCode.md ├── AuthorizationModel.md ├── BatchCheckItem.md ├── BatchCheckRequest.md ├── BatchCheckResponse.md ├── BatchCheckSingleResult.md ├── CheckError.md ├── CheckRequest.md ├── CheckRequestTupleKey.md ├── CheckResponse.md ├── Computed.md ├── Condition.md ├── ConditionMetadata.md ├── ConditionParamTypeRef.md ├── ConsistencyPreference.md ├── ContextualTupleKeys.md ├── CreateStoreRequest.md ├── CreateStoreResponse.md ├── Difference.md ├── ErrorCode.md ├── ExpandRequest.md ├── ExpandRequestTupleKey.md ├── ExpandResponse.md ├── FgaObject.md ├── ForbiddenResponse.md ├── GetStoreResponse.md ├── InternalErrorCode.md ├── InternalErrorMessageResponse.md ├── Leaf.md ├── ListObjectsRequest.md ├── ListObjectsResponse.md ├── ListStoresResponse.md ├── ListUsersRequest.md ├── ListUsersResponse.md ├── Metadata.md ├── Node.md ├── Nodes.md ├── NotFoundErrorCode.md ├── NullValue.md ├── ObjectRelation.md ├── OpenFgaApi.md ├── OpenTelemetry.md ├── PathUnknownErrorMessageResponse.md ├── ReadAssertionsResponse.md ├── ReadAuthorizationModelResponse.md ├── ReadAuthorizationModelsResponse.md ├── ReadChangesResponse.md ├── ReadRequest.md ├── ReadRequestTupleKey.md ├── ReadResponse.md ├── RelationMetadata.md ├── RelationReference.md ├── RelationshipCondition.md ├── SourceInfo.md ├── Status.md ├── Store.md ├── Tuple.md ├── TupleChange.md ├── TupleKey.md ├── TupleKeyWithoutCondition.md ├── TupleOperation.md ├── TupleToUserset.md ├── TypeDefinition.md ├── TypeName.md ├── TypedWildcard.md ├── UnauthenticatedResponse.md ├── UnprocessableContentErrorCode.md ├── UnprocessableContentMessageResponse.md ├── User.md ├── UserTypeFilter.md ├── Users.md ├── Userset.md ├── UsersetTree.md ├── UsersetTreeDifference.md ├── UsersetTreeTupleToUserset.md ├── UsersetUser.md ├── Usersets.md ├── ValidationErrorMessageResponse.md ├── WriteAssertionsRequest.md ├── WriteAuthorizationModelRequest.md ├── WriteAuthorizationModelResponse.md ├── WriteRequest.md ├── WriteRequestDeletes.md └── WriteRequestWrites.md ├── errors.go ├── example ├── Makefile ├── README.md ├── example1 │ ├── example1.go │ ├── go.mod │ └── go.sum └── opentelemetry │ ├── go.mod │ └── main.go ├── go.mod ├── go.sum ├── internal └── utils │ ├── retryutils │ ├── retryparams.go │ ├── retryparams_test.go │ ├── retryutils.go │ └── retryutils_test.go │ ├── ulid.go │ └── ulid_test.go ├── model_aborted_message_response.go ├── model_any.go ├── model_assertion.go ├── model_assertion_tuple_key.go ├── model_auth_error_code.go ├── model_authorization_model.go ├── model_batch_check_item.go ├── model_batch_check_request.go ├── model_batch_check_response.go ├── model_batch_check_single_result.go ├── model_check_error.go ├── model_check_request.go ├── model_check_request_tuple_key.go ├── model_check_response.go ├── model_computed.go ├── model_condition.go ├── model_condition_metadata.go ├── model_condition_param_type_ref.go ├── model_consistency_preference.go ├── model_contextual_tuple_keys.go ├── model_create_store_request.go ├── model_create_store_response.go ├── model_difference.go ├── model_error_code.go ├── model_expand_request.go ├── model_expand_request_tuple_key.go ├── model_expand_response.go ├── model_fga_object.go ├── model_forbidden_response.go ├── model_get_store_response.go ├── model_internal_error_code.go ├── model_internal_error_message_response.go ├── model_leaf.go ├── model_list_objects_request.go ├── model_list_objects_response.go ├── model_list_stores_response.go ├── model_list_users_request.go ├── model_list_users_response.go ├── model_metadata.go ├── model_node.go ├── model_nodes.go ├── model_not_found_error_code.go ├── model_null_value.go ├── model_object_relation.go ├── model_path_unknown_error_message_response.go ├── model_read_assertions_response.go ├── model_read_authorization_model_response.go ├── model_read_authorization_models_response.go ├── model_read_changes_response.go ├── model_read_request.go ├── model_read_request_tuple_key.go ├── model_read_response.go ├── model_relation_metadata.go ├── model_relation_reference.go ├── model_relationship_condition.go ├── model_source_info.go ├── model_status.go ├── model_store.go ├── model_tuple.go ├── model_tuple_change.go ├── model_tuple_key.go ├── model_tuple_key_without_condition.go ├── model_tuple_operation.go ├── model_tuple_to_userset.go ├── model_type_definition.go ├── model_type_name.go ├── model_typed_wildcard.go ├── model_unauthenticated_response.go ├── model_unprocessable_content_error_code.go ├── model_unprocessable_content_message_response.go ├── model_user.go ├── model_user_type_filter.go ├── model_users.go ├── model_userset.go ├── model_userset_tree.go ├── model_userset_tree_difference.go ├── model_userset_tree_tuple_to_userset.go ├── model_userset_user.go ├── model_usersets.go ├── model_validation_error_message_response.go ├── model_write_assertions_request.go ├── model_write_authorization_model_request.go ├── model_write_authorization_model_response.go ├── model_write_request.go ├── model_write_request_deletes.go ├── model_write_request_writes.go ├── oauth2 ├── LICENSE ├── ORIGINAL_AUTHORS ├── ORIGINAL_CONTRIBUTORS ├── README.md ├── clientcredentials │ ├── clientcredentials.go │ └── clientcredentials_test.go ├── internal │ ├── doc.go │ ├── token.go │ ├── token_test.go │ └── transport.go ├── oauth2.go ├── oauth2_test.go ├── token.go ├── token_test.go ├── transport.go └── transport_test.go ├── response.go ├── telemetry ├── attribute.go ├── attribute_test.go ├── attributes.go ├── attributes_test.go ├── configuration.go ├── configuration_test.go ├── counter.go ├── counter_test.go ├── counters.go ├── counters_test.go ├── histogram.go ├── histogram_test.go ├── histograms.go ├── histograms_test.go ├── interfaces.go ├── interfaces_test.go ├── metric.go ├── metric_test.go ├── metrics.go ├── metrics_test.go ├── telemetry.go └── telemetry_test.go └── utils.go /.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | precision: 2 3 | range: "60...80" 4 | round: down 5 | -------------------------------------------------------------------------------- /.fossa.yml: -------------------------------------------------------------------------------- 1 | version: 3 2 | 3 | server: https://app.fossa.com 4 | 5 | project: 6 | id: github.com/openfga/go-sdk 7 | name: github.com/openfga/go-sdk 8 | link: openfga.dev 9 | url: github.com/openfga/go-sdk 10 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @openfga/dx 2 | README.md @openfga/product @openfga/community @openfga/dx 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yaml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: 📖 OpenFGA's Documentation 4 | url: https://openfga.dev/docs 5 | about: Check OpenFGA's documentation for an in-depth overview 6 | - name: 👽 Community 7 | url: https://openfga.dev/community 8 | about: Join OpenFGA's community on Slack and GitHub Discussions 9 | - name: 📝 RFCs 10 | url: https://github.com/openfga/rfcs 11 | about: Check existing RFCs to understand where the project is headed 12 | - name: 💬 Discussions 13 | url: https://github.com/orgs/openfga/discussions 14 | about: Start a discussion about your authorization needs or questions 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yaml: -------------------------------------------------------------------------------- 1 | name: 🚀 Feature Request 2 | description: Suggest an idea or a feature for this project 3 | labels: [ "enhancement" ] 4 | 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to fill out this feature request! 10 | 11 | - type: checkboxes 12 | id: checklist 13 | attributes: 14 | label: Checklist 15 | options: 16 | - label: I agree to the terms within the [OpenFGA Code of Conduct](https://github.com/openfga/.github/blob/main/CODE_OF_CONDUCT.md). 17 | required: true 18 | 19 | - type: textarea 20 | id: description 21 | attributes: 22 | label: Describe the problem you'd like to have solved 23 | description: A clear and concise description of what the problem is. 24 | placeholder: My life would be a lot simpler if... 25 | validations: 26 | required: true 27 | 28 | - type: textarea 29 | id: ideal-solution 30 | attributes: 31 | label: Describe the ideal solution 32 | description: A clear and concise description of what you want to happen. 33 | validations: 34 | required: true 35 | 36 | - type: textarea 37 | id: alternatives-and-workarounds 38 | attributes: 39 | label: Alternatives and current workarounds 40 | description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place. 41 | validations: 42 | required: false 43 | 44 | - type: textarea 45 | id: references 46 | attributes: 47 | label: References 48 | description: Any references to other issues, PRs, documentation or other links 49 | validations: 50 | required: false 51 | 52 | - type: textarea 53 | id: additional-context 54 | attributes: 55 | label: Additional context 56 | description: Add any other context or screenshots about the feature request here. 57 | validations: 58 | required: false 59 | -------------------------------------------------------------------------------- /.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gomod" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | groups: 8 | dependencies: 9 | patterns: 10 | - "*" 11 | - package-ecosystem: "github-actions" 12 | directory: "/" 13 | schedule: 14 | interval: "weekly" 15 | groups: 16 | dependencies: 17 | patterns: 18 | - "*" 19 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gomod" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | groups: 8 | dependencies: 9 | patterns: 10 | - "*" 11 | - package-ecosystem: "github-actions" 12 | directory: "/" 13 | schedule: 14 | interval: "weekly" 15 | groups: 16 | dependencies: 17 | patterns: 18 | - "*" 19 | -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: Build, Test and Publish 2 | 3 | on: 4 | merge_group: 5 | push: 6 | pull_request: 7 | workflow_dispatch: 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 14 | with: 15 | fetch-depth: 0 16 | 17 | - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 18 | with: 19 | cache-dependency-path: "./go.sum" 20 | check-latest: true 21 | go-version: ">=1.22.2" 22 | 23 | - name: Build 24 | run: go build -v ./... 25 | 26 | - name: Test 27 | run: go test -race -coverprofile=coverage.txt -covermode=atomic -v ./... 28 | 29 | - name: Install govulncheck 30 | run: go install golang.org/x/vuln/cmd/govulncheck@latest 31 | 32 | - name: Run govulncheck 33 | run: govulncheck ./... 34 | 35 | - name: Upload coverage to Codecov 36 | uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 37 | continue-on-error: true 38 | with: 39 | token: ${{ secrets.CODECOV_TOKEN }} 40 | slug: openfga/go-sdk 41 | 42 | create-release: 43 | runs-on: ubuntu-latest 44 | if: startsWith(github.ref, 'refs/tags/v') 45 | needs: [test] 46 | 47 | steps: 48 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 49 | with: 50 | fetch-depth: 0 51 | 52 | - uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1 53 | with: 54 | version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ 55 | env: 56 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 57 | -------------------------------------------------------------------------------- /.github/workflows/semgrep.yaml: -------------------------------------------------------------------------------- 1 | name: Semgrep 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | semgrep: 8 | name: Scan 9 | runs-on: ubuntu-latest 10 | container: 11 | image: returntocorp/semgrep 12 | if: (github.actor != 'dependabot[bot]' && github.actor != 'snyk-bot') 13 | steps: 14 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 15 | with: 16 | fetch-depth: 0 17 | - run: semgrep ci --no-suppress-errors 18 | env: 19 | SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | coverage.txt 27 | 28 | 29 | # IDEs 30 | .idea 31 | .vscode 32 | .sublime-workspace 33 | .sublime-project 34 | .idea/ 35 | .vscode/ 36 | 37 | # Possible credential files 38 | .env 39 | credentials.json 40 | 41 | # git conflict leftover files 42 | *.orig 43 | 44 | # Mac 45 | .DS_Store 46 | 47 | VERSION.txt 48 | git_push.sh 49 | -------------------------------------------------------------------------------- /.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | api/openapi.yaml 3 | test/api_open_fga_test.go 4 | client.go 5 | -------------------------------------------------------------------------------- /.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 6.4.0 -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to OpenFGA projects 2 | 3 | A big welcome and thank you for considering contributing to the OpenFGA open source projects. It’s people like you that make it a reality for users in our community. 4 | 5 | Reading and following these guidelines will help us make the contribution process easy and effective for everyone involved. It also communicates that you agree to respect the time of the developers managing and developing these open source projects. In return, we will reciprocate that respect by addressing your issue, assessing changes, and helping you finalize your pull requests. 6 | 7 | ### Table of Contents 8 | 9 | * [Code of Conduct](#code-of-conduct) 10 | * [Getting Started](#getting-started) 11 | * [Making Changes](#making-changes) 12 | * [Opening Issues](#opening-issues) 13 | * [Submitting Pull Requests](#submitting-pull-requests) [Note: We are not accepting Pull Requests at this time!] 14 | * [Getting in Touch](#getting-in-touch) 15 | * [Have a question or problem?](#have-a-question-or-problem) 16 | * [Vulnerability Reporting](#vulnerability-reporting) 17 | 18 | ## Code of Conduct 19 | 20 | By participating and contributing to this project, you are expected to uphold our [Code of Conduct](https://github.com/openfga/.github/blob/main/CODE_OF_CONDUCT.md). 21 | 22 | ## Getting Started 23 | 24 | ### Making Changes 25 | 26 | When contributing to a repository, the first step is to open an issue on [sdk-generator](https://github.com/openfga/sdk-generator) to discuss the change you wish to make before making them. 27 | 28 | ### Opening Issues 29 | 30 | Before you submit a new issue please make sure to search all open and closed issues. It is possible your feature request/issue has already been answered. Make sure to also check the [OpenFGA discussions](https://github.com/orgs/openfga/discussions). 31 | 32 | That repo includes an issue template that will walk through all the places to check before submitting your issue here. Please follow the instructions there to make sure this is not a duplicate issue and that we have everything we need to research and reproduce this problem. 33 | 34 | ### Submitting Pull Requests 35 | 36 | While we accept Pull Requests on this repository, the SDKs are autogenerated so please consider additionally submitting your Pull Requests to the [sdk-generator](https://github.com/openfga/sdk-generator) and linking the two PRs together and to the corresponding issue. This will greatly assist the OpenFGA team in being able to give timely reviews as well as deploying fixes and updates to our other SDKs as well. 37 | 38 | ## Getting in touch 39 | 40 | ### Have a question or problem? 41 | 42 | Please do not open issues for general support or usage questions. Instead, join us over in the [OpenFGA discussions](https://github.com/orgs/openfga/discussions) or [support community](https://openfga.dev/community). 43 | 44 | ### Vulnerability Reporting 45 | 46 | Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://github.com/openfga/.github/blob/main/SECURITY.md) details the procedure for disclosing security issues. 47 | -------------------------------------------------------------------------------- /api_client_test.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "github.com/openfga/go-sdk/telemetry" 17 | "net/http" 18 | "testing" 19 | "time" 20 | ) 21 | 22 | func TestApiClientCreatedWithDefaultTelemetry(t *testing.T) { 23 | cfg := Configuration{ 24 | HTTPClient: &http.Client{Timeout: 10 * time.Second}, 25 | ApiUrl: "http://localhost:8080/", 26 | } 27 | _ = NewAPIClient(&cfg) 28 | 29 | telemetry1 := telemetry.Get(telemetry.TelemetryFactoryParameters{Configuration: cfg.Telemetry}) 30 | telemetry2 := telemetry.Get(telemetry.TelemetryFactoryParameters{Configuration: cfg.Telemetry}) 31 | 32 | if telemetry1 != telemetry2 { 33 | t.Fatalf("Telemetry instance should be the same") 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /client/errors.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package client 14 | 15 | // FgaRequiredParamError Provides access to the body, error and model on returned errors. 16 | type FgaRequiredParamError struct { 17 | error string 18 | param string 19 | } 20 | 21 | // Error returns non-empty string if there was an error. 22 | func (e FgaRequiredParamError) Error() string { 23 | if e.error == "" { 24 | return "Required parameter " + e.Param() + " was not provided" 25 | } 26 | return e.error 27 | } 28 | 29 | // Param returns the name of the missing parameter 30 | func (e FgaRequiredParamError) Param() string { 31 | return e.param 32 | } 33 | 34 | // FgaInvalidError Provides access to the body, error and model on returned errors. 35 | type FgaInvalidError struct { 36 | error string 37 | param string 38 | description string 39 | } 40 | 41 | // Error returns non-empty string if there was an error. 42 | func (e FgaInvalidError) Error() string { 43 | if e.error == "" { 44 | return "Parameter " + e.Param() + " is not a valid " + e.description 45 | } 46 | return e.error 47 | } 48 | 49 | // Param returns the name of the invalid parameter 50 | func (e FgaInvalidError) Param() string { 51 | return e.param 52 | } 53 | -------------------------------------------------------------------------------- /docs/AbortedMessageResponse.md: -------------------------------------------------------------------------------- 1 | # AbortedMessageResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Code** | Pointer to **string** | | [optional] 8 | **Message** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewAbortedMessageResponse 13 | 14 | `func NewAbortedMessageResponse() *AbortedMessageResponse` 15 | 16 | NewAbortedMessageResponse instantiates a new AbortedMessageResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewAbortedMessageResponseWithDefaults 22 | 23 | `func NewAbortedMessageResponseWithDefaults() *AbortedMessageResponse` 24 | 25 | NewAbortedMessageResponseWithDefaults instantiates a new AbortedMessageResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetCode 30 | 31 | `func (o *AbortedMessageResponse) GetCode() string` 32 | 33 | GetCode returns the Code field if non-nil, zero value otherwise. 34 | 35 | ### GetCodeOk 36 | 37 | `func (o *AbortedMessageResponse) GetCodeOk() (*string, bool)` 38 | 39 | GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetCode 43 | 44 | `func (o *AbortedMessageResponse) SetCode(v string)` 45 | 46 | SetCode sets Code field to given value. 47 | 48 | ### HasCode 49 | 50 | `func (o *AbortedMessageResponse) HasCode() bool` 51 | 52 | HasCode returns a boolean if a field has been set. 53 | 54 | ### GetMessage 55 | 56 | `func (o *AbortedMessageResponse) GetMessage() string` 57 | 58 | GetMessage returns the Message field if non-nil, zero value otherwise. 59 | 60 | ### GetMessageOk 61 | 62 | `func (o *AbortedMessageResponse) GetMessageOk() (*string, bool)` 63 | 64 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetMessage 68 | 69 | `func (o *AbortedMessageResponse) SetMessage(v string)` 70 | 71 | SetMessage sets Message field to given value. 72 | 73 | ### HasMessage 74 | 75 | `func (o *AbortedMessageResponse) HasMessage() bool` 76 | 77 | HasMessage returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/Any.md: -------------------------------------------------------------------------------- 1 | # Any 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Type** | Pointer to **string** | | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewAny 12 | 13 | `func NewAny() *Any` 14 | 15 | NewAny instantiates a new Any object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewAnyWithDefaults 21 | 22 | `func NewAnyWithDefaults() *Any` 23 | 24 | NewAnyWithDefaults instantiates a new Any object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetType 29 | 30 | `func (o *Any) GetType() string` 31 | 32 | GetType returns the Type field if non-nil, zero value otherwise. 33 | 34 | ### GetTypeOk 35 | 36 | `func (o *Any) GetTypeOk() (*string, bool)` 37 | 38 | GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetType 42 | 43 | `func (o *Any) SetType(v string)` 44 | 45 | SetType sets Type field to given value. 46 | 47 | ### HasType 48 | 49 | `func (o *Any) HasType() bool` 50 | 51 | HasType returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/AssertionTupleKey.md: -------------------------------------------------------------------------------- 1 | # AssertionTupleKey 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Object** | **string** | | 8 | **Relation** | **string** | | 9 | **User** | **string** | | 10 | 11 | ## Methods 12 | 13 | ### NewAssertionTupleKey 14 | 15 | `func NewAssertionTupleKey(object string, relation string, user string, ) *AssertionTupleKey` 16 | 17 | NewAssertionTupleKey instantiates a new AssertionTupleKey object 18 | This constructor will assign default values to properties that have it defined, 19 | and makes sure properties required by API are set, but the set of arguments 20 | will change when the set of required properties is changed 21 | 22 | ### NewAssertionTupleKeyWithDefaults 23 | 24 | `func NewAssertionTupleKeyWithDefaults() *AssertionTupleKey` 25 | 26 | NewAssertionTupleKeyWithDefaults instantiates a new AssertionTupleKey object 27 | This constructor will only assign default values to properties that have it defined, 28 | but it doesn't guarantee that properties required by API are set 29 | 30 | ### GetObject 31 | 32 | `func (o *AssertionTupleKey) GetObject() string` 33 | 34 | GetObject returns the Object field if non-nil, zero value otherwise. 35 | 36 | ### GetObjectOk 37 | 38 | `func (o *AssertionTupleKey) GetObjectOk() (*string, bool)` 39 | 40 | GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise 41 | and a boolean to check if the value has been set. 42 | 43 | ### SetObject 44 | 45 | `func (o *AssertionTupleKey) SetObject(v string)` 46 | 47 | SetObject sets Object field to given value. 48 | 49 | 50 | ### GetRelation 51 | 52 | `func (o *AssertionTupleKey) GetRelation() string` 53 | 54 | GetRelation returns the Relation field if non-nil, zero value otherwise. 55 | 56 | ### GetRelationOk 57 | 58 | `func (o *AssertionTupleKey) GetRelationOk() (*string, bool)` 59 | 60 | GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise 61 | and a boolean to check if the value has been set. 62 | 63 | ### SetRelation 64 | 65 | `func (o *AssertionTupleKey) SetRelation(v string)` 66 | 67 | SetRelation sets Relation field to given value. 68 | 69 | 70 | ### GetUser 71 | 72 | `func (o *AssertionTupleKey) GetUser() string` 73 | 74 | GetUser returns the User field if non-nil, zero value otherwise. 75 | 76 | ### GetUserOk 77 | 78 | `func (o *AssertionTupleKey) GetUserOk() (*string, bool)` 79 | 80 | GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise 81 | and a boolean to check if the value has been set. 82 | 83 | ### SetUser 84 | 85 | `func (o *AssertionTupleKey) SetUser(v string)` 86 | 87 | SetUser sets User field to given value. 88 | 89 | 90 | 91 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 92 | 93 | 94 | -------------------------------------------------------------------------------- /docs/AuthErrorCode.md: -------------------------------------------------------------------------------- 1 | # AuthErrorCode 2 | 3 | ## Enum 4 | 5 | 6 | * `NO_AUTH_ERROR` (value: `"no_auth_error"`) 7 | 8 | * `AUTH_FAILED_INVALID_SUBJECT` (value: `"auth_failed_invalid_subject"`) 9 | 10 | * `AUTH_FAILED_INVALID_AUDIENCE` (value: `"auth_failed_invalid_audience"`) 11 | 12 | * `AUTH_FAILED_INVALID_ISSUER` (value: `"auth_failed_invalid_issuer"`) 13 | 14 | * `INVALID_CLAIMS` (value: `"invalid_claims"`) 15 | 16 | * `AUTH_FAILED_INVALID_BEARER_TOKEN` (value: `"auth_failed_invalid_bearer_token"`) 17 | 18 | * `BEARER_TOKEN_MISSING` (value: `"bearer_token_missing"`) 19 | 20 | * `UNAUTHENTICATED` (value: `"unauthenticated"`) 21 | 22 | * `FORBIDDEN` (value: `"forbidden"`) 23 | 24 | 25 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/BatchCheckResponse.md: -------------------------------------------------------------------------------- 1 | # BatchCheckResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Result** | Pointer to [**map[string]BatchCheckSingleResult**](BatchCheckSingleResult.md) | map keys are the correlation_id values from the BatchCheckItems in the request | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewBatchCheckResponse 12 | 13 | `func NewBatchCheckResponse() *BatchCheckResponse` 14 | 15 | NewBatchCheckResponse instantiates a new BatchCheckResponse object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewBatchCheckResponseWithDefaults 21 | 22 | `func NewBatchCheckResponseWithDefaults() *BatchCheckResponse` 23 | 24 | NewBatchCheckResponseWithDefaults instantiates a new BatchCheckResponse object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetResult 29 | 30 | `func (o *BatchCheckResponse) GetResult() map[string]BatchCheckSingleResult` 31 | 32 | GetResult returns the Result field if non-nil, zero value otherwise. 33 | 34 | ### GetResultOk 35 | 36 | `func (o *BatchCheckResponse) GetResultOk() (*map[string]BatchCheckSingleResult, bool)` 37 | 38 | GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetResult 42 | 43 | `func (o *BatchCheckResponse) SetResult(v map[string]BatchCheckSingleResult)` 44 | 45 | SetResult sets Result field to given value. 46 | 47 | ### HasResult 48 | 49 | `func (o *BatchCheckResponse) HasResult() bool` 50 | 51 | HasResult returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/BatchCheckSingleResult.md: -------------------------------------------------------------------------------- 1 | # BatchCheckSingleResult 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Allowed** | Pointer to **bool** | | [optional] 8 | **Error** | Pointer to [**CheckError**](CheckError.md) | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewBatchCheckSingleResult 13 | 14 | `func NewBatchCheckSingleResult() *BatchCheckSingleResult` 15 | 16 | NewBatchCheckSingleResult instantiates a new BatchCheckSingleResult object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewBatchCheckSingleResultWithDefaults 22 | 23 | `func NewBatchCheckSingleResultWithDefaults() *BatchCheckSingleResult` 24 | 25 | NewBatchCheckSingleResultWithDefaults instantiates a new BatchCheckSingleResult object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetAllowed 30 | 31 | `func (o *BatchCheckSingleResult) GetAllowed() bool` 32 | 33 | GetAllowed returns the Allowed field if non-nil, zero value otherwise. 34 | 35 | ### GetAllowedOk 36 | 37 | `func (o *BatchCheckSingleResult) GetAllowedOk() (*bool, bool)` 38 | 39 | GetAllowedOk returns a tuple with the Allowed field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetAllowed 43 | 44 | `func (o *BatchCheckSingleResult) SetAllowed(v bool)` 45 | 46 | SetAllowed sets Allowed field to given value. 47 | 48 | ### HasAllowed 49 | 50 | `func (o *BatchCheckSingleResult) HasAllowed() bool` 51 | 52 | HasAllowed returns a boolean if a field has been set. 53 | 54 | ### GetError 55 | 56 | `func (o *BatchCheckSingleResult) GetError() CheckError` 57 | 58 | GetError returns the Error field if non-nil, zero value otherwise. 59 | 60 | ### GetErrorOk 61 | 62 | `func (o *BatchCheckSingleResult) GetErrorOk() (*CheckError, bool)` 63 | 64 | GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetError 68 | 69 | `func (o *BatchCheckSingleResult) SetError(v CheckError)` 70 | 71 | SetError sets Error field to given value. 72 | 73 | ### HasError 74 | 75 | `func (o *BatchCheckSingleResult) HasError() bool` 76 | 77 | HasError returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/CheckRequestTupleKey.md: -------------------------------------------------------------------------------- 1 | # CheckRequestTupleKey 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **User** | **string** | | 8 | **Relation** | **string** | | 9 | **Object** | **string** | | 10 | 11 | ## Methods 12 | 13 | ### NewCheckRequestTupleKey 14 | 15 | `func NewCheckRequestTupleKey(user string, relation string, object string, ) *CheckRequestTupleKey` 16 | 17 | NewCheckRequestTupleKey instantiates a new CheckRequestTupleKey object 18 | This constructor will assign default values to properties that have it defined, 19 | and makes sure properties required by API are set, but the set of arguments 20 | will change when the set of required properties is changed 21 | 22 | ### NewCheckRequestTupleKeyWithDefaults 23 | 24 | `func NewCheckRequestTupleKeyWithDefaults() *CheckRequestTupleKey` 25 | 26 | NewCheckRequestTupleKeyWithDefaults instantiates a new CheckRequestTupleKey object 27 | This constructor will only assign default values to properties that have it defined, 28 | but it doesn't guarantee that properties required by API are set 29 | 30 | ### GetUser 31 | 32 | `func (o *CheckRequestTupleKey) GetUser() string` 33 | 34 | GetUser returns the User field if non-nil, zero value otherwise. 35 | 36 | ### GetUserOk 37 | 38 | `func (o *CheckRequestTupleKey) GetUserOk() (*string, bool)` 39 | 40 | GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise 41 | and a boolean to check if the value has been set. 42 | 43 | ### SetUser 44 | 45 | `func (o *CheckRequestTupleKey) SetUser(v string)` 46 | 47 | SetUser sets User field to given value. 48 | 49 | 50 | ### GetRelation 51 | 52 | `func (o *CheckRequestTupleKey) GetRelation() string` 53 | 54 | GetRelation returns the Relation field if non-nil, zero value otherwise. 55 | 56 | ### GetRelationOk 57 | 58 | `func (o *CheckRequestTupleKey) GetRelationOk() (*string, bool)` 59 | 60 | GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise 61 | and a boolean to check if the value has been set. 62 | 63 | ### SetRelation 64 | 65 | `func (o *CheckRequestTupleKey) SetRelation(v string)` 66 | 67 | SetRelation sets Relation field to given value. 68 | 69 | 70 | ### GetObject 71 | 72 | `func (o *CheckRequestTupleKey) GetObject() string` 73 | 74 | GetObject returns the Object field if non-nil, zero value otherwise. 75 | 76 | ### GetObjectOk 77 | 78 | `func (o *CheckRequestTupleKey) GetObjectOk() (*string, bool)` 79 | 80 | GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise 81 | and a boolean to check if the value has been set. 82 | 83 | ### SetObject 84 | 85 | `func (o *CheckRequestTupleKey) SetObject(v string)` 86 | 87 | SetObject sets Object field to given value. 88 | 89 | 90 | 91 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 92 | 93 | 94 | -------------------------------------------------------------------------------- /docs/CheckResponse.md: -------------------------------------------------------------------------------- 1 | # CheckResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Allowed** | Pointer to **bool** | | [optional] 8 | **Resolution** | Pointer to **string** | For internal use only. | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewCheckResponse 13 | 14 | `func NewCheckResponse() *CheckResponse` 15 | 16 | NewCheckResponse instantiates a new CheckResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewCheckResponseWithDefaults 22 | 23 | `func NewCheckResponseWithDefaults() *CheckResponse` 24 | 25 | NewCheckResponseWithDefaults instantiates a new CheckResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetAllowed 30 | 31 | `func (o *CheckResponse) GetAllowed() bool` 32 | 33 | GetAllowed returns the Allowed field if non-nil, zero value otherwise. 34 | 35 | ### GetAllowedOk 36 | 37 | `func (o *CheckResponse) GetAllowedOk() (*bool, bool)` 38 | 39 | GetAllowedOk returns a tuple with the Allowed field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetAllowed 43 | 44 | `func (o *CheckResponse) SetAllowed(v bool)` 45 | 46 | SetAllowed sets Allowed field to given value. 47 | 48 | ### HasAllowed 49 | 50 | `func (o *CheckResponse) HasAllowed() bool` 51 | 52 | HasAllowed returns a boolean if a field has been set. 53 | 54 | ### GetResolution 55 | 56 | `func (o *CheckResponse) GetResolution() string` 57 | 58 | GetResolution returns the Resolution field if non-nil, zero value otherwise. 59 | 60 | ### GetResolutionOk 61 | 62 | `func (o *CheckResponse) GetResolutionOk() (*string, bool)` 63 | 64 | GetResolutionOk returns a tuple with the Resolution field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetResolution 68 | 69 | `func (o *CheckResponse) SetResolution(v string)` 70 | 71 | SetResolution sets Resolution field to given value. 72 | 73 | ### HasResolution 74 | 75 | `func (o *CheckResponse) HasResolution() bool` 76 | 77 | HasResolution returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/Computed.md: -------------------------------------------------------------------------------- 1 | # Computed 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Userset** | **string** | | 8 | 9 | ## Methods 10 | 11 | ### NewComputed 12 | 13 | `func NewComputed(userset string, ) *Computed` 14 | 15 | NewComputed instantiates a new Computed object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewComputedWithDefaults 21 | 22 | `func NewComputedWithDefaults() *Computed` 23 | 24 | NewComputedWithDefaults instantiates a new Computed object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetUserset 29 | 30 | `func (o *Computed) GetUserset() string` 31 | 32 | GetUserset returns the Userset field if non-nil, zero value otherwise. 33 | 34 | ### GetUsersetOk 35 | 36 | `func (o *Computed) GetUsersetOk() (*string, bool)` 37 | 38 | GetUsersetOk returns a tuple with the Userset field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetUserset 42 | 43 | `func (o *Computed) SetUserset(v string)` 44 | 45 | SetUserset sets Userset field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/ConditionMetadata.md: -------------------------------------------------------------------------------- 1 | # ConditionMetadata 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Module** | Pointer to **string** | | [optional] 8 | **SourceInfo** | Pointer to [**SourceInfo**](SourceInfo.md) | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewConditionMetadata 13 | 14 | `func NewConditionMetadata() *ConditionMetadata` 15 | 16 | NewConditionMetadata instantiates a new ConditionMetadata object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewConditionMetadataWithDefaults 22 | 23 | `func NewConditionMetadataWithDefaults() *ConditionMetadata` 24 | 25 | NewConditionMetadataWithDefaults instantiates a new ConditionMetadata object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetModule 30 | 31 | `func (o *ConditionMetadata) GetModule() string` 32 | 33 | GetModule returns the Module field if non-nil, zero value otherwise. 34 | 35 | ### GetModuleOk 36 | 37 | `func (o *ConditionMetadata) GetModuleOk() (*string, bool)` 38 | 39 | GetModuleOk returns a tuple with the Module field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetModule 43 | 44 | `func (o *ConditionMetadata) SetModule(v string)` 45 | 46 | SetModule sets Module field to given value. 47 | 48 | ### HasModule 49 | 50 | `func (o *ConditionMetadata) HasModule() bool` 51 | 52 | HasModule returns a boolean if a field has been set. 53 | 54 | ### GetSourceInfo 55 | 56 | `func (o *ConditionMetadata) GetSourceInfo() SourceInfo` 57 | 58 | GetSourceInfo returns the SourceInfo field if non-nil, zero value otherwise. 59 | 60 | ### GetSourceInfoOk 61 | 62 | `func (o *ConditionMetadata) GetSourceInfoOk() (*SourceInfo, bool)` 63 | 64 | GetSourceInfoOk returns a tuple with the SourceInfo field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetSourceInfo 68 | 69 | `func (o *ConditionMetadata) SetSourceInfo(v SourceInfo)` 70 | 71 | SetSourceInfo sets SourceInfo field to given value. 72 | 73 | ### HasSourceInfo 74 | 75 | `func (o *ConditionMetadata) HasSourceInfo() bool` 76 | 77 | HasSourceInfo returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/ConditionParamTypeRef.md: -------------------------------------------------------------------------------- 1 | # ConditionParamTypeRef 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **TypeName** | [**TypeName**](TypeName.md) | | [default to TYPENAME_UNSPECIFIED] 8 | **GenericTypes** | Pointer to [**[]ConditionParamTypeRef**](ConditionParamTypeRef.md) | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewConditionParamTypeRef 13 | 14 | `func NewConditionParamTypeRef(typeName TypeName, ) *ConditionParamTypeRef` 15 | 16 | NewConditionParamTypeRef instantiates a new ConditionParamTypeRef object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewConditionParamTypeRefWithDefaults 22 | 23 | `func NewConditionParamTypeRefWithDefaults() *ConditionParamTypeRef` 24 | 25 | NewConditionParamTypeRefWithDefaults instantiates a new ConditionParamTypeRef object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetTypeName 30 | 31 | `func (o *ConditionParamTypeRef) GetTypeName() TypeName` 32 | 33 | GetTypeName returns the TypeName field if non-nil, zero value otherwise. 34 | 35 | ### GetTypeNameOk 36 | 37 | `func (o *ConditionParamTypeRef) GetTypeNameOk() (*TypeName, bool)` 38 | 39 | GetTypeNameOk returns a tuple with the TypeName field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetTypeName 43 | 44 | `func (o *ConditionParamTypeRef) SetTypeName(v TypeName)` 45 | 46 | SetTypeName sets TypeName field to given value. 47 | 48 | 49 | ### GetGenericTypes 50 | 51 | `func (o *ConditionParamTypeRef) GetGenericTypes() []ConditionParamTypeRef` 52 | 53 | GetGenericTypes returns the GenericTypes field if non-nil, zero value otherwise. 54 | 55 | ### GetGenericTypesOk 56 | 57 | `func (o *ConditionParamTypeRef) GetGenericTypesOk() (*[]ConditionParamTypeRef, bool)` 58 | 59 | GetGenericTypesOk returns a tuple with the GenericTypes field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetGenericTypes 63 | 64 | `func (o *ConditionParamTypeRef) SetGenericTypes(v []ConditionParamTypeRef)` 65 | 66 | SetGenericTypes sets GenericTypes field to given value. 67 | 68 | ### HasGenericTypes 69 | 70 | `func (o *ConditionParamTypeRef) HasGenericTypes() bool` 71 | 72 | HasGenericTypes returns a boolean if a field has been set. 73 | 74 | 75 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 76 | 77 | 78 | -------------------------------------------------------------------------------- /docs/ConsistencyPreference.md: -------------------------------------------------------------------------------- 1 | # ConsistencyPreference 2 | 3 | ## Enum 4 | 5 | 6 | * `UNSPECIFIED` (value: `"UNSPECIFIED"`) 7 | 8 | * `MINIMIZE_LATENCY` (value: `"MINIMIZE_LATENCY"`) 9 | 10 | * `HIGHER_CONSISTENCY` (value: `"HIGHER_CONSISTENCY"`) 11 | 12 | 13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/ContextualTupleKeys.md: -------------------------------------------------------------------------------- 1 | # ContextualTupleKeys 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **TupleKeys** | [**[]TupleKey**](TupleKey.md) | | 8 | 9 | ## Methods 10 | 11 | ### NewContextualTupleKeys 12 | 13 | `func NewContextualTupleKeys(tupleKeys []TupleKey, ) *ContextualTupleKeys` 14 | 15 | NewContextualTupleKeys instantiates a new ContextualTupleKeys object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewContextualTupleKeysWithDefaults 21 | 22 | `func NewContextualTupleKeysWithDefaults() *ContextualTupleKeys` 23 | 24 | NewContextualTupleKeysWithDefaults instantiates a new ContextualTupleKeys object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetTupleKeys 29 | 30 | `func (o *ContextualTupleKeys) GetTupleKeys() []TupleKey` 31 | 32 | GetTupleKeys returns the TupleKeys field if non-nil, zero value otherwise. 33 | 34 | ### GetTupleKeysOk 35 | 36 | `func (o *ContextualTupleKeys) GetTupleKeysOk() (*[]TupleKey, bool)` 37 | 38 | GetTupleKeysOk returns a tuple with the TupleKeys field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetTupleKeys 42 | 43 | `func (o *ContextualTupleKeys) SetTupleKeys(v []TupleKey)` 44 | 45 | SetTupleKeys sets TupleKeys field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/CreateStoreRequest.md: -------------------------------------------------------------------------------- 1 | # CreateStoreRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Name** | **string** | | 8 | 9 | ## Methods 10 | 11 | ### NewCreateStoreRequest 12 | 13 | `func NewCreateStoreRequest(name string, ) *CreateStoreRequest` 14 | 15 | NewCreateStoreRequest instantiates a new CreateStoreRequest object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewCreateStoreRequestWithDefaults 21 | 22 | `func NewCreateStoreRequestWithDefaults() *CreateStoreRequest` 23 | 24 | NewCreateStoreRequestWithDefaults instantiates a new CreateStoreRequest object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetName 29 | 30 | `func (o *CreateStoreRequest) GetName() string` 31 | 32 | GetName returns the Name field if non-nil, zero value otherwise. 33 | 34 | ### GetNameOk 35 | 36 | `func (o *CreateStoreRequest) GetNameOk() (*string, bool)` 37 | 38 | GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetName 42 | 43 | `func (o *CreateStoreRequest) SetName(v string)` 44 | 45 | SetName sets Name field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/Difference.md: -------------------------------------------------------------------------------- 1 | # Difference 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Base** | [**Userset**](Userset.md) | | 8 | **Subtract** | [**Userset**](Userset.md) | | 9 | 10 | ## Methods 11 | 12 | ### NewDifference 13 | 14 | `func NewDifference(base Userset, subtract Userset, ) *Difference` 15 | 16 | NewDifference instantiates a new Difference object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewDifferenceWithDefaults 22 | 23 | `func NewDifferenceWithDefaults() *Difference` 24 | 25 | NewDifferenceWithDefaults instantiates a new Difference object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetBase 30 | 31 | `func (o *Difference) GetBase() Userset` 32 | 33 | GetBase returns the Base field if non-nil, zero value otherwise. 34 | 35 | ### GetBaseOk 36 | 37 | `func (o *Difference) GetBaseOk() (*Userset, bool)` 38 | 39 | GetBaseOk returns a tuple with the Base field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetBase 43 | 44 | `func (o *Difference) SetBase(v Userset)` 45 | 46 | SetBase sets Base field to given value. 47 | 48 | 49 | ### GetSubtract 50 | 51 | `func (o *Difference) GetSubtract() Userset` 52 | 53 | GetSubtract returns the Subtract field if non-nil, zero value otherwise. 54 | 55 | ### GetSubtractOk 56 | 57 | `func (o *Difference) GetSubtractOk() (*Userset, bool)` 58 | 59 | GetSubtractOk returns a tuple with the Subtract field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetSubtract 63 | 64 | `func (o *Difference) SetSubtract(v Userset)` 65 | 66 | SetSubtract sets Subtract field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/ExpandRequestTupleKey.md: -------------------------------------------------------------------------------- 1 | # ExpandRequestTupleKey 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Relation** | **string** | | 8 | **Object** | **string** | | 9 | 10 | ## Methods 11 | 12 | ### NewExpandRequestTupleKey 13 | 14 | `func NewExpandRequestTupleKey(relation string, object string, ) *ExpandRequestTupleKey` 15 | 16 | NewExpandRequestTupleKey instantiates a new ExpandRequestTupleKey object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewExpandRequestTupleKeyWithDefaults 22 | 23 | `func NewExpandRequestTupleKeyWithDefaults() *ExpandRequestTupleKey` 24 | 25 | NewExpandRequestTupleKeyWithDefaults instantiates a new ExpandRequestTupleKey object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetRelation 30 | 31 | `func (o *ExpandRequestTupleKey) GetRelation() string` 32 | 33 | GetRelation returns the Relation field if non-nil, zero value otherwise. 34 | 35 | ### GetRelationOk 36 | 37 | `func (o *ExpandRequestTupleKey) GetRelationOk() (*string, bool)` 38 | 39 | GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetRelation 43 | 44 | `func (o *ExpandRequestTupleKey) SetRelation(v string)` 45 | 46 | SetRelation sets Relation field to given value. 47 | 48 | 49 | ### GetObject 50 | 51 | `func (o *ExpandRequestTupleKey) GetObject() string` 52 | 53 | GetObject returns the Object field if non-nil, zero value otherwise. 54 | 55 | ### GetObjectOk 56 | 57 | `func (o *ExpandRequestTupleKey) GetObjectOk() (*string, bool)` 58 | 59 | GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetObject 63 | 64 | `func (o *ExpandRequestTupleKey) SetObject(v string)` 65 | 66 | SetObject sets Object field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/ExpandResponse.md: -------------------------------------------------------------------------------- 1 | # ExpandResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Tree** | Pointer to [**UsersetTree**](UsersetTree.md) | | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewExpandResponse 12 | 13 | `func NewExpandResponse() *ExpandResponse` 14 | 15 | NewExpandResponse instantiates a new ExpandResponse object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewExpandResponseWithDefaults 21 | 22 | `func NewExpandResponseWithDefaults() *ExpandResponse` 23 | 24 | NewExpandResponseWithDefaults instantiates a new ExpandResponse object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetTree 29 | 30 | `func (o *ExpandResponse) GetTree() UsersetTree` 31 | 32 | GetTree returns the Tree field if non-nil, zero value otherwise. 33 | 34 | ### GetTreeOk 35 | 36 | `func (o *ExpandResponse) GetTreeOk() (*UsersetTree, bool)` 37 | 38 | GetTreeOk returns a tuple with the Tree field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetTree 42 | 43 | `func (o *ExpandResponse) SetTree(v UsersetTree)` 44 | 45 | SetTree sets Tree field to given value. 46 | 47 | ### HasTree 48 | 49 | `func (o *ExpandResponse) HasTree() bool` 50 | 51 | HasTree returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/FgaObject.md: -------------------------------------------------------------------------------- 1 | # FgaObject 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Type** | **string** | | 8 | **Id** | **string** | | 9 | 10 | ## Methods 11 | 12 | ### NewFgaObject 13 | 14 | `func NewFgaObject(type_ string, id string, ) *FgaObject` 15 | 16 | NewFgaObject instantiates a new FgaObject object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewFgaObjectWithDefaults 22 | 23 | `func NewFgaObjectWithDefaults() *FgaObject` 24 | 25 | NewFgaObjectWithDefaults instantiates a new FgaObject object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetType 30 | 31 | `func (o *FgaObject) GetType() string` 32 | 33 | GetType returns the Type field if non-nil, zero value otherwise. 34 | 35 | ### GetTypeOk 36 | 37 | `func (o *FgaObject) GetTypeOk() (*string, bool)` 38 | 39 | GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetType 43 | 44 | `func (o *FgaObject) SetType(v string)` 45 | 46 | SetType sets Type field to given value. 47 | 48 | 49 | ### GetId 50 | 51 | `func (o *FgaObject) GetId() string` 52 | 53 | GetId returns the Id field if non-nil, zero value otherwise. 54 | 55 | ### GetIdOk 56 | 57 | `func (o *FgaObject) GetIdOk() (*string, bool)` 58 | 59 | GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetId 63 | 64 | `func (o *FgaObject) SetId(v string)` 65 | 66 | SetId sets Id field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/ForbiddenResponse.md: -------------------------------------------------------------------------------- 1 | # ForbiddenResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Code** | Pointer to [**AuthErrorCode**](AuthErrorCode.md) | | [optional] [default to AUTHERRORCODE_NO_AUTH_ERROR] 8 | **Message** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewForbiddenResponse 13 | 14 | `func NewForbiddenResponse() *ForbiddenResponse` 15 | 16 | NewForbiddenResponse instantiates a new ForbiddenResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewForbiddenResponseWithDefaults 22 | 23 | `func NewForbiddenResponseWithDefaults() *ForbiddenResponse` 24 | 25 | NewForbiddenResponseWithDefaults instantiates a new ForbiddenResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetCode 30 | 31 | `func (o *ForbiddenResponse) GetCode() AuthErrorCode` 32 | 33 | GetCode returns the Code field if non-nil, zero value otherwise. 34 | 35 | ### GetCodeOk 36 | 37 | `func (o *ForbiddenResponse) GetCodeOk() (*AuthErrorCode, bool)` 38 | 39 | GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetCode 43 | 44 | `func (o *ForbiddenResponse) SetCode(v AuthErrorCode)` 45 | 46 | SetCode sets Code field to given value. 47 | 48 | ### HasCode 49 | 50 | `func (o *ForbiddenResponse) HasCode() bool` 51 | 52 | HasCode returns a boolean if a field has been set. 53 | 54 | ### GetMessage 55 | 56 | `func (o *ForbiddenResponse) GetMessage() string` 57 | 58 | GetMessage returns the Message field if non-nil, zero value otherwise. 59 | 60 | ### GetMessageOk 61 | 62 | `func (o *ForbiddenResponse) GetMessageOk() (*string, bool)` 63 | 64 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetMessage 68 | 69 | `func (o *ForbiddenResponse) SetMessage(v string)` 70 | 71 | SetMessage sets Message field to given value. 72 | 73 | ### HasMessage 74 | 75 | `func (o *ForbiddenResponse) HasMessage() bool` 76 | 77 | HasMessage returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/InternalErrorCode.md: -------------------------------------------------------------------------------- 1 | # InternalErrorCode 2 | 3 | ## Enum 4 | 5 | 6 | * `NO_INTERNAL_ERROR` (value: `"no_internal_error"`) 7 | 8 | * `INTERNAL_ERROR` (value: `"internal_error"`) 9 | 10 | * `DEADLINE_EXCEEDED` (value: `"deadline_exceeded"`) 11 | 12 | * `ALREADY_EXISTS` (value: `"already_exists"`) 13 | 14 | * `RESOURCE_EXHAUSTED` (value: `"resource_exhausted"`) 15 | 16 | * `FAILED_PRECONDITION` (value: `"failed_precondition"`) 17 | 18 | * `ABORTED` (value: `"aborted"`) 19 | 20 | * `OUT_OF_RANGE` (value: `"out_of_range"`) 21 | 22 | * `UNAVAILABLE` (value: `"unavailable"`) 23 | 24 | * `DATA_LOSS` (value: `"data_loss"`) 25 | 26 | 27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/InternalErrorMessageResponse.md: -------------------------------------------------------------------------------- 1 | # InternalErrorMessageResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Code** | Pointer to [**InternalErrorCode**](InternalErrorCode.md) | | [optional] [default to INTERNALERRORCODE_NO_INTERNAL_ERROR] 8 | **Message** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewInternalErrorMessageResponse 13 | 14 | `func NewInternalErrorMessageResponse() *InternalErrorMessageResponse` 15 | 16 | NewInternalErrorMessageResponse instantiates a new InternalErrorMessageResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewInternalErrorMessageResponseWithDefaults 22 | 23 | `func NewInternalErrorMessageResponseWithDefaults() *InternalErrorMessageResponse` 24 | 25 | NewInternalErrorMessageResponseWithDefaults instantiates a new InternalErrorMessageResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetCode 30 | 31 | `func (o *InternalErrorMessageResponse) GetCode() InternalErrorCode` 32 | 33 | GetCode returns the Code field if non-nil, zero value otherwise. 34 | 35 | ### GetCodeOk 36 | 37 | `func (o *InternalErrorMessageResponse) GetCodeOk() (*InternalErrorCode, bool)` 38 | 39 | GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetCode 43 | 44 | `func (o *InternalErrorMessageResponse) SetCode(v InternalErrorCode)` 45 | 46 | SetCode sets Code field to given value. 47 | 48 | ### HasCode 49 | 50 | `func (o *InternalErrorMessageResponse) HasCode() bool` 51 | 52 | HasCode returns a boolean if a field has been set. 53 | 54 | ### GetMessage 55 | 56 | `func (o *InternalErrorMessageResponse) GetMessage() string` 57 | 58 | GetMessage returns the Message field if non-nil, zero value otherwise. 59 | 60 | ### GetMessageOk 61 | 62 | `func (o *InternalErrorMessageResponse) GetMessageOk() (*string, bool)` 63 | 64 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetMessage 68 | 69 | `func (o *InternalErrorMessageResponse) SetMessage(v string)` 70 | 71 | SetMessage sets Message field to given value. 72 | 73 | ### HasMessage 74 | 75 | `func (o *InternalErrorMessageResponse) HasMessage() bool` 76 | 77 | HasMessage returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/ListObjectsResponse.md: -------------------------------------------------------------------------------- 1 | # ListObjectsResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Objects** | **[]string** | | 8 | 9 | ## Methods 10 | 11 | ### NewListObjectsResponse 12 | 13 | `func NewListObjectsResponse(objects []string, ) *ListObjectsResponse` 14 | 15 | NewListObjectsResponse instantiates a new ListObjectsResponse object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewListObjectsResponseWithDefaults 21 | 22 | `func NewListObjectsResponseWithDefaults() *ListObjectsResponse` 23 | 24 | NewListObjectsResponseWithDefaults instantiates a new ListObjectsResponse object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetObjects 29 | 30 | `func (o *ListObjectsResponse) GetObjects() []string` 31 | 32 | GetObjects returns the Objects field if non-nil, zero value otherwise. 33 | 34 | ### GetObjectsOk 35 | 36 | `func (o *ListObjectsResponse) GetObjectsOk() (*[]string, bool)` 37 | 38 | GetObjectsOk returns a tuple with the Objects field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetObjects 42 | 43 | `func (o *ListObjectsResponse) SetObjects(v []string)` 44 | 45 | SetObjects sets Objects field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/ListStoresResponse.md: -------------------------------------------------------------------------------- 1 | # ListStoresResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Stores** | [**[]Store**](Store.md) | | 8 | **ContinuationToken** | **string** | The continuation token will be empty if there are no more stores. | 9 | 10 | ## Methods 11 | 12 | ### NewListStoresResponse 13 | 14 | `func NewListStoresResponse(stores []Store, continuationToken string, ) *ListStoresResponse` 15 | 16 | NewListStoresResponse instantiates a new ListStoresResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewListStoresResponseWithDefaults 22 | 23 | `func NewListStoresResponseWithDefaults() *ListStoresResponse` 24 | 25 | NewListStoresResponseWithDefaults instantiates a new ListStoresResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetStores 30 | 31 | `func (o *ListStoresResponse) GetStores() []Store` 32 | 33 | GetStores returns the Stores field if non-nil, zero value otherwise. 34 | 35 | ### GetStoresOk 36 | 37 | `func (o *ListStoresResponse) GetStoresOk() (*[]Store, bool)` 38 | 39 | GetStoresOk returns a tuple with the Stores field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetStores 43 | 44 | `func (o *ListStoresResponse) SetStores(v []Store)` 45 | 46 | SetStores sets Stores field to given value. 47 | 48 | 49 | ### GetContinuationToken 50 | 51 | `func (o *ListStoresResponse) GetContinuationToken() string` 52 | 53 | GetContinuationToken returns the ContinuationToken field if non-nil, zero value otherwise. 54 | 55 | ### GetContinuationTokenOk 56 | 57 | `func (o *ListStoresResponse) GetContinuationTokenOk() (*string, bool)` 58 | 59 | GetContinuationTokenOk returns a tuple with the ContinuationToken field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetContinuationToken 63 | 64 | `func (o *ListStoresResponse) SetContinuationToken(v string)` 65 | 66 | SetContinuationToken sets ContinuationToken field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/ListUsersResponse.md: -------------------------------------------------------------------------------- 1 | # ListUsersResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Users** | [**[]User**](User.md) | | 8 | 9 | ## Methods 10 | 11 | ### NewListUsersResponse 12 | 13 | `func NewListUsersResponse(users []User, ) *ListUsersResponse` 14 | 15 | NewListUsersResponse instantiates a new ListUsersResponse object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewListUsersResponseWithDefaults 21 | 22 | `func NewListUsersResponseWithDefaults() *ListUsersResponse` 23 | 24 | NewListUsersResponseWithDefaults instantiates a new ListUsersResponse object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetUsers 29 | 30 | `func (o *ListUsersResponse) GetUsers() []User` 31 | 32 | GetUsers returns the Users field if non-nil, zero value otherwise. 33 | 34 | ### GetUsersOk 35 | 36 | `func (o *ListUsersResponse) GetUsersOk() (*[]User, bool)` 37 | 38 | GetUsersOk returns a tuple with the Users field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetUsers 42 | 43 | `func (o *ListUsersResponse) SetUsers(v []User)` 44 | 45 | SetUsers sets Users field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/Nodes.md: -------------------------------------------------------------------------------- 1 | # Nodes 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Nodes** | [**[]Node**](Node.md) | | 8 | 9 | ## Methods 10 | 11 | ### NewNodes 12 | 13 | `func NewNodes(nodes []Node, ) *Nodes` 14 | 15 | NewNodes instantiates a new Nodes object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewNodesWithDefaults 21 | 22 | `func NewNodesWithDefaults() *Nodes` 23 | 24 | NewNodesWithDefaults instantiates a new Nodes object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetNodes 29 | 30 | `func (o *Nodes) GetNodes() []Node` 31 | 32 | GetNodes returns the Nodes field if non-nil, zero value otherwise. 33 | 34 | ### GetNodesOk 35 | 36 | `func (o *Nodes) GetNodesOk() (*[]Node, bool)` 37 | 38 | GetNodesOk returns a tuple with the Nodes field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetNodes 42 | 43 | `func (o *Nodes) SetNodes(v []Node)` 44 | 45 | SetNodes sets Nodes field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/NotFoundErrorCode.md: -------------------------------------------------------------------------------- 1 | # NotFoundErrorCode 2 | 3 | ## Enum 4 | 5 | 6 | * `NO_NOT_FOUND_ERROR` (value: `"no_not_found_error"`) 7 | 8 | * `UNDEFINED_ENDPOINT` (value: `"undefined_endpoint"`) 9 | 10 | * `STORE_ID_NOT_FOUND` (value: `"store_id_not_found"`) 11 | 12 | * `UNIMPLEMENTED` (value: `"unimplemented"`) 13 | 14 | 15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/NullValue.md: -------------------------------------------------------------------------------- 1 | # NullValue 2 | 3 | ## Enum 4 | 5 | 6 | * `NULL_VALUE` (value: `"NULL_VALUE"`) 7 | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/ObjectRelation.md: -------------------------------------------------------------------------------- 1 | # ObjectRelation 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Object** | Pointer to **string** | | [optional] 8 | **Relation** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewObjectRelation 13 | 14 | `func NewObjectRelation() *ObjectRelation` 15 | 16 | NewObjectRelation instantiates a new ObjectRelation object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewObjectRelationWithDefaults 22 | 23 | `func NewObjectRelationWithDefaults() *ObjectRelation` 24 | 25 | NewObjectRelationWithDefaults instantiates a new ObjectRelation object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetObject 30 | 31 | `func (o *ObjectRelation) GetObject() string` 32 | 33 | GetObject returns the Object field if non-nil, zero value otherwise. 34 | 35 | ### GetObjectOk 36 | 37 | `func (o *ObjectRelation) GetObjectOk() (*string, bool)` 38 | 39 | GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetObject 43 | 44 | `func (o *ObjectRelation) SetObject(v string)` 45 | 46 | SetObject sets Object field to given value. 47 | 48 | ### HasObject 49 | 50 | `func (o *ObjectRelation) HasObject() bool` 51 | 52 | HasObject returns a boolean if a field has been set. 53 | 54 | ### GetRelation 55 | 56 | `func (o *ObjectRelation) GetRelation() string` 57 | 58 | GetRelation returns the Relation field if non-nil, zero value otherwise. 59 | 60 | ### GetRelationOk 61 | 62 | `func (o *ObjectRelation) GetRelationOk() (*string, bool)` 63 | 64 | GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetRelation 68 | 69 | `func (o *ObjectRelation) SetRelation(v string)` 70 | 71 | SetRelation sets Relation field to given value. 72 | 73 | ### HasRelation 74 | 75 | `func (o *ObjectRelation) HasRelation() bool` 76 | 77 | HasRelation returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/PathUnknownErrorMessageResponse.md: -------------------------------------------------------------------------------- 1 | # PathUnknownErrorMessageResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Code** | Pointer to [**NotFoundErrorCode**](NotFoundErrorCode.md) | | [optional] [default to NOTFOUNDERRORCODE_NO_NOT_FOUND_ERROR] 8 | **Message** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewPathUnknownErrorMessageResponse 13 | 14 | `func NewPathUnknownErrorMessageResponse() *PathUnknownErrorMessageResponse` 15 | 16 | NewPathUnknownErrorMessageResponse instantiates a new PathUnknownErrorMessageResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewPathUnknownErrorMessageResponseWithDefaults 22 | 23 | `func NewPathUnknownErrorMessageResponseWithDefaults() *PathUnknownErrorMessageResponse` 24 | 25 | NewPathUnknownErrorMessageResponseWithDefaults instantiates a new PathUnknownErrorMessageResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetCode 30 | 31 | `func (o *PathUnknownErrorMessageResponse) GetCode() NotFoundErrorCode` 32 | 33 | GetCode returns the Code field if non-nil, zero value otherwise. 34 | 35 | ### GetCodeOk 36 | 37 | `func (o *PathUnknownErrorMessageResponse) GetCodeOk() (*NotFoundErrorCode, bool)` 38 | 39 | GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetCode 43 | 44 | `func (o *PathUnknownErrorMessageResponse) SetCode(v NotFoundErrorCode)` 45 | 46 | SetCode sets Code field to given value. 47 | 48 | ### HasCode 49 | 50 | `func (o *PathUnknownErrorMessageResponse) HasCode() bool` 51 | 52 | HasCode returns a boolean if a field has been set. 53 | 54 | ### GetMessage 55 | 56 | `func (o *PathUnknownErrorMessageResponse) GetMessage() string` 57 | 58 | GetMessage returns the Message field if non-nil, zero value otherwise. 59 | 60 | ### GetMessageOk 61 | 62 | `func (o *PathUnknownErrorMessageResponse) GetMessageOk() (*string, bool)` 63 | 64 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetMessage 68 | 69 | `func (o *PathUnknownErrorMessageResponse) SetMessage(v string)` 70 | 71 | SetMessage sets Message field to given value. 72 | 73 | ### HasMessage 74 | 75 | `func (o *PathUnknownErrorMessageResponse) HasMessage() bool` 76 | 77 | HasMessage returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/ReadAssertionsResponse.md: -------------------------------------------------------------------------------- 1 | # ReadAssertionsResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **AuthorizationModelId** | **string** | | 8 | **Assertions** | Pointer to [**[]Assertion**](Assertion.md) | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewReadAssertionsResponse 13 | 14 | `func NewReadAssertionsResponse(authorizationModelId string, ) *ReadAssertionsResponse` 15 | 16 | NewReadAssertionsResponse instantiates a new ReadAssertionsResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewReadAssertionsResponseWithDefaults 22 | 23 | `func NewReadAssertionsResponseWithDefaults() *ReadAssertionsResponse` 24 | 25 | NewReadAssertionsResponseWithDefaults instantiates a new ReadAssertionsResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetAuthorizationModelId 30 | 31 | `func (o *ReadAssertionsResponse) GetAuthorizationModelId() string` 32 | 33 | GetAuthorizationModelId returns the AuthorizationModelId field if non-nil, zero value otherwise. 34 | 35 | ### GetAuthorizationModelIdOk 36 | 37 | `func (o *ReadAssertionsResponse) GetAuthorizationModelIdOk() (*string, bool)` 38 | 39 | GetAuthorizationModelIdOk returns a tuple with the AuthorizationModelId field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetAuthorizationModelId 43 | 44 | `func (o *ReadAssertionsResponse) SetAuthorizationModelId(v string)` 45 | 46 | SetAuthorizationModelId sets AuthorizationModelId field to given value. 47 | 48 | 49 | ### GetAssertions 50 | 51 | `func (o *ReadAssertionsResponse) GetAssertions() []Assertion` 52 | 53 | GetAssertions returns the Assertions field if non-nil, zero value otherwise. 54 | 55 | ### GetAssertionsOk 56 | 57 | `func (o *ReadAssertionsResponse) GetAssertionsOk() (*[]Assertion, bool)` 58 | 59 | GetAssertionsOk returns a tuple with the Assertions field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetAssertions 63 | 64 | `func (o *ReadAssertionsResponse) SetAssertions(v []Assertion)` 65 | 66 | SetAssertions sets Assertions field to given value. 67 | 68 | ### HasAssertions 69 | 70 | `func (o *ReadAssertionsResponse) HasAssertions() bool` 71 | 72 | HasAssertions returns a boolean if a field has been set. 73 | 74 | 75 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 76 | 77 | 78 | -------------------------------------------------------------------------------- /docs/ReadAuthorizationModelResponse.md: -------------------------------------------------------------------------------- 1 | # ReadAuthorizationModelResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **AuthorizationModel** | Pointer to [**AuthorizationModel**](AuthorizationModel.md) | | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewReadAuthorizationModelResponse 12 | 13 | `func NewReadAuthorizationModelResponse() *ReadAuthorizationModelResponse` 14 | 15 | NewReadAuthorizationModelResponse instantiates a new ReadAuthorizationModelResponse object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewReadAuthorizationModelResponseWithDefaults 21 | 22 | `func NewReadAuthorizationModelResponseWithDefaults() *ReadAuthorizationModelResponse` 23 | 24 | NewReadAuthorizationModelResponseWithDefaults instantiates a new ReadAuthorizationModelResponse object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetAuthorizationModel 29 | 30 | `func (o *ReadAuthorizationModelResponse) GetAuthorizationModel() AuthorizationModel` 31 | 32 | GetAuthorizationModel returns the AuthorizationModel field if non-nil, zero value otherwise. 33 | 34 | ### GetAuthorizationModelOk 35 | 36 | `func (o *ReadAuthorizationModelResponse) GetAuthorizationModelOk() (*AuthorizationModel, bool)` 37 | 38 | GetAuthorizationModelOk returns a tuple with the AuthorizationModel field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetAuthorizationModel 42 | 43 | `func (o *ReadAuthorizationModelResponse) SetAuthorizationModel(v AuthorizationModel)` 44 | 45 | SetAuthorizationModel sets AuthorizationModel field to given value. 46 | 47 | ### HasAuthorizationModel 48 | 49 | `func (o *ReadAuthorizationModelResponse) HasAuthorizationModel() bool` 50 | 51 | HasAuthorizationModel returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/ReadAuthorizationModelsResponse.md: -------------------------------------------------------------------------------- 1 | # ReadAuthorizationModelsResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **AuthorizationModels** | [**[]AuthorizationModel**](AuthorizationModel.md) | | 8 | **ContinuationToken** | Pointer to **string** | The continuation token will be empty if there are no more models. | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewReadAuthorizationModelsResponse 13 | 14 | `func NewReadAuthorizationModelsResponse(authorizationModels []AuthorizationModel, ) *ReadAuthorizationModelsResponse` 15 | 16 | NewReadAuthorizationModelsResponse instantiates a new ReadAuthorizationModelsResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewReadAuthorizationModelsResponseWithDefaults 22 | 23 | `func NewReadAuthorizationModelsResponseWithDefaults() *ReadAuthorizationModelsResponse` 24 | 25 | NewReadAuthorizationModelsResponseWithDefaults instantiates a new ReadAuthorizationModelsResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetAuthorizationModels 30 | 31 | `func (o *ReadAuthorizationModelsResponse) GetAuthorizationModels() []AuthorizationModel` 32 | 33 | GetAuthorizationModels returns the AuthorizationModels field if non-nil, zero value otherwise. 34 | 35 | ### GetAuthorizationModelsOk 36 | 37 | `func (o *ReadAuthorizationModelsResponse) GetAuthorizationModelsOk() (*[]AuthorizationModel, bool)` 38 | 39 | GetAuthorizationModelsOk returns a tuple with the AuthorizationModels field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetAuthorizationModels 43 | 44 | `func (o *ReadAuthorizationModelsResponse) SetAuthorizationModels(v []AuthorizationModel)` 45 | 46 | SetAuthorizationModels sets AuthorizationModels field to given value. 47 | 48 | 49 | ### GetContinuationToken 50 | 51 | `func (o *ReadAuthorizationModelsResponse) GetContinuationToken() string` 52 | 53 | GetContinuationToken returns the ContinuationToken field if non-nil, zero value otherwise. 54 | 55 | ### GetContinuationTokenOk 56 | 57 | `func (o *ReadAuthorizationModelsResponse) GetContinuationTokenOk() (*string, bool)` 58 | 59 | GetContinuationTokenOk returns a tuple with the ContinuationToken field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetContinuationToken 63 | 64 | `func (o *ReadAuthorizationModelsResponse) SetContinuationToken(v string)` 65 | 66 | SetContinuationToken sets ContinuationToken field to given value. 67 | 68 | ### HasContinuationToken 69 | 70 | `func (o *ReadAuthorizationModelsResponse) HasContinuationToken() bool` 71 | 72 | HasContinuationToken returns a boolean if a field has been set. 73 | 74 | 75 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 76 | 77 | 78 | -------------------------------------------------------------------------------- /docs/ReadChangesResponse.md: -------------------------------------------------------------------------------- 1 | # ReadChangesResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Changes** | [**[]TupleChange**](TupleChange.md) | | 8 | **ContinuationToken** | Pointer to **string** | The continuation token will be identical if there are no new changes. | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewReadChangesResponse 13 | 14 | `func NewReadChangesResponse(changes []TupleChange, ) *ReadChangesResponse` 15 | 16 | NewReadChangesResponse instantiates a new ReadChangesResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewReadChangesResponseWithDefaults 22 | 23 | `func NewReadChangesResponseWithDefaults() *ReadChangesResponse` 24 | 25 | NewReadChangesResponseWithDefaults instantiates a new ReadChangesResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetChanges 30 | 31 | `func (o *ReadChangesResponse) GetChanges() []TupleChange` 32 | 33 | GetChanges returns the Changes field if non-nil, zero value otherwise. 34 | 35 | ### GetChangesOk 36 | 37 | `func (o *ReadChangesResponse) GetChangesOk() (*[]TupleChange, bool)` 38 | 39 | GetChangesOk returns a tuple with the Changes field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetChanges 43 | 44 | `func (o *ReadChangesResponse) SetChanges(v []TupleChange)` 45 | 46 | SetChanges sets Changes field to given value. 47 | 48 | 49 | ### GetContinuationToken 50 | 51 | `func (o *ReadChangesResponse) GetContinuationToken() string` 52 | 53 | GetContinuationToken returns the ContinuationToken field if non-nil, zero value otherwise. 54 | 55 | ### GetContinuationTokenOk 56 | 57 | `func (o *ReadChangesResponse) GetContinuationTokenOk() (*string, bool)` 58 | 59 | GetContinuationTokenOk returns a tuple with the ContinuationToken field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetContinuationToken 63 | 64 | `func (o *ReadChangesResponse) SetContinuationToken(v string)` 65 | 66 | SetContinuationToken sets ContinuationToken field to given value. 67 | 68 | ### HasContinuationToken 69 | 70 | `func (o *ReadChangesResponse) HasContinuationToken() bool` 71 | 72 | HasContinuationToken returns a boolean if a field has been set. 73 | 74 | 75 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 76 | 77 | 78 | -------------------------------------------------------------------------------- /docs/ReadResponse.md: -------------------------------------------------------------------------------- 1 | # ReadResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Tuples** | [**[]Tuple**](Tuple.md) | | 8 | **ContinuationToken** | **string** | The continuation token will be empty if there are no more tuples. | 9 | 10 | ## Methods 11 | 12 | ### NewReadResponse 13 | 14 | `func NewReadResponse(tuples []Tuple, continuationToken string, ) *ReadResponse` 15 | 16 | NewReadResponse instantiates a new ReadResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewReadResponseWithDefaults 22 | 23 | `func NewReadResponseWithDefaults() *ReadResponse` 24 | 25 | NewReadResponseWithDefaults instantiates a new ReadResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetTuples 30 | 31 | `func (o *ReadResponse) GetTuples() []Tuple` 32 | 33 | GetTuples returns the Tuples field if non-nil, zero value otherwise. 34 | 35 | ### GetTuplesOk 36 | 37 | `func (o *ReadResponse) GetTuplesOk() (*[]Tuple, bool)` 38 | 39 | GetTuplesOk returns a tuple with the Tuples field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetTuples 43 | 44 | `func (o *ReadResponse) SetTuples(v []Tuple)` 45 | 46 | SetTuples sets Tuples field to given value. 47 | 48 | 49 | ### GetContinuationToken 50 | 51 | `func (o *ReadResponse) GetContinuationToken() string` 52 | 53 | GetContinuationToken returns the ContinuationToken field if non-nil, zero value otherwise. 54 | 55 | ### GetContinuationTokenOk 56 | 57 | `func (o *ReadResponse) GetContinuationTokenOk() (*string, bool)` 58 | 59 | GetContinuationTokenOk returns a tuple with the ContinuationToken field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetContinuationToken 63 | 64 | `func (o *ReadResponse) SetContinuationToken(v string)` 65 | 66 | SetContinuationToken sets ContinuationToken field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/RelationshipCondition.md: -------------------------------------------------------------------------------- 1 | # RelationshipCondition 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Name** | **string** | A reference (by name) of the relationship condition defined in the authorization model. | 8 | **Context** | Pointer to **map[string]interface{}** | Additional context/data to persist along with the condition. The keys must match the parameters defined by the condition, and the value types must match the parameter type definitions. | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewRelationshipCondition 13 | 14 | `func NewRelationshipCondition(name string, ) *RelationshipCondition` 15 | 16 | NewRelationshipCondition instantiates a new RelationshipCondition object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewRelationshipConditionWithDefaults 22 | 23 | `func NewRelationshipConditionWithDefaults() *RelationshipCondition` 24 | 25 | NewRelationshipConditionWithDefaults instantiates a new RelationshipCondition object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetName 30 | 31 | `func (o *RelationshipCondition) GetName() string` 32 | 33 | GetName returns the Name field if non-nil, zero value otherwise. 34 | 35 | ### GetNameOk 36 | 37 | `func (o *RelationshipCondition) GetNameOk() (*string, bool)` 38 | 39 | GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetName 43 | 44 | `func (o *RelationshipCondition) SetName(v string)` 45 | 46 | SetName sets Name field to given value. 47 | 48 | 49 | ### GetContext 50 | 51 | `func (o *RelationshipCondition) GetContext() map[string]interface{}` 52 | 53 | GetContext returns the Context field if non-nil, zero value otherwise. 54 | 55 | ### GetContextOk 56 | 57 | `func (o *RelationshipCondition) GetContextOk() (*map[string]interface{}, bool)` 58 | 59 | GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetContext 63 | 64 | `func (o *RelationshipCondition) SetContext(v map[string]interface{})` 65 | 66 | SetContext sets Context field to given value. 67 | 68 | ### HasContext 69 | 70 | `func (o *RelationshipCondition) HasContext() bool` 71 | 72 | HasContext returns a boolean if a field has been set. 73 | 74 | 75 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 76 | 77 | 78 | -------------------------------------------------------------------------------- /docs/SourceInfo.md: -------------------------------------------------------------------------------- 1 | # SourceInfo 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **File** | Pointer to **string** | | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewSourceInfo 12 | 13 | `func NewSourceInfo() *SourceInfo` 14 | 15 | NewSourceInfo instantiates a new SourceInfo object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewSourceInfoWithDefaults 21 | 22 | `func NewSourceInfoWithDefaults() *SourceInfo` 23 | 24 | NewSourceInfoWithDefaults instantiates a new SourceInfo object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetFile 29 | 30 | `func (o *SourceInfo) GetFile() string` 31 | 32 | GetFile returns the File field if non-nil, zero value otherwise. 33 | 34 | ### GetFileOk 35 | 36 | `func (o *SourceInfo) GetFileOk() (*string, bool)` 37 | 38 | GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetFile 42 | 43 | `func (o *SourceInfo) SetFile(v string)` 44 | 45 | SetFile sets File field to given value. 46 | 47 | ### HasFile 48 | 49 | `func (o *SourceInfo) HasFile() bool` 50 | 51 | HasFile returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/Status.md: -------------------------------------------------------------------------------- 1 | # Status 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Code** | Pointer to **int32** | | [optional] 8 | **Message** | Pointer to **string** | | [optional] 9 | **Details** | Pointer to [**[]Any**](Any.md) | | [optional] 10 | 11 | ## Methods 12 | 13 | ### NewStatus 14 | 15 | `func NewStatus() *Status` 16 | 17 | NewStatus instantiates a new Status object 18 | This constructor will assign default values to properties that have it defined, 19 | and makes sure properties required by API are set, but the set of arguments 20 | will change when the set of required properties is changed 21 | 22 | ### NewStatusWithDefaults 23 | 24 | `func NewStatusWithDefaults() *Status` 25 | 26 | NewStatusWithDefaults instantiates a new Status object 27 | This constructor will only assign default values to properties that have it defined, 28 | but it doesn't guarantee that properties required by API are set 29 | 30 | ### GetCode 31 | 32 | `func (o *Status) GetCode() int32` 33 | 34 | GetCode returns the Code field if non-nil, zero value otherwise. 35 | 36 | ### GetCodeOk 37 | 38 | `func (o *Status) GetCodeOk() (*int32, bool)` 39 | 40 | GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise 41 | and a boolean to check if the value has been set. 42 | 43 | ### SetCode 44 | 45 | `func (o *Status) SetCode(v int32)` 46 | 47 | SetCode sets Code field to given value. 48 | 49 | ### HasCode 50 | 51 | `func (o *Status) HasCode() bool` 52 | 53 | HasCode returns a boolean if a field has been set. 54 | 55 | ### GetMessage 56 | 57 | `func (o *Status) GetMessage() string` 58 | 59 | GetMessage returns the Message field if non-nil, zero value otherwise. 60 | 61 | ### GetMessageOk 62 | 63 | `func (o *Status) GetMessageOk() (*string, bool)` 64 | 65 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 66 | and a boolean to check if the value has been set. 67 | 68 | ### SetMessage 69 | 70 | `func (o *Status) SetMessage(v string)` 71 | 72 | SetMessage sets Message field to given value. 73 | 74 | ### HasMessage 75 | 76 | `func (o *Status) HasMessage() bool` 77 | 78 | HasMessage returns a boolean if a field has been set. 79 | 80 | ### GetDetails 81 | 82 | `func (o *Status) GetDetails() []Any` 83 | 84 | GetDetails returns the Details field if non-nil, zero value otherwise. 85 | 86 | ### GetDetailsOk 87 | 88 | `func (o *Status) GetDetailsOk() (*[]Any, bool)` 89 | 90 | GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise 91 | and a boolean to check if the value has been set. 92 | 93 | ### SetDetails 94 | 95 | `func (o *Status) SetDetails(v []Any)` 96 | 97 | SetDetails sets Details field to given value. 98 | 99 | ### HasDetails 100 | 101 | `func (o *Status) HasDetails() bool` 102 | 103 | HasDetails returns a boolean if a field has been set. 104 | 105 | 106 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 107 | 108 | 109 | -------------------------------------------------------------------------------- /docs/Tuple.md: -------------------------------------------------------------------------------- 1 | # Tuple 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Key** | [**TupleKey**](TupleKey.md) | | 8 | **Timestamp** | **time.Time** | | 9 | 10 | ## Methods 11 | 12 | ### NewTuple 13 | 14 | `func NewTuple(key TupleKey, timestamp time.Time, ) *Tuple` 15 | 16 | NewTuple instantiates a new Tuple object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewTupleWithDefaults 22 | 23 | `func NewTupleWithDefaults() *Tuple` 24 | 25 | NewTupleWithDefaults instantiates a new Tuple object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetKey 30 | 31 | `func (o *Tuple) GetKey() TupleKey` 32 | 33 | GetKey returns the Key field if non-nil, zero value otherwise. 34 | 35 | ### GetKeyOk 36 | 37 | `func (o *Tuple) GetKeyOk() (*TupleKey, bool)` 38 | 39 | GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetKey 43 | 44 | `func (o *Tuple) SetKey(v TupleKey)` 45 | 46 | SetKey sets Key field to given value. 47 | 48 | 49 | ### GetTimestamp 50 | 51 | `func (o *Tuple) GetTimestamp() time.Time` 52 | 53 | GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. 54 | 55 | ### GetTimestampOk 56 | 57 | `func (o *Tuple) GetTimestampOk() (*time.Time, bool)` 58 | 59 | GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetTimestamp 63 | 64 | `func (o *Tuple) SetTimestamp(v time.Time)` 65 | 66 | SetTimestamp sets Timestamp field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/TupleChange.md: -------------------------------------------------------------------------------- 1 | # TupleChange 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **TupleKey** | [**TupleKey**](TupleKey.md) | | 8 | **Operation** | [**TupleOperation**](TupleOperation.md) | | [default to TUPLEOPERATION_WRITE] 9 | **Timestamp** | **time.Time** | | 10 | 11 | ## Methods 12 | 13 | ### NewTupleChange 14 | 15 | `func NewTupleChange(tupleKey TupleKey, operation TupleOperation, timestamp time.Time, ) *TupleChange` 16 | 17 | NewTupleChange instantiates a new TupleChange object 18 | This constructor will assign default values to properties that have it defined, 19 | and makes sure properties required by API are set, but the set of arguments 20 | will change when the set of required properties is changed 21 | 22 | ### NewTupleChangeWithDefaults 23 | 24 | `func NewTupleChangeWithDefaults() *TupleChange` 25 | 26 | NewTupleChangeWithDefaults instantiates a new TupleChange object 27 | This constructor will only assign default values to properties that have it defined, 28 | but it doesn't guarantee that properties required by API are set 29 | 30 | ### GetTupleKey 31 | 32 | `func (o *TupleChange) GetTupleKey() TupleKey` 33 | 34 | GetTupleKey returns the TupleKey field if non-nil, zero value otherwise. 35 | 36 | ### GetTupleKeyOk 37 | 38 | `func (o *TupleChange) GetTupleKeyOk() (*TupleKey, bool)` 39 | 40 | GetTupleKeyOk returns a tuple with the TupleKey field if it's non-nil, zero value otherwise 41 | and a boolean to check if the value has been set. 42 | 43 | ### SetTupleKey 44 | 45 | `func (o *TupleChange) SetTupleKey(v TupleKey)` 46 | 47 | SetTupleKey sets TupleKey field to given value. 48 | 49 | 50 | ### GetOperation 51 | 52 | `func (o *TupleChange) GetOperation() TupleOperation` 53 | 54 | GetOperation returns the Operation field if non-nil, zero value otherwise. 55 | 56 | ### GetOperationOk 57 | 58 | `func (o *TupleChange) GetOperationOk() (*TupleOperation, bool)` 59 | 60 | GetOperationOk returns a tuple with the Operation field if it's non-nil, zero value otherwise 61 | and a boolean to check if the value has been set. 62 | 63 | ### SetOperation 64 | 65 | `func (o *TupleChange) SetOperation(v TupleOperation)` 66 | 67 | SetOperation sets Operation field to given value. 68 | 69 | 70 | ### GetTimestamp 71 | 72 | `func (o *TupleChange) GetTimestamp() time.Time` 73 | 74 | GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. 75 | 76 | ### GetTimestampOk 77 | 78 | `func (o *TupleChange) GetTimestampOk() (*time.Time, bool)` 79 | 80 | GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise 81 | and a boolean to check if the value has been set. 82 | 83 | ### SetTimestamp 84 | 85 | `func (o *TupleChange) SetTimestamp(v time.Time)` 86 | 87 | SetTimestamp sets Timestamp field to given value. 88 | 89 | 90 | 91 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 92 | 93 | 94 | -------------------------------------------------------------------------------- /docs/TupleKeyWithoutCondition.md: -------------------------------------------------------------------------------- 1 | # TupleKeyWithoutCondition 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **User** | **string** | | 8 | **Relation** | **string** | | 9 | **Object** | **string** | | 10 | 11 | ## Methods 12 | 13 | ### NewTupleKeyWithoutCondition 14 | 15 | `func NewTupleKeyWithoutCondition(user string, relation string, object string, ) *TupleKeyWithoutCondition` 16 | 17 | NewTupleKeyWithoutCondition instantiates a new TupleKeyWithoutCondition object 18 | This constructor will assign default values to properties that have it defined, 19 | and makes sure properties required by API are set, but the set of arguments 20 | will change when the set of required properties is changed 21 | 22 | ### NewTupleKeyWithoutConditionWithDefaults 23 | 24 | `func NewTupleKeyWithoutConditionWithDefaults() *TupleKeyWithoutCondition` 25 | 26 | NewTupleKeyWithoutConditionWithDefaults instantiates a new TupleKeyWithoutCondition object 27 | This constructor will only assign default values to properties that have it defined, 28 | but it doesn't guarantee that properties required by API are set 29 | 30 | ### GetUser 31 | 32 | `func (o *TupleKeyWithoutCondition) GetUser() string` 33 | 34 | GetUser returns the User field if non-nil, zero value otherwise. 35 | 36 | ### GetUserOk 37 | 38 | `func (o *TupleKeyWithoutCondition) GetUserOk() (*string, bool)` 39 | 40 | GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise 41 | and a boolean to check if the value has been set. 42 | 43 | ### SetUser 44 | 45 | `func (o *TupleKeyWithoutCondition) SetUser(v string)` 46 | 47 | SetUser sets User field to given value. 48 | 49 | 50 | ### GetRelation 51 | 52 | `func (o *TupleKeyWithoutCondition) GetRelation() string` 53 | 54 | GetRelation returns the Relation field if non-nil, zero value otherwise. 55 | 56 | ### GetRelationOk 57 | 58 | `func (o *TupleKeyWithoutCondition) GetRelationOk() (*string, bool)` 59 | 60 | GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise 61 | and a boolean to check if the value has been set. 62 | 63 | ### SetRelation 64 | 65 | `func (o *TupleKeyWithoutCondition) SetRelation(v string)` 66 | 67 | SetRelation sets Relation field to given value. 68 | 69 | 70 | ### GetObject 71 | 72 | `func (o *TupleKeyWithoutCondition) GetObject() string` 73 | 74 | GetObject returns the Object field if non-nil, zero value otherwise. 75 | 76 | ### GetObjectOk 77 | 78 | `func (o *TupleKeyWithoutCondition) GetObjectOk() (*string, bool)` 79 | 80 | GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise 81 | and a boolean to check if the value has been set. 82 | 83 | ### SetObject 84 | 85 | `func (o *TupleKeyWithoutCondition) SetObject(v string)` 86 | 87 | SetObject sets Object field to given value. 88 | 89 | 90 | 91 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 92 | 93 | 94 | -------------------------------------------------------------------------------- /docs/TupleOperation.md: -------------------------------------------------------------------------------- 1 | # TupleOperation 2 | 3 | ## Enum 4 | 5 | 6 | * `WRITE` (value: `"TUPLE_OPERATION_WRITE"`) 7 | 8 | * `DELETE` (value: `"TUPLE_OPERATION_DELETE"`) 9 | 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/TupleToUserset.md: -------------------------------------------------------------------------------- 1 | # TupleToUserset 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Tupleset** | [**ObjectRelation**](ObjectRelation.md) | | 8 | **ComputedUserset** | [**ObjectRelation**](ObjectRelation.md) | | 9 | 10 | ## Methods 11 | 12 | ### NewTupleToUserset 13 | 14 | `func NewTupleToUserset(tupleset ObjectRelation, computedUserset ObjectRelation, ) *TupleToUserset` 15 | 16 | NewTupleToUserset instantiates a new TupleToUserset object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewTupleToUsersetWithDefaults 22 | 23 | `func NewTupleToUsersetWithDefaults() *TupleToUserset` 24 | 25 | NewTupleToUsersetWithDefaults instantiates a new TupleToUserset object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetTupleset 30 | 31 | `func (o *TupleToUserset) GetTupleset() ObjectRelation` 32 | 33 | GetTupleset returns the Tupleset field if non-nil, zero value otherwise. 34 | 35 | ### GetTuplesetOk 36 | 37 | `func (o *TupleToUserset) GetTuplesetOk() (*ObjectRelation, bool)` 38 | 39 | GetTuplesetOk returns a tuple with the Tupleset field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetTupleset 43 | 44 | `func (o *TupleToUserset) SetTupleset(v ObjectRelation)` 45 | 46 | SetTupleset sets Tupleset field to given value. 47 | 48 | 49 | ### GetComputedUserset 50 | 51 | `func (o *TupleToUserset) GetComputedUserset() ObjectRelation` 52 | 53 | GetComputedUserset returns the ComputedUserset field if non-nil, zero value otherwise. 54 | 55 | ### GetComputedUsersetOk 56 | 57 | `func (o *TupleToUserset) GetComputedUsersetOk() (*ObjectRelation, bool)` 58 | 59 | GetComputedUsersetOk returns a tuple with the ComputedUserset field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetComputedUserset 63 | 64 | `func (o *TupleToUserset) SetComputedUserset(v ObjectRelation)` 65 | 66 | SetComputedUserset sets ComputedUserset field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/TypeDefinition.md: -------------------------------------------------------------------------------- 1 | # TypeDefinition 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Type** | **string** | | 8 | **Relations** | Pointer to [**map[string]Userset**](Userset.md) | | [optional] 9 | **Metadata** | Pointer to [**Metadata**](Metadata.md) | | [optional] 10 | 11 | ## Methods 12 | 13 | ### NewTypeDefinition 14 | 15 | `func NewTypeDefinition(type_ string, ) *TypeDefinition` 16 | 17 | NewTypeDefinition instantiates a new TypeDefinition object 18 | This constructor will assign default values to properties that have it defined, 19 | and makes sure properties required by API are set, but the set of arguments 20 | will change when the set of required properties is changed 21 | 22 | ### NewTypeDefinitionWithDefaults 23 | 24 | `func NewTypeDefinitionWithDefaults() *TypeDefinition` 25 | 26 | NewTypeDefinitionWithDefaults instantiates a new TypeDefinition object 27 | This constructor will only assign default values to properties that have it defined, 28 | but it doesn't guarantee that properties required by API are set 29 | 30 | ### GetType 31 | 32 | `func (o *TypeDefinition) GetType() string` 33 | 34 | GetType returns the Type field if non-nil, zero value otherwise. 35 | 36 | ### GetTypeOk 37 | 38 | `func (o *TypeDefinition) GetTypeOk() (*string, bool)` 39 | 40 | GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise 41 | and a boolean to check if the value has been set. 42 | 43 | ### SetType 44 | 45 | `func (o *TypeDefinition) SetType(v string)` 46 | 47 | SetType sets Type field to given value. 48 | 49 | 50 | ### GetRelations 51 | 52 | `func (o *TypeDefinition) GetRelations() map[string]Userset` 53 | 54 | GetRelations returns the Relations field if non-nil, zero value otherwise. 55 | 56 | ### GetRelationsOk 57 | 58 | `func (o *TypeDefinition) GetRelationsOk() (*map[string]Userset, bool)` 59 | 60 | GetRelationsOk returns a tuple with the Relations field if it's non-nil, zero value otherwise 61 | and a boolean to check if the value has been set. 62 | 63 | ### SetRelations 64 | 65 | `func (o *TypeDefinition) SetRelations(v map[string]Userset)` 66 | 67 | SetRelations sets Relations field to given value. 68 | 69 | ### HasRelations 70 | 71 | `func (o *TypeDefinition) HasRelations() bool` 72 | 73 | HasRelations returns a boolean if a field has been set. 74 | 75 | ### GetMetadata 76 | 77 | `func (o *TypeDefinition) GetMetadata() Metadata` 78 | 79 | GetMetadata returns the Metadata field if non-nil, zero value otherwise. 80 | 81 | ### GetMetadataOk 82 | 83 | `func (o *TypeDefinition) GetMetadataOk() (*Metadata, bool)` 84 | 85 | GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise 86 | and a boolean to check if the value has been set. 87 | 88 | ### SetMetadata 89 | 90 | `func (o *TypeDefinition) SetMetadata(v Metadata)` 91 | 92 | SetMetadata sets Metadata field to given value. 93 | 94 | ### HasMetadata 95 | 96 | `func (o *TypeDefinition) HasMetadata() bool` 97 | 98 | HasMetadata returns a boolean if a field has been set. 99 | 100 | 101 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 102 | 103 | 104 | -------------------------------------------------------------------------------- /docs/TypeName.md: -------------------------------------------------------------------------------- 1 | # TypeName 2 | 3 | ## Enum 4 | 5 | 6 | * `UNSPECIFIED` (value: `"TYPE_NAME_UNSPECIFIED"`) 7 | 8 | * `ANY` (value: `"TYPE_NAME_ANY"`) 9 | 10 | * `BOOL` (value: `"TYPE_NAME_BOOL"`) 11 | 12 | * `STRING` (value: `"TYPE_NAME_STRING"`) 13 | 14 | * `INT` (value: `"TYPE_NAME_INT"`) 15 | 16 | * `UINT` (value: `"TYPE_NAME_UINT"`) 17 | 18 | * `DOUBLE` (value: `"TYPE_NAME_DOUBLE"`) 19 | 20 | * `DURATION` (value: `"TYPE_NAME_DURATION"`) 21 | 22 | * `TIMESTAMP` (value: `"TYPE_NAME_TIMESTAMP"`) 23 | 24 | * `MAP` (value: `"TYPE_NAME_MAP"`) 25 | 26 | * `LIST` (value: `"TYPE_NAME_LIST"`) 27 | 28 | * `IPADDRESS` (value: `"TYPE_NAME_IPADDRESS"`) 29 | 30 | 31 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/TypedWildcard.md: -------------------------------------------------------------------------------- 1 | # TypedWildcard 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Type** | **string** | | 8 | 9 | ## Methods 10 | 11 | ### NewTypedWildcard 12 | 13 | `func NewTypedWildcard(type_ string, ) *TypedWildcard` 14 | 15 | NewTypedWildcard instantiates a new TypedWildcard object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewTypedWildcardWithDefaults 21 | 22 | `func NewTypedWildcardWithDefaults() *TypedWildcard` 23 | 24 | NewTypedWildcardWithDefaults instantiates a new TypedWildcard object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetType 29 | 30 | `func (o *TypedWildcard) GetType() string` 31 | 32 | GetType returns the Type field if non-nil, zero value otherwise. 33 | 34 | ### GetTypeOk 35 | 36 | `func (o *TypedWildcard) GetTypeOk() (*string, bool)` 37 | 38 | GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetType 42 | 43 | `func (o *TypedWildcard) SetType(v string)` 44 | 45 | SetType sets Type field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/UnauthenticatedResponse.md: -------------------------------------------------------------------------------- 1 | # UnauthenticatedResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Code** | Pointer to [**ErrorCode**](ErrorCode.md) | | [optional] [default to ERRORCODE_NO_ERROR] 8 | **Message** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewUnauthenticatedResponse 13 | 14 | `func NewUnauthenticatedResponse() *UnauthenticatedResponse` 15 | 16 | NewUnauthenticatedResponse instantiates a new UnauthenticatedResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewUnauthenticatedResponseWithDefaults 22 | 23 | `func NewUnauthenticatedResponseWithDefaults() *UnauthenticatedResponse` 24 | 25 | NewUnauthenticatedResponseWithDefaults instantiates a new UnauthenticatedResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetCode 30 | 31 | `func (o *UnauthenticatedResponse) GetCode() ErrorCode` 32 | 33 | GetCode returns the Code field if non-nil, zero value otherwise. 34 | 35 | ### GetCodeOk 36 | 37 | `func (o *UnauthenticatedResponse) GetCodeOk() (*ErrorCode, bool)` 38 | 39 | GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetCode 43 | 44 | `func (o *UnauthenticatedResponse) SetCode(v ErrorCode)` 45 | 46 | SetCode sets Code field to given value. 47 | 48 | ### HasCode 49 | 50 | `func (o *UnauthenticatedResponse) HasCode() bool` 51 | 52 | HasCode returns a boolean if a field has been set. 53 | 54 | ### GetMessage 55 | 56 | `func (o *UnauthenticatedResponse) GetMessage() string` 57 | 58 | GetMessage returns the Message field if non-nil, zero value otherwise. 59 | 60 | ### GetMessageOk 61 | 62 | `func (o *UnauthenticatedResponse) GetMessageOk() (*string, bool)` 63 | 64 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetMessage 68 | 69 | `func (o *UnauthenticatedResponse) SetMessage(v string)` 70 | 71 | SetMessage sets Message field to given value. 72 | 73 | ### HasMessage 74 | 75 | `func (o *UnauthenticatedResponse) HasMessage() bool` 76 | 77 | HasMessage returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/UnprocessableContentErrorCode.md: -------------------------------------------------------------------------------- 1 | # UnprocessableContentErrorCode 2 | 3 | ## Enum 4 | 5 | 6 | * `NO_THROTTLED_ERROR_CODE` (value: `"no_throttled_error_code"`) 7 | 8 | * `THROTTLED_TIMEOUT_ERROR` (value: `"throttled_timeout_error"`) 9 | 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/UnprocessableContentMessageResponse.md: -------------------------------------------------------------------------------- 1 | # UnprocessableContentMessageResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Code** | Pointer to [**UnprocessableContentErrorCode**](UnprocessableContentErrorCode.md) | | [optional] [default to UNPROCESSABLECONTENTERRORCODE_NO_THROTTLED_ERROR_CODE] 8 | **Message** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewUnprocessableContentMessageResponse 13 | 14 | `func NewUnprocessableContentMessageResponse() *UnprocessableContentMessageResponse` 15 | 16 | NewUnprocessableContentMessageResponse instantiates a new UnprocessableContentMessageResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewUnprocessableContentMessageResponseWithDefaults 22 | 23 | `func NewUnprocessableContentMessageResponseWithDefaults() *UnprocessableContentMessageResponse` 24 | 25 | NewUnprocessableContentMessageResponseWithDefaults instantiates a new UnprocessableContentMessageResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetCode 30 | 31 | `func (o *UnprocessableContentMessageResponse) GetCode() UnprocessableContentErrorCode` 32 | 33 | GetCode returns the Code field if non-nil, zero value otherwise. 34 | 35 | ### GetCodeOk 36 | 37 | `func (o *UnprocessableContentMessageResponse) GetCodeOk() (*UnprocessableContentErrorCode, bool)` 38 | 39 | GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetCode 43 | 44 | `func (o *UnprocessableContentMessageResponse) SetCode(v UnprocessableContentErrorCode)` 45 | 46 | SetCode sets Code field to given value. 47 | 48 | ### HasCode 49 | 50 | `func (o *UnprocessableContentMessageResponse) HasCode() bool` 51 | 52 | HasCode returns a boolean if a field has been set. 53 | 54 | ### GetMessage 55 | 56 | `func (o *UnprocessableContentMessageResponse) GetMessage() string` 57 | 58 | GetMessage returns the Message field if non-nil, zero value otherwise. 59 | 60 | ### GetMessageOk 61 | 62 | `func (o *UnprocessableContentMessageResponse) GetMessageOk() (*string, bool)` 63 | 64 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetMessage 68 | 69 | `func (o *UnprocessableContentMessageResponse) SetMessage(v string)` 70 | 71 | SetMessage sets Message field to given value. 72 | 73 | ### HasMessage 74 | 75 | `func (o *UnprocessableContentMessageResponse) HasMessage() bool` 76 | 77 | HasMessage returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/User.md: -------------------------------------------------------------------------------- 1 | # User 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Object** | Pointer to [**FgaObject**](FgaObject.md) | | [optional] 8 | **Userset** | Pointer to [**UsersetUser**](UsersetUser.md) | | [optional] 9 | **Wildcard** | Pointer to [**TypedWildcard**](TypedWildcard.md) | | [optional] 10 | 11 | ## Methods 12 | 13 | ### NewUser 14 | 15 | `func NewUser() *User` 16 | 17 | NewUser instantiates a new User object 18 | This constructor will assign default values to properties that have it defined, 19 | and makes sure properties required by API are set, but the set of arguments 20 | will change when the set of required properties is changed 21 | 22 | ### NewUserWithDefaults 23 | 24 | `func NewUserWithDefaults() *User` 25 | 26 | NewUserWithDefaults instantiates a new User object 27 | This constructor will only assign default values to properties that have it defined, 28 | but it doesn't guarantee that properties required by API are set 29 | 30 | ### GetObject 31 | 32 | `func (o *User) GetObject() FgaObject` 33 | 34 | GetObject returns the Object field if non-nil, zero value otherwise. 35 | 36 | ### GetObjectOk 37 | 38 | `func (o *User) GetObjectOk() (*FgaObject, bool)` 39 | 40 | GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise 41 | and a boolean to check if the value has been set. 42 | 43 | ### SetObject 44 | 45 | `func (o *User) SetObject(v FgaObject)` 46 | 47 | SetObject sets Object field to given value. 48 | 49 | ### HasObject 50 | 51 | `func (o *User) HasObject() bool` 52 | 53 | HasObject returns a boolean if a field has been set. 54 | 55 | ### GetUserset 56 | 57 | `func (o *User) GetUserset() UsersetUser` 58 | 59 | GetUserset returns the Userset field if non-nil, zero value otherwise. 60 | 61 | ### GetUsersetOk 62 | 63 | `func (o *User) GetUsersetOk() (*UsersetUser, bool)` 64 | 65 | GetUsersetOk returns a tuple with the Userset field if it's non-nil, zero value otherwise 66 | and a boolean to check if the value has been set. 67 | 68 | ### SetUserset 69 | 70 | `func (o *User) SetUserset(v UsersetUser)` 71 | 72 | SetUserset sets Userset field to given value. 73 | 74 | ### HasUserset 75 | 76 | `func (o *User) HasUserset() bool` 77 | 78 | HasUserset returns a boolean if a field has been set. 79 | 80 | ### GetWildcard 81 | 82 | `func (o *User) GetWildcard() TypedWildcard` 83 | 84 | GetWildcard returns the Wildcard field if non-nil, zero value otherwise. 85 | 86 | ### GetWildcardOk 87 | 88 | `func (o *User) GetWildcardOk() (*TypedWildcard, bool)` 89 | 90 | GetWildcardOk returns a tuple with the Wildcard field if it's non-nil, zero value otherwise 91 | and a boolean to check if the value has been set. 92 | 93 | ### SetWildcard 94 | 95 | `func (o *User) SetWildcard(v TypedWildcard)` 96 | 97 | SetWildcard sets Wildcard field to given value. 98 | 99 | ### HasWildcard 100 | 101 | `func (o *User) HasWildcard() bool` 102 | 103 | HasWildcard returns a boolean if a field has been set. 104 | 105 | 106 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 107 | 108 | 109 | -------------------------------------------------------------------------------- /docs/UserTypeFilter.md: -------------------------------------------------------------------------------- 1 | # UserTypeFilter 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Type** | **string** | | 8 | **Relation** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewUserTypeFilter 13 | 14 | `func NewUserTypeFilter(type_ string, ) *UserTypeFilter` 15 | 16 | NewUserTypeFilter instantiates a new UserTypeFilter object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewUserTypeFilterWithDefaults 22 | 23 | `func NewUserTypeFilterWithDefaults() *UserTypeFilter` 24 | 25 | NewUserTypeFilterWithDefaults instantiates a new UserTypeFilter object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetType 30 | 31 | `func (o *UserTypeFilter) GetType() string` 32 | 33 | GetType returns the Type field if non-nil, zero value otherwise. 34 | 35 | ### GetTypeOk 36 | 37 | `func (o *UserTypeFilter) GetTypeOk() (*string, bool)` 38 | 39 | GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetType 43 | 44 | `func (o *UserTypeFilter) SetType(v string)` 45 | 46 | SetType sets Type field to given value. 47 | 48 | 49 | ### GetRelation 50 | 51 | `func (o *UserTypeFilter) GetRelation() string` 52 | 53 | GetRelation returns the Relation field if non-nil, zero value otherwise. 54 | 55 | ### GetRelationOk 56 | 57 | `func (o *UserTypeFilter) GetRelationOk() (*string, bool)` 58 | 59 | GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetRelation 63 | 64 | `func (o *UserTypeFilter) SetRelation(v string)` 65 | 66 | SetRelation sets Relation field to given value. 67 | 68 | ### HasRelation 69 | 70 | `func (o *UserTypeFilter) HasRelation() bool` 71 | 72 | HasRelation returns a boolean if a field has been set. 73 | 74 | 75 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 76 | 77 | 78 | -------------------------------------------------------------------------------- /docs/Users.md: -------------------------------------------------------------------------------- 1 | # Users 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Users** | **[]string** | | 8 | 9 | ## Methods 10 | 11 | ### NewUsers 12 | 13 | `func NewUsers(users []string, ) *Users` 14 | 15 | NewUsers instantiates a new Users object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewUsersWithDefaults 21 | 22 | `func NewUsersWithDefaults() *Users` 23 | 24 | NewUsersWithDefaults instantiates a new Users object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetUsers 29 | 30 | `func (o *Users) GetUsers() []string` 31 | 32 | GetUsers returns the Users field if non-nil, zero value otherwise. 33 | 34 | ### GetUsersOk 35 | 36 | `func (o *Users) GetUsersOk() (*[]string, bool)` 37 | 38 | GetUsersOk returns a tuple with the Users field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetUsers 42 | 43 | `func (o *Users) SetUsers(v []string)` 44 | 45 | SetUsers sets Users field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/UsersetTree.md: -------------------------------------------------------------------------------- 1 | # UsersetTree 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Root** | Pointer to [**Node**](Node.md) | | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewUsersetTree 12 | 13 | `func NewUsersetTree() *UsersetTree` 14 | 15 | NewUsersetTree instantiates a new UsersetTree object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewUsersetTreeWithDefaults 21 | 22 | `func NewUsersetTreeWithDefaults() *UsersetTree` 23 | 24 | NewUsersetTreeWithDefaults instantiates a new UsersetTree object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetRoot 29 | 30 | `func (o *UsersetTree) GetRoot() Node` 31 | 32 | GetRoot returns the Root field if non-nil, zero value otherwise. 33 | 34 | ### GetRootOk 35 | 36 | `func (o *UsersetTree) GetRootOk() (*Node, bool)` 37 | 38 | GetRootOk returns a tuple with the Root field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetRoot 42 | 43 | `func (o *UsersetTree) SetRoot(v Node)` 44 | 45 | SetRoot sets Root field to given value. 46 | 47 | ### HasRoot 48 | 49 | `func (o *UsersetTree) HasRoot() bool` 50 | 51 | HasRoot returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/UsersetTreeDifference.md: -------------------------------------------------------------------------------- 1 | # UsersetTreeDifference 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Base** | [**Node**](Node.md) | | 8 | **Subtract** | [**Node**](Node.md) | | 9 | 10 | ## Methods 11 | 12 | ### NewUsersetTreeDifference 13 | 14 | `func NewUsersetTreeDifference(base Node, subtract Node, ) *UsersetTreeDifference` 15 | 16 | NewUsersetTreeDifference instantiates a new UsersetTreeDifference object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewUsersetTreeDifferenceWithDefaults 22 | 23 | `func NewUsersetTreeDifferenceWithDefaults() *UsersetTreeDifference` 24 | 25 | NewUsersetTreeDifferenceWithDefaults instantiates a new UsersetTreeDifference object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetBase 30 | 31 | `func (o *UsersetTreeDifference) GetBase() Node` 32 | 33 | GetBase returns the Base field if non-nil, zero value otherwise. 34 | 35 | ### GetBaseOk 36 | 37 | `func (o *UsersetTreeDifference) GetBaseOk() (*Node, bool)` 38 | 39 | GetBaseOk returns a tuple with the Base field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetBase 43 | 44 | `func (o *UsersetTreeDifference) SetBase(v Node)` 45 | 46 | SetBase sets Base field to given value. 47 | 48 | 49 | ### GetSubtract 50 | 51 | `func (o *UsersetTreeDifference) GetSubtract() Node` 52 | 53 | GetSubtract returns the Subtract field if non-nil, zero value otherwise. 54 | 55 | ### GetSubtractOk 56 | 57 | `func (o *UsersetTreeDifference) GetSubtractOk() (*Node, bool)` 58 | 59 | GetSubtractOk returns a tuple with the Subtract field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetSubtract 63 | 64 | `func (o *UsersetTreeDifference) SetSubtract(v Node)` 65 | 66 | SetSubtract sets Subtract field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/UsersetTreeTupleToUserset.md: -------------------------------------------------------------------------------- 1 | # UsersetTreeTupleToUserset 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Tupleset** | **string** | | 8 | **Computed** | [**[]Computed**](Computed.md) | | 9 | 10 | ## Methods 11 | 12 | ### NewUsersetTreeTupleToUserset 13 | 14 | `func NewUsersetTreeTupleToUserset(tupleset string, computed []Computed, ) *UsersetTreeTupleToUserset` 15 | 16 | NewUsersetTreeTupleToUserset instantiates a new UsersetTreeTupleToUserset object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewUsersetTreeTupleToUsersetWithDefaults 22 | 23 | `func NewUsersetTreeTupleToUsersetWithDefaults() *UsersetTreeTupleToUserset` 24 | 25 | NewUsersetTreeTupleToUsersetWithDefaults instantiates a new UsersetTreeTupleToUserset object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetTupleset 30 | 31 | `func (o *UsersetTreeTupleToUserset) GetTupleset() string` 32 | 33 | GetTupleset returns the Tupleset field if non-nil, zero value otherwise. 34 | 35 | ### GetTuplesetOk 36 | 37 | `func (o *UsersetTreeTupleToUserset) GetTuplesetOk() (*string, bool)` 38 | 39 | GetTuplesetOk returns a tuple with the Tupleset field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetTupleset 43 | 44 | `func (o *UsersetTreeTupleToUserset) SetTupleset(v string)` 45 | 46 | SetTupleset sets Tupleset field to given value. 47 | 48 | 49 | ### GetComputed 50 | 51 | `func (o *UsersetTreeTupleToUserset) GetComputed() []Computed` 52 | 53 | GetComputed returns the Computed field if non-nil, zero value otherwise. 54 | 55 | ### GetComputedOk 56 | 57 | `func (o *UsersetTreeTupleToUserset) GetComputedOk() (*[]Computed, bool)` 58 | 59 | GetComputedOk returns a tuple with the Computed field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetComputed 63 | 64 | `func (o *UsersetTreeTupleToUserset) SetComputed(v []Computed)` 65 | 66 | SetComputed sets Computed field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/UsersetUser.md: -------------------------------------------------------------------------------- 1 | # UsersetUser 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Type** | **string** | | 8 | **Id** | **string** | | 9 | **Relation** | **string** | | 10 | 11 | ## Methods 12 | 13 | ### NewUsersetUser 14 | 15 | `func NewUsersetUser(type_ string, id string, relation string, ) *UsersetUser` 16 | 17 | NewUsersetUser instantiates a new UsersetUser object 18 | This constructor will assign default values to properties that have it defined, 19 | and makes sure properties required by API are set, but the set of arguments 20 | will change when the set of required properties is changed 21 | 22 | ### NewUsersetUserWithDefaults 23 | 24 | `func NewUsersetUserWithDefaults() *UsersetUser` 25 | 26 | NewUsersetUserWithDefaults instantiates a new UsersetUser object 27 | This constructor will only assign default values to properties that have it defined, 28 | but it doesn't guarantee that properties required by API are set 29 | 30 | ### GetType 31 | 32 | `func (o *UsersetUser) GetType() string` 33 | 34 | GetType returns the Type field if non-nil, zero value otherwise. 35 | 36 | ### GetTypeOk 37 | 38 | `func (o *UsersetUser) GetTypeOk() (*string, bool)` 39 | 40 | GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise 41 | and a boolean to check if the value has been set. 42 | 43 | ### SetType 44 | 45 | `func (o *UsersetUser) SetType(v string)` 46 | 47 | SetType sets Type field to given value. 48 | 49 | 50 | ### GetId 51 | 52 | `func (o *UsersetUser) GetId() string` 53 | 54 | GetId returns the Id field if non-nil, zero value otherwise. 55 | 56 | ### GetIdOk 57 | 58 | `func (o *UsersetUser) GetIdOk() (*string, bool)` 59 | 60 | GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise 61 | and a boolean to check if the value has been set. 62 | 63 | ### SetId 64 | 65 | `func (o *UsersetUser) SetId(v string)` 66 | 67 | SetId sets Id field to given value. 68 | 69 | 70 | ### GetRelation 71 | 72 | `func (o *UsersetUser) GetRelation() string` 73 | 74 | GetRelation returns the Relation field if non-nil, zero value otherwise. 75 | 76 | ### GetRelationOk 77 | 78 | `func (o *UsersetUser) GetRelationOk() (*string, bool)` 79 | 80 | GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise 81 | and a boolean to check if the value has been set. 82 | 83 | ### SetRelation 84 | 85 | `func (o *UsersetUser) SetRelation(v string)` 86 | 87 | SetRelation sets Relation field to given value. 88 | 89 | 90 | 91 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 92 | 93 | 94 | -------------------------------------------------------------------------------- /docs/Usersets.md: -------------------------------------------------------------------------------- 1 | # Usersets 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Child** | [**[]Userset**](Userset.md) | | 8 | 9 | ## Methods 10 | 11 | ### NewUsersets 12 | 13 | `func NewUsersets(child []Userset, ) *Usersets` 14 | 15 | NewUsersets instantiates a new Usersets object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewUsersetsWithDefaults 21 | 22 | `func NewUsersetsWithDefaults() *Usersets` 23 | 24 | NewUsersetsWithDefaults instantiates a new Usersets object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetChild 29 | 30 | `func (o *Usersets) GetChild() []Userset` 31 | 32 | GetChild returns the Child field if non-nil, zero value otherwise. 33 | 34 | ### GetChildOk 35 | 36 | `func (o *Usersets) GetChildOk() (*[]Userset, bool)` 37 | 38 | GetChildOk returns a tuple with the Child field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetChild 42 | 43 | `func (o *Usersets) SetChild(v []Userset)` 44 | 45 | SetChild sets Child field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/ValidationErrorMessageResponse.md: -------------------------------------------------------------------------------- 1 | # ValidationErrorMessageResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Code** | Pointer to [**ErrorCode**](ErrorCode.md) | | [optional] [default to ERRORCODE_NO_ERROR] 8 | **Message** | Pointer to **string** | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewValidationErrorMessageResponse 13 | 14 | `func NewValidationErrorMessageResponse() *ValidationErrorMessageResponse` 15 | 16 | NewValidationErrorMessageResponse instantiates a new ValidationErrorMessageResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewValidationErrorMessageResponseWithDefaults 22 | 23 | `func NewValidationErrorMessageResponseWithDefaults() *ValidationErrorMessageResponse` 24 | 25 | NewValidationErrorMessageResponseWithDefaults instantiates a new ValidationErrorMessageResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetCode 30 | 31 | `func (o *ValidationErrorMessageResponse) GetCode() ErrorCode` 32 | 33 | GetCode returns the Code field if non-nil, zero value otherwise. 34 | 35 | ### GetCodeOk 36 | 37 | `func (o *ValidationErrorMessageResponse) GetCodeOk() (*ErrorCode, bool)` 38 | 39 | GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetCode 43 | 44 | `func (o *ValidationErrorMessageResponse) SetCode(v ErrorCode)` 45 | 46 | SetCode sets Code field to given value. 47 | 48 | ### HasCode 49 | 50 | `func (o *ValidationErrorMessageResponse) HasCode() bool` 51 | 52 | HasCode returns a boolean if a field has been set. 53 | 54 | ### GetMessage 55 | 56 | `func (o *ValidationErrorMessageResponse) GetMessage() string` 57 | 58 | GetMessage returns the Message field if non-nil, zero value otherwise. 59 | 60 | ### GetMessageOk 61 | 62 | `func (o *ValidationErrorMessageResponse) GetMessageOk() (*string, bool)` 63 | 64 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetMessage 68 | 69 | `func (o *ValidationErrorMessageResponse) SetMessage(v string)` 70 | 71 | SetMessage sets Message field to given value. 72 | 73 | ### HasMessage 74 | 75 | `func (o *ValidationErrorMessageResponse) HasMessage() bool` 76 | 77 | HasMessage returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/WriteAssertionsRequest.md: -------------------------------------------------------------------------------- 1 | # WriteAssertionsRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Assertions** | [**[]Assertion**](Assertion.md) | | 8 | 9 | ## Methods 10 | 11 | ### NewWriteAssertionsRequest 12 | 13 | `func NewWriteAssertionsRequest(assertions []Assertion, ) *WriteAssertionsRequest` 14 | 15 | NewWriteAssertionsRequest instantiates a new WriteAssertionsRequest object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewWriteAssertionsRequestWithDefaults 21 | 22 | `func NewWriteAssertionsRequestWithDefaults() *WriteAssertionsRequest` 23 | 24 | NewWriteAssertionsRequestWithDefaults instantiates a new WriteAssertionsRequest object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetAssertions 29 | 30 | `func (o *WriteAssertionsRequest) GetAssertions() []Assertion` 31 | 32 | GetAssertions returns the Assertions field if non-nil, zero value otherwise. 33 | 34 | ### GetAssertionsOk 35 | 36 | `func (o *WriteAssertionsRequest) GetAssertionsOk() (*[]Assertion, bool)` 37 | 38 | GetAssertionsOk returns a tuple with the Assertions field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetAssertions 42 | 43 | `func (o *WriteAssertionsRequest) SetAssertions(v []Assertion)` 44 | 45 | SetAssertions sets Assertions field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/WriteAuthorizationModelResponse.md: -------------------------------------------------------------------------------- 1 | # WriteAuthorizationModelResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **AuthorizationModelId** | **string** | | 8 | 9 | ## Methods 10 | 11 | ### NewWriteAuthorizationModelResponse 12 | 13 | `func NewWriteAuthorizationModelResponse(authorizationModelId string, ) *WriteAuthorizationModelResponse` 14 | 15 | NewWriteAuthorizationModelResponse instantiates a new WriteAuthorizationModelResponse object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewWriteAuthorizationModelResponseWithDefaults 21 | 22 | `func NewWriteAuthorizationModelResponseWithDefaults() *WriteAuthorizationModelResponse` 23 | 24 | NewWriteAuthorizationModelResponseWithDefaults instantiates a new WriteAuthorizationModelResponse object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetAuthorizationModelId 29 | 30 | `func (o *WriteAuthorizationModelResponse) GetAuthorizationModelId() string` 31 | 32 | GetAuthorizationModelId returns the AuthorizationModelId field if non-nil, zero value otherwise. 33 | 34 | ### GetAuthorizationModelIdOk 35 | 36 | `func (o *WriteAuthorizationModelResponse) GetAuthorizationModelIdOk() (*string, bool)` 37 | 38 | GetAuthorizationModelIdOk returns a tuple with the AuthorizationModelId field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetAuthorizationModelId 42 | 43 | `func (o *WriteAuthorizationModelResponse) SetAuthorizationModelId(v string)` 44 | 45 | SetAuthorizationModelId sets AuthorizationModelId field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/WriteRequestDeletes.md: -------------------------------------------------------------------------------- 1 | # WriteRequestDeletes 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **TupleKeys** | [**[]TupleKeyWithoutCondition**](TupleKeyWithoutCondition.md) | | 8 | 9 | ## Methods 10 | 11 | ### NewWriteRequestDeletes 12 | 13 | `func NewWriteRequestDeletes(tupleKeys []TupleKeyWithoutCondition, ) *WriteRequestDeletes` 14 | 15 | NewWriteRequestDeletes instantiates a new WriteRequestDeletes object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewWriteRequestDeletesWithDefaults 21 | 22 | `func NewWriteRequestDeletesWithDefaults() *WriteRequestDeletes` 23 | 24 | NewWriteRequestDeletesWithDefaults instantiates a new WriteRequestDeletes object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetTupleKeys 29 | 30 | `func (o *WriteRequestDeletes) GetTupleKeys() []TupleKeyWithoutCondition` 31 | 32 | GetTupleKeys returns the TupleKeys field if non-nil, zero value otherwise. 33 | 34 | ### GetTupleKeysOk 35 | 36 | `func (o *WriteRequestDeletes) GetTupleKeysOk() (*[]TupleKeyWithoutCondition, bool)` 37 | 38 | GetTupleKeysOk returns a tuple with the TupleKeys field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetTupleKeys 42 | 43 | `func (o *WriteRequestDeletes) SetTupleKeys(v []TupleKeyWithoutCondition)` 44 | 45 | SetTupleKeys sets TupleKeys field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/WriteRequestWrites.md: -------------------------------------------------------------------------------- 1 | # WriteRequestWrites 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **TupleKeys** | [**[]TupleKey**](TupleKey.md) | | 8 | 9 | ## Methods 10 | 11 | ### NewWriteRequestWrites 12 | 13 | `func NewWriteRequestWrites(tupleKeys []TupleKey, ) *WriteRequestWrites` 14 | 15 | NewWriteRequestWrites instantiates a new WriteRequestWrites object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewWriteRequestWritesWithDefaults 21 | 22 | `func NewWriteRequestWritesWithDefaults() *WriteRequestWrites` 23 | 24 | NewWriteRequestWritesWithDefaults instantiates a new WriteRequestWrites object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetTupleKeys 29 | 30 | `func (o *WriteRequestWrites) GetTupleKeys() []TupleKey` 31 | 32 | GetTupleKeys returns the TupleKeys field if non-nil, zero value otherwise. 33 | 34 | ### GetTupleKeysOk 35 | 36 | `func (o *WriteRequestWrites) GetTupleKeysOk() (*[]TupleKey, bool)` 37 | 38 | GetTupleKeysOk returns a tuple with the TupleKeys field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetTupleKeys 42 | 43 | `func (o *WriteRequestWrites) SetTupleKeys(v []TupleKey)` 44 | 45 | SetTupleKeys sets TupleKeys field to given value. 46 | 47 | 48 | 49 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 50 | 51 | 52 | -------------------------------------------------------------------------------- /example/Makefile: -------------------------------------------------------------------------------- 1 | all: run 2 | 3 | project_name=example1 4 | openfga_version=latest 5 | 6 | restore: 7 | go mod tidy 8 | 9 | run: restore 10 | go run ${project_name}/${project_name}.go 11 | 12 | run-openfga: 13 | docker pull docker.io/openfga/openfga:${openfga_version} && \ 14 | docker run -p 8080:8080 docker.io/openfga/openfga:${openfga_version} run 15 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | ## Examples of using the OpenFGA Go SDK 2 | 3 | A set of examples on how to call the OpenFGA Go SDK 4 | 5 | ### Examples 6 | Example 1: 7 | A bare bones example. It creates a store, and runs a set of calls against it including creating a model, writing tuples and checking for access. 8 | 9 | 10 | ### Running the Examples 11 | 12 | Prerequisites: 13 | - `docker` 14 | - `make` 15 | - `go` 1.21+ 16 | 17 | #### Run using a published SDK 18 | 19 | Steps 20 | 1. Clone/Copy the example folder 21 | 2. If you have an OpenFGA server running, you can use it, otherwise run `make run-openfga` to spin up an instance (you'll need to switch to a different terminal after - don't forget to close it when done) 22 | 3. Run `make run` to run the example 23 | 24 | #### Run using a local unpublished SDK build 25 | 26 | Steps 27 | 1. Build the SDK 28 | 2. In the Example `go.mod`, uncomment out the part that replaces the remote SDK with the local one, e.g. 29 | ``` 30 | // To refrence local build, uncomment below and run `go mod tidy` 31 | replace github.com/openfga/go-sdk v0.3.2 => ../../ 32 | ``` 33 | 3. If you have an OpenFGA server running, you can use it, otherwise run `make run-openfga` to spin up an instance (you'll need to switch to a different terminal after - don't forget to close it when done) 34 | 4. Run `make run` to run the example -------------------------------------------------------------------------------- /example/example1/go.mod: -------------------------------------------------------------------------------- 1 | module example1 2 | 3 | go 1.23.0 4 | 5 | toolchain go1.24.0 6 | 7 | require github.com/openfga/go-sdk v0.7.1 8 | 9 | require ( 10 | github.com/go-logr/logr v1.4.2 // indirect 11 | github.com/go-logr/stdr v1.2.2 // indirect 12 | github.com/sourcegraph/conc v0.3.0 // indirect 13 | go.opentelemetry.io/auto/sdk v1.1.0 // indirect 14 | go.opentelemetry.io/otel v1.35.0 // indirect 15 | go.opentelemetry.io/otel/metric v1.35.0 // indirect 16 | go.opentelemetry.io/otel/trace v1.35.0 // indirect 17 | go.uber.org/atomic v1.7.0 // indirect 18 | go.uber.org/multierr v1.9.0 // indirect 19 | golang.org/x/sync v0.12.0 // indirect 20 | ) 21 | 22 | // To reference local build, uncomment below and run `go mod tidy` 23 | replace github.com/openfga/go-sdk v0.7.1 => ../../ 24 | -------------------------------------------------------------------------------- /example/example1/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 2 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 3 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 4 | github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 5 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= 6 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 7 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= 8 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= 9 | github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= 10 | github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= 11 | github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= 12 | github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= 13 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 14 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 15 | github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= 16 | github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= 17 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 18 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 19 | github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= 20 | github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 21 | go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= 22 | go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= 23 | go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= 24 | go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= 25 | go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= 26 | go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= 27 | go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= 28 | go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= 29 | go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= 30 | go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 31 | go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= 32 | go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= 33 | golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= 34 | golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 35 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 36 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 37 | -------------------------------------------------------------------------------- /example/opentelemetry/go.mod: -------------------------------------------------------------------------------- 1 | module openfga-opentelemetry-example 2 | 3 | go 1.23.0 4 | 5 | toolchain go1.24.0 6 | 7 | // To reference local build, uncomment below and run `go mod tidy` 8 | replace github.com/openfga/go-sdk v0.7.1 => ../../ 9 | 10 | require ( 11 | github.com/joho/godotenv v1.5.1 12 | github.com/openfga/go-sdk v0.7.1 13 | go.opentelemetry.io/otel v1.35.0 14 | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0 15 | go.opentelemetry.io/otel/sdk v1.35.0 16 | go.opentelemetry.io/otel/sdk/metric v1.35.0 17 | google.golang.org/grpc v1.71.0 18 | ) 19 | 20 | require ( 21 | github.com/cenkalti/backoff/v4 v4.3.0 // indirect 22 | github.com/go-logr/logr v1.4.2 // indirect 23 | github.com/go-logr/stdr v1.2.2 // indirect 24 | github.com/google/uuid v1.6.0 // indirect 25 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect 26 | github.com/sourcegraph/conc v0.3.0 // indirect 27 | go.opentelemetry.io/auto/sdk v1.1.0 // indirect 28 | go.opentelemetry.io/otel/metric v1.35.0 // indirect 29 | go.opentelemetry.io/otel/trace v1.35.0 // indirect 30 | go.opentelemetry.io/proto/otlp v1.5.0 // indirect 31 | go.uber.org/atomic v1.7.0 // indirect 32 | go.uber.org/multierr v1.9.0 // indirect 33 | golang.org/x/net v0.38.0 // indirect 34 | golang.org/x/sync v0.13.0 // indirect 35 | golang.org/x/sys v0.31.0 // indirect 36 | golang.org/x/text v0.23.0 // indirect 37 | google.golang.org/genproto/googleapis/api v0.0.0-20250311190419-81fb87f6b8bf // indirect 38 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250311190419-81fb87f6b8bf // indirect 39 | google.golang.org/protobuf v1.36.5 // indirect 40 | ) 41 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/openfga/go-sdk 2 | 3 | go 1.23.0 4 | 5 | toolchain go1.24.0 6 | 7 | require ( 8 | github.com/jarcoal/httpmock v1.4.0 9 | github.com/sourcegraph/conc v0.3.0 10 | go.opentelemetry.io/otel v1.35.0 11 | go.opentelemetry.io/otel/metric v1.35.0 12 | golang.org/x/sync v0.13.0 13 | ) 14 | 15 | require ( 16 | github.com/go-logr/logr v1.4.2 // indirect 17 | github.com/go-logr/stdr v1.2.2 // indirect 18 | go.opentelemetry.io/auto/sdk v1.1.0 // indirect 19 | go.opentelemetry.io/otel/trace v1.35.0 // indirect 20 | go.uber.org/atomic v1.7.0 // indirect 21 | go.uber.org/multierr v1.9.0 // indirect 22 | ) 23 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 2 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 3 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 4 | github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 5 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= 6 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 7 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= 8 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= 9 | github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= 10 | github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= 11 | github.com/jarcoal/httpmock v1.4.0 h1:BvhqnH0JAYbNudL2GMJKgOHe2CtKlzJ/5rWKyp+hc2k= 12 | github.com/jarcoal/httpmock v1.4.0/go.mod h1:ftW1xULwo+j0R0JJkJIIi7UKigZUXCLLanykgjwBXL0= 13 | github.com/maxatome/go-testdeep v1.14.0 h1:rRlLv1+kI8eOI3OaBXZwb3O7xY3exRzdW5QyX48g9wI= 14 | github.com/maxatome/go-testdeep v1.14.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= 15 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 16 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 17 | github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= 18 | github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= 19 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 20 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 21 | github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= 22 | github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 23 | go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= 24 | go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= 25 | go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= 26 | go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= 27 | go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= 28 | go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= 29 | go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= 30 | go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= 31 | go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= 32 | go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 33 | go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= 34 | go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= 35 | golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= 36 | golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 37 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 38 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 39 | -------------------------------------------------------------------------------- /internal/utils/retryutils/retryparams.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package retryutils 14 | 15 | import "fmt" 16 | 17 | // RetryParams configures configuration for retry in case of HTTP too many request 18 | type RetryParams struct { 19 | MaxRetry int `json:"maxRetry,omitempty"` 20 | MinWaitInMs int `json:"minWaitInMs,omitempty"` 21 | } 22 | 23 | var defaultRetryParams = RetryParams{ 24 | MaxRetry: defaultMaxRetry, 25 | MinWaitInMs: defaultMinWaitInMs, 26 | } 27 | 28 | func (r *RetryParams) Validate() error { 29 | if r.MaxRetry < 0 || r.MaxRetry > retryMaxAllowedNumber { 30 | return fmt.Errorf("maxRetry must be between 0 and %d", retryMaxAllowedNumber) 31 | 32 | } 33 | 34 | if r.MinWaitInMs <= 0 { 35 | return fmt.Errorf("maxRetry must be greater than 0") 36 | } 37 | 38 | return nil 39 | } 40 | 41 | func GetRetryParamsOrDefault(r *RetryParams) RetryParams { 42 | if r == nil { 43 | return defaultRetryParams 44 | } 45 | 46 | return *r 47 | } 48 | 49 | func NewRetryParams(retryParams *RetryParams) (*RetryParams, error) { 50 | if retryParams == nil { 51 | return &defaultRetryParams, nil 52 | } 53 | 54 | if err := retryParams.Validate(); err != nil { 55 | return &defaultRetryParams, err 56 | } 57 | 58 | return retryParams, nil 59 | } 60 | -------------------------------------------------------------------------------- /internal/utils/retryutils/retryparams_test.go: -------------------------------------------------------------------------------- 1 | package retryutils 2 | 3 | import "testing" 4 | 5 | func TestValidateMaxRetry(t *testing.T) { 6 | t.Run("MaxRetry within valid range", func(t *testing.T) { 7 | params := RetryParams{MaxRetry: 2, MinWaitInMs: 100} 8 | err := params.Validate() 9 | if err != nil { 10 | t.Fatalf("Expected no error, got %v", err) 11 | } 12 | }) 13 | 14 | t.Run("MaxRetry below valid range", func(t *testing.T) { 15 | params := RetryParams{MaxRetry: -1, MinWaitInMs: 100} 16 | err := params.Validate() 17 | if err == nil { 18 | t.Fatalf("Expected error, got nil") 19 | } 20 | }) 21 | 22 | t.Run("MaxRetry above valid range", func(t *testing.T) { 23 | params := RetryParams{MaxRetry: 15 + 1, MinWaitInMs: 100} 24 | err := params.Validate() 25 | if err == nil { 26 | t.Fatalf("Expected error, got nil") 27 | } 28 | }) 29 | } 30 | 31 | func TestValidateMinWaitInMs(t *testing.T) { 32 | t.Run("MinWaitInMs greater than 0", func(t *testing.T) { 33 | params := RetryParams{MaxRetry: 2, MinWaitInMs: 100} 34 | err := params.Validate() 35 | if err != nil { 36 | t.Fatalf("Expected no error, got %v", err) 37 | } 38 | }) 39 | 40 | t.Run("MinWaitInMs equal to 0", func(t *testing.T) { 41 | params := RetryParams{MaxRetry: 2, MinWaitInMs: 0} 42 | err := params.Validate() 43 | if err == nil { 44 | t.Fatalf("Expected error, got nil") 45 | } 46 | }) 47 | 48 | t.Run("MinWaitInMs less than 0", func(t *testing.T) { 49 | params := RetryParams{MaxRetry: 2, MinWaitInMs: -1} 50 | err := params.Validate() 51 | if err == nil { 52 | t.Fatalf("Expected error, got nil") 53 | } 54 | }) 55 | } 56 | 57 | func TestNewRetryParamsValidation(t *testing.T) { 58 | t.Run("Nil input returns default", func(t *testing.T) { 59 | got, err := NewRetryParams(nil) 60 | if err != nil { 61 | t.Fatalf("Expected no error, got %v", err) 62 | } 63 | if *got != defaultRetryParams { 64 | t.Fatalf("Expected %v, got %v", defaultRetryParams, got) 65 | } 66 | }) 67 | 68 | t.Run("Valid input returns input", func(t *testing.T) { 69 | params := &RetryParams{MaxRetry: 2, MinWaitInMs: 100} 70 | got, err := NewRetryParams(params) 71 | if err != nil { 72 | t.Fatalf("Expected no error, got %v", err) 73 | } 74 | if *got != *params { 75 | t.Fatalf("Expected %v, got %v", params, got) 76 | } 77 | }) 78 | 79 | t.Run("Invalid input returns default with error", func(t *testing.T) { 80 | params := &RetryParams{MaxRetry: -1, MinWaitInMs: 100} 81 | got, err := NewRetryParams(params) 82 | if err == nil { 83 | t.Fatalf("Expected error, got nil") 84 | } 85 | if *got != defaultRetryParams { 86 | t.Fatalf("Expected %v, got %v", defaultRetryParams, got) 87 | } 88 | }) 89 | } 90 | -------------------------------------------------------------------------------- /internal/utils/ulid.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package internalutils 14 | 15 | import ( 16 | "regexp" 17 | ) 18 | 19 | // cUlidRegex contains the regex for valid ULID 20 | const cUlidRegex = "^[0-7][0-9A-HJKMNP-TV-Z]{25}$" 21 | 22 | // IsWellFormedUlidString returns whethr the ulidString is a properly formatted ulid string 23 | func IsWellFormedUlidString(ulidString string) bool { 24 | re := regexp.MustCompile(cUlidRegex) 25 | return re.MatchString(ulidString) 26 | } 27 | -------------------------------------------------------------------------------- /internal/utils/ulid_test.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package internalutils 14 | 15 | import ( 16 | "testing" 17 | ) 18 | 19 | func TestIsWellFormedUlidString(t *testing.T) { 20 | tests := []struct { 21 | name string 22 | input string 23 | isValid bool 24 | }{ 25 | { 26 | name: "valid_ulid", 27 | input: "01GRC27AM72M4SGK4VBHF3DY0F", 28 | isValid: true, 29 | }, 30 | { 31 | name: "invalid_symbols", 32 | input: "01GRC27AM72M4S$^4VBHF3DY0F", 33 | isValid: false, 34 | }, 35 | { 36 | name: "not_start_in_0-7", 37 | input: "A1GRC27AM72M4SGK4VBHF3DY0F", 38 | isValid: false, 39 | }, 40 | { 41 | name: "too_long", 42 | input: "01GRC27AM72M4SGK4VBHF3DY0FA", 43 | isValid: false, 44 | }, 45 | { 46 | name: "too_short", 47 | input: "01GRC27AM72M4SGK4VBHF3DY0", 48 | isValid: false, 49 | }, 50 | } 51 | 52 | for _, test := range tests { 53 | t.Run(test.name, func(t *testing.T) { 54 | isValid := IsWellFormedUlidString(test.input) 55 | if isValid != test.isValid { 56 | t.Errorf("Expect %s to be valid %v actual %v", test.input, test.isValid, isValid) 57 | } 58 | }) 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /model_any.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "bytes" 17 | 18 | "encoding/json" 19 | ) 20 | 21 | // Any struct for Any 22 | type Any struct { 23 | Type *string `json:"@type,omitempty" yaml:"@type,omitempty"` 24 | } 25 | 26 | // NewAny instantiates a new Any object 27 | // This constructor will assign default values to properties that have it defined, 28 | // and makes sure properties required by API are set, but the set of arguments 29 | // will change when the set of required properties is changed 30 | func NewAny() *Any { 31 | this := Any{} 32 | return &this 33 | } 34 | 35 | // NewAnyWithDefaults instantiates a new Any object 36 | // This constructor will only assign default values to properties that have it defined, 37 | // but it doesn't guarantee that properties required by API are set 38 | func NewAnyWithDefaults() *Any { 39 | this := Any{} 40 | return &this 41 | } 42 | 43 | // GetType returns the Type field value if set, zero value otherwise. 44 | func (o *Any) GetType() string { 45 | if o == nil || o.Type == nil { 46 | var ret string 47 | return ret 48 | } 49 | return *o.Type 50 | } 51 | 52 | // GetTypeOk returns a tuple with the Type field value if set, nil otherwise 53 | // and a boolean to check if the value has been set. 54 | func (o *Any) GetTypeOk() (*string, bool) { 55 | if o == nil || o.Type == nil { 56 | return nil, false 57 | } 58 | return o.Type, true 59 | } 60 | 61 | // HasType returns a boolean if a field has been set. 62 | func (o *Any) HasType() bool { 63 | if o != nil && o.Type != nil { 64 | return true 65 | } 66 | 67 | return false 68 | } 69 | 70 | // SetType gets a reference to the given string and assigns it to the Type field. 71 | func (o *Any) SetType(v string) { 72 | o.Type = &v 73 | } 74 | 75 | func (o Any) MarshalJSON() ([]byte, error) { 76 | toSerialize := map[string]interface{}{} 77 | if o.Type != nil { 78 | toSerialize["@type"] = o.Type 79 | } 80 | var b bytes.Buffer 81 | enc := json.NewEncoder(&b) 82 | enc.SetEscapeHTML(false) 83 | err := enc.Encode(toSerialize) 84 | if err != nil { 85 | return nil, err 86 | } 87 | return b.Bytes(), nil 88 | } 89 | 90 | type NullableAny struct { 91 | value *Any 92 | isSet bool 93 | } 94 | 95 | func (v NullableAny) Get() *Any { 96 | return v.value 97 | } 98 | 99 | func (v *NullableAny) Set(val *Any) { 100 | v.value = val 101 | v.isSet = true 102 | } 103 | 104 | func (v NullableAny) IsSet() bool { 105 | return v.isSet 106 | } 107 | 108 | func (v *NullableAny) Unset() { 109 | v.value = nil 110 | v.isSet = false 111 | } 112 | 113 | func NewNullableAny(val *Any) *NullableAny { 114 | return &NullableAny{value: val, isSet: true} 115 | } 116 | 117 | func (v NullableAny) MarshalJSON() ([]byte, error) { 118 | return json.Marshal(v.value) 119 | } 120 | 121 | func (v *NullableAny) UnmarshalJSON(src []byte) error { 122 | v.isSet = true 123 | return json.Unmarshal(src, &v.value) 124 | } 125 | -------------------------------------------------------------------------------- /model_computed.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "bytes" 17 | 18 | "encoding/json" 19 | ) 20 | 21 | // Computed struct for Computed 22 | type Computed struct { 23 | Userset string `json:"userset" yaml:"userset"` 24 | } 25 | 26 | // NewComputed instantiates a new Computed object 27 | // This constructor will assign default values to properties that have it defined, 28 | // and makes sure properties required by API are set, but the set of arguments 29 | // will change when the set of required properties is changed 30 | func NewComputed(userset string) *Computed { 31 | this := Computed{} 32 | this.Userset = userset 33 | return &this 34 | } 35 | 36 | // NewComputedWithDefaults instantiates a new Computed object 37 | // This constructor will only assign default values to properties that have it defined, 38 | // but it doesn't guarantee that properties required by API are set 39 | func NewComputedWithDefaults() *Computed { 40 | this := Computed{} 41 | return &this 42 | } 43 | 44 | // GetUserset returns the Userset field value 45 | func (o *Computed) GetUserset() string { 46 | if o == nil { 47 | var ret string 48 | return ret 49 | } 50 | 51 | return o.Userset 52 | } 53 | 54 | // GetUsersetOk returns a tuple with the Userset field value 55 | // and a boolean to check if the value has been set. 56 | func (o *Computed) GetUsersetOk() (*string, bool) { 57 | if o == nil { 58 | return nil, false 59 | } 60 | return &o.Userset, true 61 | } 62 | 63 | // SetUserset sets field value 64 | func (o *Computed) SetUserset(v string) { 65 | o.Userset = v 66 | } 67 | 68 | func (o Computed) MarshalJSON() ([]byte, error) { 69 | toSerialize := map[string]interface{}{} 70 | toSerialize["userset"] = o.Userset 71 | var b bytes.Buffer 72 | enc := json.NewEncoder(&b) 73 | enc.SetEscapeHTML(false) 74 | err := enc.Encode(toSerialize) 75 | if err != nil { 76 | return nil, err 77 | } 78 | return b.Bytes(), nil 79 | } 80 | 81 | type NullableComputed struct { 82 | value *Computed 83 | isSet bool 84 | } 85 | 86 | func (v NullableComputed) Get() *Computed { 87 | return v.value 88 | } 89 | 90 | func (v *NullableComputed) Set(val *Computed) { 91 | v.value = val 92 | v.isSet = true 93 | } 94 | 95 | func (v NullableComputed) IsSet() bool { 96 | return v.isSet 97 | } 98 | 99 | func (v *NullableComputed) Unset() { 100 | v.value = nil 101 | v.isSet = false 102 | } 103 | 104 | func NewNullableComputed(val *Computed) *NullableComputed { 105 | return &NullableComputed{value: val, isSet: true} 106 | } 107 | 108 | func (v NullableComputed) MarshalJSON() ([]byte, error) { 109 | return json.Marshal(v.value) 110 | } 111 | 112 | func (v *NullableComputed) UnmarshalJSON(src []byte) error { 113 | v.isSet = true 114 | return json.Unmarshal(src, &v.value) 115 | } 116 | -------------------------------------------------------------------------------- /model_nodes.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "bytes" 17 | 18 | "encoding/json" 19 | ) 20 | 21 | // Nodes struct for Nodes 22 | type Nodes struct { 23 | Nodes []Node `json:"nodes" yaml:"nodes"` 24 | } 25 | 26 | // NewNodes instantiates a new Nodes object 27 | // This constructor will assign default values to properties that have it defined, 28 | // and makes sure properties required by API are set, but the set of arguments 29 | // will change when the set of required properties is changed 30 | func NewNodes(nodes []Node) *Nodes { 31 | this := Nodes{} 32 | this.Nodes = nodes 33 | return &this 34 | } 35 | 36 | // NewNodesWithDefaults instantiates a new Nodes object 37 | // This constructor will only assign default values to properties that have it defined, 38 | // but it doesn't guarantee that properties required by API are set 39 | func NewNodesWithDefaults() *Nodes { 40 | this := Nodes{} 41 | return &this 42 | } 43 | 44 | // GetNodes returns the Nodes field value 45 | func (o *Nodes) GetNodes() []Node { 46 | if o == nil { 47 | var ret []Node 48 | return ret 49 | } 50 | 51 | return o.Nodes 52 | } 53 | 54 | // GetNodesOk returns a tuple with the Nodes field value 55 | // and a boolean to check if the value has been set. 56 | func (o *Nodes) GetNodesOk() (*[]Node, bool) { 57 | if o == nil { 58 | return nil, false 59 | } 60 | return &o.Nodes, true 61 | } 62 | 63 | // SetNodes sets field value 64 | func (o *Nodes) SetNodes(v []Node) { 65 | o.Nodes = v 66 | } 67 | 68 | func (o Nodes) MarshalJSON() ([]byte, error) { 69 | toSerialize := map[string]interface{}{} 70 | toSerialize["nodes"] = o.Nodes 71 | var b bytes.Buffer 72 | enc := json.NewEncoder(&b) 73 | enc.SetEscapeHTML(false) 74 | err := enc.Encode(toSerialize) 75 | if err != nil { 76 | return nil, err 77 | } 78 | return b.Bytes(), nil 79 | } 80 | 81 | type NullableNodes struct { 82 | value *Nodes 83 | isSet bool 84 | } 85 | 86 | func (v NullableNodes) Get() *Nodes { 87 | return v.value 88 | } 89 | 90 | func (v *NullableNodes) Set(val *Nodes) { 91 | v.value = val 92 | v.isSet = true 93 | } 94 | 95 | func (v NullableNodes) IsSet() bool { 96 | return v.isSet 97 | } 98 | 99 | func (v *NullableNodes) Unset() { 100 | v.value = nil 101 | v.isSet = false 102 | } 103 | 104 | func NewNullableNodes(val *Nodes) *NullableNodes { 105 | return &NullableNodes{value: val, isSet: true} 106 | } 107 | 108 | func (v NullableNodes) MarshalJSON() ([]byte, error) { 109 | return json.Marshal(v.value) 110 | } 111 | 112 | func (v *NullableNodes) UnmarshalJSON(src []byte) error { 113 | v.isSet = true 114 | return json.Unmarshal(src, &v.value) 115 | } 116 | -------------------------------------------------------------------------------- /model_null_value.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "encoding/json" 17 | "fmt" 18 | ) 19 | 20 | // NullValue `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value. 21 | type NullValue string 22 | 23 | // List of NullValue 24 | const ( 25 | NULLVALUE_NULL_VALUE NullValue = "NULL_VALUE" 26 | ) 27 | 28 | var allowedNullValueEnumValues = []NullValue{ 29 | "NULL_VALUE", 30 | } 31 | 32 | func (v *NullValue) UnmarshalJSON(src []byte) error { 33 | var value string 34 | err := json.Unmarshal(src, &value) 35 | if err != nil { 36 | return err 37 | } 38 | enumTypeValue := NullValue(value) 39 | for _, existing := range allowedNullValueEnumValues { 40 | if existing == enumTypeValue { 41 | *v = enumTypeValue 42 | return nil 43 | } 44 | } 45 | 46 | return fmt.Errorf("%+v is not a valid NullValue", value) 47 | } 48 | 49 | // NewNullValueFromValue returns a pointer to a valid NullValue 50 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 51 | func NewNullValueFromValue(v string) (*NullValue, error) { 52 | ev := NullValue(v) 53 | if ev.IsValid() { 54 | return &ev, nil 55 | } else { 56 | return nil, fmt.Errorf("invalid value '%v' for NullValue: valid values are %v", v, allowedNullValueEnumValues) 57 | } 58 | } 59 | 60 | // IsValid return true if the value is valid for the enum, false otherwise 61 | func (v NullValue) IsValid() bool { 62 | for _, existing := range allowedNullValueEnumValues { 63 | if existing == v { 64 | return true 65 | } 66 | } 67 | return false 68 | } 69 | 70 | // Ptr returns reference to NullValue value 71 | func (v NullValue) Ptr() *NullValue { 72 | return &v 73 | } 74 | 75 | type NullableNullValue struct { 76 | value *NullValue 77 | isSet bool 78 | } 79 | 80 | func (v NullableNullValue) Get() *NullValue { 81 | return v.value 82 | } 83 | 84 | func (v *NullableNullValue) Set(val *NullValue) { 85 | v.value = val 86 | v.isSet = true 87 | } 88 | 89 | func (v NullableNullValue) IsSet() bool { 90 | return v.isSet 91 | } 92 | 93 | func (v *NullableNullValue) Unset() { 94 | v.value = nil 95 | v.isSet = false 96 | } 97 | 98 | func NewNullableNullValue(val *NullValue) *NullableNullValue { 99 | return &NullableNullValue{value: val, isSet: true} 100 | } 101 | 102 | func (v NullableNullValue) MarshalJSON() ([]byte, error) { 103 | return json.Marshal(v.value) 104 | } 105 | 106 | func (v *NullableNullValue) UnmarshalJSON(src []byte) error { 107 | v.isSet = true 108 | return json.Unmarshal(src, &v.value) 109 | } 110 | -------------------------------------------------------------------------------- /model_tuple_operation.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "encoding/json" 17 | "fmt" 18 | ) 19 | 20 | // TupleOperation the model 'TupleOperation' 21 | type TupleOperation string 22 | 23 | // List of TupleOperation 24 | const ( 25 | TUPLEOPERATION_WRITE TupleOperation = "TUPLE_OPERATION_WRITE" 26 | TUPLEOPERATION_DELETE TupleOperation = "TUPLE_OPERATION_DELETE" 27 | ) 28 | 29 | var allowedTupleOperationEnumValues = []TupleOperation{ 30 | "TUPLE_OPERATION_WRITE", 31 | "TUPLE_OPERATION_DELETE", 32 | } 33 | 34 | func (v *TupleOperation) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | enumTypeValue := TupleOperation(value) 41 | for _, existing := range allowedTupleOperationEnumValues { 42 | if existing == enumTypeValue { 43 | *v = enumTypeValue 44 | return nil 45 | } 46 | } 47 | 48 | return fmt.Errorf("%+v is not a valid TupleOperation", value) 49 | } 50 | 51 | // NewTupleOperationFromValue returns a pointer to a valid TupleOperation 52 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 53 | func NewTupleOperationFromValue(v string) (*TupleOperation, error) { 54 | ev := TupleOperation(v) 55 | if ev.IsValid() { 56 | return &ev, nil 57 | } else { 58 | return nil, fmt.Errorf("invalid value '%v' for TupleOperation: valid values are %v", v, allowedTupleOperationEnumValues) 59 | } 60 | } 61 | 62 | // IsValid return true if the value is valid for the enum, false otherwise 63 | func (v TupleOperation) IsValid() bool { 64 | for _, existing := range allowedTupleOperationEnumValues { 65 | if existing == v { 66 | return true 67 | } 68 | } 69 | return false 70 | } 71 | 72 | // Ptr returns reference to TupleOperation value 73 | func (v TupleOperation) Ptr() *TupleOperation { 74 | return &v 75 | } 76 | 77 | type NullableTupleOperation struct { 78 | value *TupleOperation 79 | isSet bool 80 | } 81 | 82 | func (v NullableTupleOperation) Get() *TupleOperation { 83 | return v.value 84 | } 85 | 86 | func (v *NullableTupleOperation) Set(val *TupleOperation) { 87 | v.value = val 88 | v.isSet = true 89 | } 90 | 91 | func (v NullableTupleOperation) IsSet() bool { 92 | return v.isSet 93 | } 94 | 95 | func (v *NullableTupleOperation) Unset() { 96 | v.value = nil 97 | v.isSet = false 98 | } 99 | 100 | func NewNullableTupleOperation(val *TupleOperation) *NullableTupleOperation { 101 | return &NullableTupleOperation{value: val, isSet: true} 102 | } 103 | 104 | func (v NullableTupleOperation) MarshalJSON() ([]byte, error) { 105 | return json.Marshal(v.value) 106 | } 107 | 108 | func (v *NullableTupleOperation) UnmarshalJSON(src []byte) error { 109 | v.isSet = true 110 | return json.Unmarshal(src, &v.value) 111 | } 112 | -------------------------------------------------------------------------------- /model_users.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "bytes" 17 | 18 | "encoding/json" 19 | ) 20 | 21 | // Users struct for Users 22 | type Users struct { 23 | Users []string `json:"users" yaml:"users"` 24 | } 25 | 26 | // NewUsers instantiates a new Users object 27 | // This constructor will assign default values to properties that have it defined, 28 | // and makes sure properties required by API are set, but the set of arguments 29 | // will change when the set of required properties is changed 30 | func NewUsers(users []string) *Users { 31 | this := Users{} 32 | this.Users = users 33 | return &this 34 | } 35 | 36 | // NewUsersWithDefaults instantiates a new Users object 37 | // This constructor will only assign default values to properties that have it defined, 38 | // but it doesn't guarantee that properties required by API are set 39 | func NewUsersWithDefaults() *Users { 40 | this := Users{} 41 | return &this 42 | } 43 | 44 | // GetUsers returns the Users field value 45 | func (o *Users) GetUsers() []string { 46 | if o == nil { 47 | var ret []string 48 | return ret 49 | } 50 | 51 | return o.Users 52 | } 53 | 54 | // GetUsersOk returns a tuple with the Users field value 55 | // and a boolean to check if the value has been set. 56 | func (o *Users) GetUsersOk() (*[]string, bool) { 57 | if o == nil { 58 | return nil, false 59 | } 60 | return &o.Users, true 61 | } 62 | 63 | // SetUsers sets field value 64 | func (o *Users) SetUsers(v []string) { 65 | o.Users = v 66 | } 67 | 68 | func (o Users) MarshalJSON() ([]byte, error) { 69 | toSerialize := map[string]interface{}{} 70 | toSerialize["users"] = o.Users 71 | var b bytes.Buffer 72 | enc := json.NewEncoder(&b) 73 | enc.SetEscapeHTML(false) 74 | err := enc.Encode(toSerialize) 75 | if err != nil { 76 | return nil, err 77 | } 78 | return b.Bytes(), nil 79 | } 80 | 81 | type NullableUsers struct { 82 | value *Users 83 | isSet bool 84 | } 85 | 86 | func (v NullableUsers) Get() *Users { 87 | return v.value 88 | } 89 | 90 | func (v *NullableUsers) Set(val *Users) { 91 | v.value = val 92 | v.isSet = true 93 | } 94 | 95 | func (v NullableUsers) IsSet() bool { 96 | return v.isSet 97 | } 98 | 99 | func (v *NullableUsers) Unset() { 100 | v.value = nil 101 | v.isSet = false 102 | } 103 | 104 | func NewNullableUsers(val *Users) *NullableUsers { 105 | return &NullableUsers{value: val, isSet: true} 106 | } 107 | 108 | func (v NullableUsers) MarshalJSON() ([]byte, error) { 109 | return json.Marshal(v.value) 110 | } 111 | 112 | func (v *NullableUsers) UnmarshalJSON(src []byte) error { 113 | v.isSet = true 114 | return json.Unmarshal(src, &v.value) 115 | } 116 | -------------------------------------------------------------------------------- /model_usersets.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "bytes" 17 | 18 | "encoding/json" 19 | ) 20 | 21 | // Usersets struct for Usersets 22 | type Usersets struct { 23 | Child []Userset `json:"child" yaml:"child"` 24 | } 25 | 26 | // NewUsersets instantiates a new Usersets object 27 | // This constructor will assign default values to properties that have it defined, 28 | // and makes sure properties required by API are set, but the set of arguments 29 | // will change when the set of required properties is changed 30 | func NewUsersets(child []Userset) *Usersets { 31 | this := Usersets{} 32 | this.Child = child 33 | return &this 34 | } 35 | 36 | // NewUsersetsWithDefaults instantiates a new Usersets object 37 | // This constructor will only assign default values to properties that have it defined, 38 | // but it doesn't guarantee that properties required by API are set 39 | func NewUsersetsWithDefaults() *Usersets { 40 | this := Usersets{} 41 | return &this 42 | } 43 | 44 | // GetChild returns the Child field value 45 | func (o *Usersets) GetChild() []Userset { 46 | if o == nil { 47 | var ret []Userset 48 | return ret 49 | } 50 | 51 | return o.Child 52 | } 53 | 54 | // GetChildOk returns a tuple with the Child field value 55 | // and a boolean to check if the value has been set. 56 | func (o *Usersets) GetChildOk() (*[]Userset, bool) { 57 | if o == nil { 58 | return nil, false 59 | } 60 | return &o.Child, true 61 | } 62 | 63 | // SetChild sets field value 64 | func (o *Usersets) SetChild(v []Userset) { 65 | o.Child = v 66 | } 67 | 68 | func (o Usersets) MarshalJSON() ([]byte, error) { 69 | toSerialize := map[string]interface{}{} 70 | toSerialize["child"] = o.Child 71 | var b bytes.Buffer 72 | enc := json.NewEncoder(&b) 73 | enc.SetEscapeHTML(false) 74 | err := enc.Encode(toSerialize) 75 | if err != nil { 76 | return nil, err 77 | } 78 | return b.Bytes(), nil 79 | } 80 | 81 | type NullableUsersets struct { 82 | value *Usersets 83 | isSet bool 84 | } 85 | 86 | func (v NullableUsersets) Get() *Usersets { 87 | return v.value 88 | } 89 | 90 | func (v *NullableUsersets) Set(val *Usersets) { 91 | v.value = val 92 | v.isSet = true 93 | } 94 | 95 | func (v NullableUsersets) IsSet() bool { 96 | return v.isSet 97 | } 98 | 99 | func (v *NullableUsersets) Unset() { 100 | v.value = nil 101 | v.isSet = false 102 | } 103 | 104 | func NewNullableUsersets(val *Usersets) *NullableUsersets { 105 | return &NullableUsersets{value: val, isSet: true} 106 | } 107 | 108 | func (v NullableUsersets) MarshalJSON() ([]byte, error) { 109 | return json.Marshal(v.value) 110 | } 111 | 112 | func (v *NullableUsersets) UnmarshalJSON(src []byte) error { 113 | v.isSet = true 114 | return json.Unmarshal(src, &v.value) 115 | } 116 | -------------------------------------------------------------------------------- /oauth2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /oauth2/ORIGINAL_AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /oauth2/ORIGINAL_CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /oauth2/README.md: -------------------------------------------------------------------------------- 1 | This oauth2 folder contains a oauth2 package with a partial client OAuth2 implementation. 2 | 3 | It has been copied over from the original for our use. A lot of the original code and dependencies have been deleted, and the rest reshuffled. 4 | 5 | Original Project: Go OAuth2 - [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2) 6 | * Commit hash at the time of cloning [d3ed0bb246c8d3c75b63937d9a5eecff9c74d7fe](https://github.com/golang/oauth2/blob/d3ed0bb246c8d3c75b63937d9a5eecff9c74d7fe/) 7 | * Original Project's Repo on GitHub: [golang/oauth2](https://github.com/golang/oauth2/) 8 | * Original Project's Repo on Google Open Source: https://cs.opensource.google/go/x/oauth2 9 | * License: [BSD 3-Clause](https://github.com/golang/oauth2/blob/d3ed0bb246c8d3c75b63937d9a5eecff9c74d7fe/LICENSE) - [Local copy](./LICENSE) 10 | 11 | Note: The original authors are not aware of this fork, and do not endorse it in any way. 12 | -------------------------------------------------------------------------------- /oauth2/internal/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package internal contains support packages for oauth2 package. 6 | package internal 7 | -------------------------------------------------------------------------------- /oauth2/internal/transport.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | import ( 8 | "context" 9 | "net/http" 10 | ) 11 | 12 | // HTTPClient is the context key to use with golang.org/x/net/context's 13 | // WithValue function to associate an *http.Client value with a context. 14 | var HTTPClient ContextKey 15 | 16 | // ContextKey is just an empty struct. It exists so HTTPClient can be 17 | // an immutable public variable with a unique type. It's immutable 18 | // because nobody else can create a ContextKey, being unexported. 19 | type ContextKey struct{} 20 | 21 | var appengineClientHook func(context.Context) *http.Client 22 | 23 | func ContextClient(ctx context.Context) *http.Client { 24 | if ctx != nil { 25 | if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok { 26 | return hc 27 | } 28 | } 29 | if appengineClientHook != nil { 30 | return appengineClientHook(ctx) 31 | } 32 | return http.DefaultClient 33 | } 34 | -------------------------------------------------------------------------------- /oauth2/token_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package oauth2 6 | 7 | import ( 8 | "testing" 9 | "time" 10 | ) 11 | 12 | func TestTokenExtra(t *testing.T) { 13 | type testCase struct { 14 | key string 15 | val interface{} 16 | want interface{} 17 | } 18 | const key = "extra-key" 19 | cases := []testCase{ 20 | {key: key, val: "abc", want: "abc"}, 21 | {key: key, val: 123, want: 123}, 22 | {key: key, val: "", want: ""}, 23 | {key: "other-key", val: "def", want: nil}, 24 | } 25 | for _, tc := range cases { 26 | extra := make(map[string]interface{}) 27 | extra[tc.key] = tc.val 28 | tok := &Token{raw: extra} 29 | if got, want := tok.Extra(key), tc.want; got != want { 30 | t.Errorf("Extra(%q) = %q; want %q", key, got, want) 31 | } 32 | } 33 | } 34 | 35 | func TestTokenExpiry(t *testing.T) { 36 | now := time.Now() 37 | timeNow = func() time.Time { return now } 38 | defer func() { timeNow = time.Now }() 39 | 40 | cases := []struct { 41 | name string 42 | tok *Token 43 | want bool 44 | }{ 45 | {name: "12 seconds", tok: &Token{Expiry: now.Add(12 * time.Second)}, want: false}, 46 | {name: "10 seconds", tok: &Token{Expiry: now.Add(expiryDelta)}, want: false}, 47 | {name: "10 seconds-1ns", tok: &Token{Expiry: now.Add(expiryDelta - 1*time.Nanosecond)}, want: true}, 48 | {name: "-1 hour", tok: &Token{Expiry: now.Add(-1 * time.Hour)}, want: true}, 49 | } 50 | for _, tc := range cases { 51 | if got, want := tc.tok.expired(), tc.want; got != want { 52 | t.Errorf("expired (%q) = %v; want %v", tc.name, got, want) 53 | } 54 | } 55 | } 56 | 57 | func TestTokenTypeMethod(t *testing.T) { 58 | cases := []struct { 59 | name string 60 | tok *Token 61 | want string 62 | }{ 63 | {name: "bearer-mixed_case", tok: &Token{TokenType: "beAREr"}, want: "Bearer"}, 64 | {name: "default-bearer", tok: &Token{}, want: "Bearer"}, 65 | {name: "basic", tok: &Token{TokenType: "basic"}, want: "Basic"}, 66 | {name: "basic-capitalized", tok: &Token{TokenType: "Basic"}, want: "Basic"}, 67 | {name: "mac", tok: &Token{TokenType: "mac"}, want: "MAC"}, 68 | {name: "mac-caps", tok: &Token{TokenType: "MAC"}, want: "MAC"}, 69 | {name: "mac-mixed_case", tok: &Token{TokenType: "mAc"}, want: "MAC"}, 70 | } 71 | for _, tc := range cases { 72 | if got, want := tc.tok.Type(), tc.want; got != want { 73 | t.Errorf("TokenType(%q) = %v; want %v", tc.name, got, want) 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /oauth2/transport.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package oauth2 6 | 7 | import ( 8 | "errors" 9 | "net/http" 10 | ) 11 | 12 | // Transport is an http.RoundTripper that makes OAuth 2.0 HTTP requests, 13 | // wrapping a base RoundTripper and adding an Authorization header 14 | // with a token from the supplied Sources. 15 | // 16 | // Transport is a low-level mechanism. Most code will use the 17 | // higher-level Config.Client method instead. 18 | type Transport struct { 19 | // Source supplies the token to add to outgoing requests' 20 | // Authorization headers. 21 | Source TokenSource 22 | 23 | // Base is the base RoundTripper used to make HTTP requests. 24 | // If nil, http.DefaultTransport is used. 25 | Base http.RoundTripper 26 | } 27 | 28 | // RoundTrip authorizes and authenticates the request with an 29 | // access token from Transport's Source. 30 | func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { 31 | reqBodyClosed := false 32 | if req.Body != nil { 33 | defer func() { 34 | if !reqBodyClosed { 35 | _ = req.Body.Close() 36 | } 37 | }() 38 | } 39 | 40 | if t.Source == nil { 41 | return nil, errors.New("oauth2: Transport's Source is nil") 42 | } 43 | token, err := t.Source.Token() 44 | if err != nil { 45 | return nil, err 46 | } 47 | 48 | req2 := cloneRequest(req) // per RoundTripper contract 49 | token.SetAuthHeader(req2) 50 | 51 | // req.Body is assumed to be closed by the base RoundTripper. 52 | reqBodyClosed = true 53 | return t.base().RoundTrip(req2) 54 | } 55 | 56 | func (t *Transport) base() http.RoundTripper { 57 | if t.Base != nil { 58 | return t.Base 59 | } 60 | return http.DefaultTransport 61 | } 62 | 63 | // cloneRequest returns a clone of the provided *http.Request. 64 | // The clone is a shallow copy of the struct and its Header map. 65 | func cloneRequest(r *http.Request) *http.Request { 66 | // shallow copy of the struct 67 | r2 := new(http.Request) 68 | *r2 = *r 69 | // deep copy of the Header 70 | r2.Header = make(http.Header, len(r.Header)) 71 | for k, s := range r.Header { 72 | r2.Header[k] = append([]string(nil), s...) 73 | } 74 | return r2 75 | } 76 | -------------------------------------------------------------------------------- /response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Go SDK for OpenFGA 3 | * 4 | * API version: 1.x 5 | * Website: https://openfga.dev 6 | * Documentation: https://openfga.dev/docs 7 | * Support: https://openfga.dev/community 8 | * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE) 9 | * 10 | * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. 11 | */ 12 | 13 | package openfga 14 | 15 | import ( 16 | "net/http" 17 | ) 18 | 19 | // APIResponse stores the API response returned by the server. 20 | type APIResponse struct { 21 | *http.Response `json:"-"` 22 | Message string `json:"message,omitempty"` 23 | // Operation is the name of the OpenAPI operation. 24 | Operation string `json:"operation,omitempty"` 25 | // RequestURL is the request URL. This value is always available, even if the 26 | // embedded *http.Response is nil. 27 | RequestURL string `json:"url,omitempty"` 28 | // Method is the HTTP method used for the request. This value is always 29 | // available, even if the embedded *http.Response is nil. 30 | Method string `json:"method,omitempty"` 31 | // Payload holds the contents of the response body (which may be nil or empty). 32 | // This is provided here as the raw response.Body() reader will have already 33 | // been drained. 34 | Payload []byte `json:"-"` 35 | } 36 | 37 | // NewAPIResponse returns a new APIResponse object. 38 | func NewAPIResponse(r *http.Response) *APIResponse { 39 | 40 | response := &APIResponse{Response: r} 41 | return response 42 | } 43 | 44 | // NewAPIResponseWithError returns a new APIResponse object with the provided error message. 45 | func NewAPIResponseWithError(errorMessage string) *APIResponse { 46 | 47 | response := &APIResponse{Message: errorMessage} 48 | return response 49 | } 50 | -------------------------------------------------------------------------------- /telemetry/attribute.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | type Attribute struct { 4 | Name string 5 | } 6 | -------------------------------------------------------------------------------- /telemetry/attribute_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestAttributeCreation(t *testing.T) { 8 | attrName := "test-attribute" 9 | attr := &Attribute{Name: attrName} 10 | 11 | if attr.Name != attrName { 12 | t.Errorf("Expected Attribute Name to be '%s', but got '%s'", attrName, attr.Name) 13 | } 14 | } 15 | 16 | func TestEmptyAttributeCreation(t *testing.T) { 17 | attr := &Attribute{} 18 | 19 | if attr.Name != "" { 20 | t.Errorf("Expected Attribute Name to be empty, but got '%s'", attr.Name) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /telemetry/attributes_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | "time" 8 | ) 9 | 10 | func TestBuildTelemetryAttributes(t *testing.T) { 11 | metrics := &Metrics{} 12 | 13 | req := httptest.NewRequest(http.MethodGet, "http://example.com", nil) 14 | req.Header.Set("User-Agent", "test-agent") 15 | 16 | res := &http.Response{ 17 | StatusCode: http.StatusOK, 18 | Header: make(http.Header), 19 | } 20 | res.Header.Set("openfga-authorization-model-id", "test-model-id") 21 | res.Header.Set("fga-query-duration-ms", "123") 22 | 23 | methodParameters := map[string]interface{}{ 24 | "storeId": "test-store-id", 25 | "authorizationModelId": "test-model-id", 26 | } 27 | 28 | requestStarted := time.Now().Add(-500 * time.Millisecond) 29 | 30 | resendCount := 2 31 | 32 | attrs, queryDuration, requestDuration, err := metrics.BuildTelemetryAttributes("TestMethod", methodParameters, req, res, requestStarted, resendCount) 33 | 34 | if err != nil { 35 | t.Errorf("Expected no error from BuildTelemetryAttributes, but got %v", err) 36 | } 37 | 38 | if attrs[FGAClientRequestMethod] != "TestMethod" { 39 | t.Errorf("Expected method to be 'TestMethod', but got %v", attrs[FGAClientRequestMethod]) 40 | } 41 | 42 | if attrs[FGAClientRequestStoreID] != "test-store-id" { 43 | t.Errorf("Expected store ID to be 'test-store-id', but got %v", attrs[FGAClientRequestStoreID]) 44 | } 45 | 46 | if attrs[FGAClientRequestModelID] != "test-model-id" { 47 | t.Errorf("Expected model ID to be 'test-model-id', but got %v", attrs[FGAClientRequestModelID]) 48 | } 49 | 50 | if attrs[FGAClientResponseModelID] != "test-model-id" { 51 | t.Errorf("Expected model ID in response to be 'test-model-id', but got %v", attrs[FGAClientResponseModelID]) 52 | } 53 | 54 | if attrs[HTTPServerRequestDuration] != "123" { 55 | t.Errorf("Expected query duration to be '123', but got %v", attrs[HTTPServerRequestDuration]) 56 | } 57 | 58 | if attrs[HTTPRequestResendCount] != "2" { 59 | t.Errorf("Expected resend count to be '2', but got %v", attrs[HTTPRequestResendCount]) 60 | } 61 | 62 | if requestDuration <= 0 { 63 | t.Errorf("Expected positive request duration, but got %v", requestDuration) 64 | } 65 | 66 | if queryDuration != 123.0 { 67 | t.Errorf("Expected query duration to be 123.0, but got %v", queryDuration) 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /telemetry/configuration_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestDefaultTelemetryConfiguration(t *testing.T) { 8 | config := DefaultTelemetryConfiguration() 9 | 10 | if config == nil { 11 | t.Fatalf("Expected non-nil configuration, but got nil") 12 | } 13 | 14 | if config.Metrics == nil { 15 | t.Fatalf("Expected non-nil Metrics configuration, but got nil") 16 | } 17 | 18 | testMetricConfiguration := func(metricConfig *MetricConfiguration, metricName string) { 19 | if metricConfig == nil { 20 | t.Fatalf("Expected non-nil MetricConfiguration for %s, but got nil", metricName) 21 | } 22 | 23 | if !metricConfig.ATTR_FGA_CLIENT_REQUEST_CLIENT_ID.Enabled { 24 | t.Errorf("Expected %s.ATTR_FGA_CLIENT_REQUEST_CLIENT_ID to be enabled, but it was not", metricName) 25 | } 26 | if !metricConfig.ATTR_HTTP_REQUEST_METHOD.Enabled { 27 | t.Errorf("Expected %s.ATTR_HTTP_REQUEST_METHOD to be enabled, but it was not", metricName) 28 | } 29 | if !metricConfig.ATTR_FGA_CLIENT_REQUEST_MODEL_ID.Enabled { 30 | t.Errorf("Expected %s.ATTR_FGA_CLIENT_REQUEST_MODEL_ID to be enabled, but it was not", metricName) 31 | } 32 | if !metricConfig.ATTR_FGA_CLIENT_REQUEST_STORE_ID.Enabled { 33 | t.Errorf("Expected %s.ATTR_FGA_CLIENT_REQUEST_STORE_ID to be enabled, but it was not", metricName) 34 | } 35 | if !metricConfig.ATTR_FGA_CLIENT_RESPONSE_MODEL_ID.Enabled { 36 | t.Errorf("Expected %s.ATTR_FGA_CLIENT_RESPONSE_MODEL_ID to be enabled, but it was not", metricName) 37 | } 38 | if !metricConfig.ATTR_HTTP_HOST.Enabled { 39 | t.Errorf("Expected %s.ATTR_HTTP_HOST to be enabled, but it was not", metricName) 40 | } 41 | if !metricConfig.ATTR_HTTP_REQUEST_RESEND_COUNT.Enabled { 42 | t.Errorf("Expected %s.ATTR_HTTP_REQUEST_RESEND_COUNT to be enabled, but it was not", metricName) 43 | } 44 | if !metricConfig.ATTR_HTTP_RESPONSE_STATUS_CODE.Enabled { 45 | t.Errorf("Expected %s.ATTR_HTTP_RESPONSE_STATUS_CODE to be enabled, but it was not", metricName) 46 | } 47 | if !metricConfig.ATTR_URL_FULL.Enabled { 48 | t.Errorf("Expected %s.ATTR_URL_FULL to be enabled, but it was not", metricName) 49 | } 50 | if !metricConfig.ATTR_URL_SCHEME.Enabled { 51 | t.Errorf("Expected %s.ATTR_URL_SCHEME to be enabled, but it was not", metricName) 52 | } 53 | if !metricConfig.ATTR_USER_AGENT_ORIGINAL.Enabled { 54 | t.Errorf("Expected %s.ATTR_USER_AGENT_ORIGINAL to be enabled, but it was not", metricName) 55 | } 56 | } 57 | 58 | testMetricConfiguration(config.Metrics.METRIC_COUNTER_CREDENTIALS_REQUEST, "METRIC_COUNTER_CREDENTIALS_REQUEST") 59 | testMetricConfiguration(config.Metrics.METRIC_HISTOGRAM_REQUEST_DURATION, "METRIC_HISTOGRAM_REQUEST_DURATION") 60 | testMetricConfiguration(config.Metrics.METRIC_HISTOGRAM_QUERY_DURATION, "METRIC_HISTOGRAM_QUERY_DURATION") 61 | } 62 | -------------------------------------------------------------------------------- /telemetry/counter.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | type Counter struct { 4 | Name string 5 | Description string 6 | } 7 | 8 | func (m *Counter) GetName() string { 9 | return m.Name 10 | } 11 | 12 | func (m *Counter) GetDescription() string { 13 | return m.Description 14 | } 15 | -------------------------------------------------------------------------------- /telemetry/counter_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestCounterCreation(t *testing.T) { 8 | counterName := "test-counter" 9 | counterDescription := "This is a test counter." 10 | 11 | counter := &Counter{ 12 | Name: counterName, 13 | Description: counterDescription, 14 | } 15 | 16 | if counter.GetName() != counterName { 17 | t.Errorf("Expected Counter Name to be '%s', but got '%s'", counterName, counter.GetName()) 18 | } 19 | 20 | if counter.GetDescription() != counterDescription { 21 | t.Errorf("Expected Counter Description to be '%s', but got '%s'", counterDescription, counter.GetDescription()) 22 | } 23 | } 24 | 25 | func TestEmptyCounterCreation(t *testing.T) { 26 | counter := &Counter{} 27 | 28 | if counter.GetName() != "" { 29 | t.Errorf("Expected Counter Name to be empty, but got '%s'", counter.GetName()) 30 | } 31 | 32 | if counter.GetDescription() != "" { 33 | t.Errorf("Expected Counter Description to be empty, but got '%s'", counter.GetDescription()) 34 | } 35 | } 36 | 37 | func TestCounterWithWhitespaceName(t *testing.T) { 38 | counterName := " " 39 | counterDescription := "Counter with whitespace name." 40 | 41 | counter := &Counter{ 42 | Name: counterName, 43 | Description: counterDescription, 44 | } 45 | 46 | if counter.GetName() != counterName { 47 | t.Errorf("Expected Counter Name to be '%s', but got '%s'", counterName, counter.GetName()) 48 | } 49 | 50 | if counter.GetDescription() != counterDescription { 51 | t.Errorf("Expected Counter Description to be '%s', but got '%s'", counterDescription, counter.GetDescription()) 52 | } 53 | } 54 | 55 | func TestCounterWithSpecialCharacters(t *testing.T) { 56 | counterName := "!@#$%^&*()_+{}|:\"<>?" 57 | counterDescription := "Description with special characters: !@#$%^&*()_+{}|:\"<>?" 58 | 59 | counter := &Counter{ 60 | Name: counterName, 61 | Description: counterDescription, 62 | } 63 | 64 | if counter.GetName() != counterName { 65 | t.Errorf("Expected Counter Name to be '%s', but got '%s'", counterName, counter.GetName()) 66 | } 67 | 68 | if counter.GetDescription() != counterDescription { 69 | t.Errorf("Expected Counter Description to be '%s', but got '%s'", counterDescription, counter.GetDescription()) 70 | } 71 | } 72 | 73 | func TestCounterWithLongNameAndDescription(t *testing.T) { 74 | counterName := "ThisIsAVeryLongCounterNameToTestEdgeCasesInTheTelemetryModule" 75 | counterDescription := "This is a very long description to test how the Counter struct handles long strings." 76 | 77 | counter := &Counter{ 78 | Name: counterName, 79 | Description: counterDescription, 80 | } 81 | 82 | if counter.GetName() != counterName { 83 | t.Errorf("Expected Counter Name to be '%s', but got '%s'", counterName, counter.GetName()) 84 | } 85 | 86 | if counter.GetDescription() != counterDescription { 87 | t.Errorf("Expected Counter Description to be '%s', but got '%s'", counterDescription, counter.GetDescription()) 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /telemetry/counters.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | const ( 4 | METRIC_COUNTER_CREDENTIALS_REQUEST string = "fga-client.credentials.request" 5 | ) 6 | 7 | var CredentialsRequest = &Counter{ 8 | Name: METRIC_COUNTER_CREDENTIALS_REQUEST, 9 | Description: "The total number of times new access tokens have been requested using ClientCredentials.", 10 | } 11 | -------------------------------------------------------------------------------- /telemetry/counters_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestCredentialsRequestCounter(t *testing.T) { 8 | expectedName := METRIC_COUNTER_CREDENTIALS_REQUEST 9 | expectedDescription := "The total number of times new access tokens have been requested using ClientCredentials." 10 | 11 | if CredentialsRequest == nil { 12 | t.Fatalf("Expected CredentialsRequest to be initialized, but got nil") 13 | } 14 | 15 | if CredentialsRequest.GetName() != expectedName { 16 | t.Errorf("Expected Name to be '%s', but got '%s'", expectedName, CredentialsRequest.GetName()) 17 | } 18 | 19 | if CredentialsRequest.GetDescription() != expectedDescription { 20 | t.Errorf("Expected Description to be '%s', but got '%s'", expectedDescription, CredentialsRequest.GetDescription()) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /telemetry/histogram.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | type Histogram struct { 4 | Name string 5 | Unit string 6 | Description string 7 | } 8 | 9 | func (m *Histogram) GetName() string { 10 | return m.Name 11 | } 12 | 13 | func (m *Histogram) GetDescription() string { 14 | return m.Description 15 | } 16 | 17 | func (m *Histogram) GetUnit() string { 18 | return m.Unit 19 | } 20 | -------------------------------------------------------------------------------- /telemetry/histogram_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestHistogramCreation(t *testing.T) { 8 | histogramName := "request_duration" 9 | histogramUnit := "milliseconds" 10 | histogramDescription := "The duration of client requests." 11 | 12 | histogram := &Histogram{ 13 | Name: histogramName, 14 | Unit: histogramUnit, 15 | Description: histogramDescription, 16 | } 17 | 18 | if histogram.GetName() != histogramName { 19 | t.Errorf("Expected Histogram Name to be '%s', but got '%s'", histogramName, histogram.GetName()) 20 | } 21 | 22 | if histogram.GetUnit() != histogramUnit { 23 | t.Errorf("Expected Histogram Unit to be '%s', but got '%s'", histogramUnit, histogram.GetUnit()) 24 | } 25 | 26 | if histogram.GetDescription() != histogramDescription { 27 | t.Errorf("Expected Histogram Description to be '%s', but got '%s'", histogramDescription, histogram.GetDescription()) 28 | } 29 | } 30 | 31 | func TestEmptyHistogramCreation(t *testing.T) { 32 | histogram := &Histogram{} 33 | 34 | if histogram.GetName() != "" { 35 | t.Errorf("Expected Histogram Name to be empty, but got '%s'", histogram.GetName()) 36 | } 37 | 38 | if histogram.GetUnit() != "" { 39 | t.Errorf("Expected Histogram Unit to be empty, but got '%s'", histogram.GetUnit()) 40 | } 41 | 42 | if histogram.GetDescription() != "" { 43 | t.Errorf("Expected Histogram Description to be empty, but got '%s'", histogram.GetDescription()) 44 | } 45 | } 46 | 47 | func TestHistogramWithSpecialCharacters(t *testing.T) { 48 | histogramName := "request_duration!@#$%" 49 | histogramUnit := "ms!@#$%" 50 | histogramDescription := "The duration of client requests!@#$%." 51 | 52 | histogram := &Histogram{ 53 | Name: histogramName, 54 | Unit: histogramUnit, 55 | Description: histogramDescription, 56 | } 57 | 58 | if histogram.GetName() != histogramName { 59 | t.Errorf("Expected Histogram Name to be '%s', but got '%s'", histogramName, histogram.GetName()) 60 | } 61 | 62 | if histogram.GetUnit() != histogramUnit { 63 | t.Errorf("Expected Histogram Unit to be '%s', but got '%s'", histogramUnit, histogram.GetUnit()) 64 | } 65 | 66 | if histogram.GetDescription() != histogramDescription { 67 | t.Errorf("Expected Histogram Description to be '%s', but got '%s'", histogramDescription, histogram.GetDescription()) 68 | } 69 | } 70 | 71 | func TestHistogramWithLongStrings(t *testing.T) { 72 | histogramName := "this_is_a_very_long_histogram_name_to_test_edge_cases_in_the_telemetry_module" 73 | histogramUnit := "milliseconds_with_long_unit_name" 74 | histogramDescription := "This is a very long description to test how the Histogram struct handles long strings in the telemetry module." 75 | 76 | histogram := &Histogram{ 77 | Name: histogramName, 78 | Unit: histogramUnit, 79 | Description: histogramDescription, 80 | } 81 | 82 | if histogram.GetName() != histogramName { 83 | t.Errorf("Expected Histogram Name to be '%s', but got '%s'", histogramName, histogram.GetName()) 84 | } 85 | 86 | if histogram.GetUnit() != histogramUnit { 87 | t.Errorf("Expected Histogram Unit to be '%s', but got '%s'", histogramUnit, histogram.GetUnit()) 88 | } 89 | 90 | if histogram.GetDescription() != histogramDescription { 91 | t.Errorf("Expected Histogram Description to be '%s', but got '%s'", histogramDescription, histogram.GetDescription()) 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /telemetry/histograms.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | const ( 4 | METRIC_HISTOGRAM_REQUEST_DURATION string = "fga-client.request.duration" 5 | METRIC_HISTOGRAM_QUERY_DURATION string = "fga-client.query.duration" 6 | ) 7 | 8 | var ( 9 | RequestDuration = &Histogram{ 10 | Name: METRIC_HISTOGRAM_REQUEST_DURATION, 11 | Unit: "milliseconds", 12 | Description: "The total time (in milliseconds) it took for the request to complete, including the time it took to send the request and receive the response.", 13 | } 14 | 15 | QueryDuration = &Histogram{ 16 | Name: METRIC_HISTOGRAM_QUERY_DURATION, 17 | Unit: "milliseconds", 18 | Description: "The total time it took (in milliseconds) for the FGA server to process and evaluate the request.", 19 | } 20 | ) 21 | -------------------------------------------------------------------------------- /telemetry/histograms_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestRequestDurationHistogram(t *testing.T) { 8 | expectedName := METRIC_HISTOGRAM_REQUEST_DURATION 9 | expectedUnit := "milliseconds" 10 | expectedDescription := "The total time (in milliseconds) it took for the request to complete, including the time it took to send the request and receive the response." 11 | 12 | if RequestDuration == nil { 13 | t.Fatalf("Expected RequestDuration to be initialized, but got nil") 14 | } 15 | 16 | if RequestDuration.GetName() != expectedName { 17 | t.Errorf("Expected RequestDuration Name to be '%s', but got '%s'", expectedName, RequestDuration.GetName()) 18 | } 19 | 20 | if RequestDuration.GetUnit() != expectedUnit { 21 | t.Errorf("Expected RequestDuration Unit to be '%s', but got '%s'", expectedUnit, RequestDuration.GetUnit()) 22 | } 23 | 24 | if RequestDuration.GetDescription() != expectedDescription { 25 | t.Errorf("Expected RequestDuration Description to be '%s', but got '%s'", expectedDescription, RequestDuration.GetDescription()) 26 | } 27 | } 28 | 29 | func TestQueryDurationHistogram(t *testing.T) { 30 | expectedName := METRIC_HISTOGRAM_QUERY_DURATION 31 | expectedUnit := "milliseconds" 32 | expectedDescription := "The total time it took (in milliseconds) for the FGA server to process and evaluate the request." 33 | 34 | if QueryDuration == nil { 35 | t.Fatalf("Expected QueryDuration to be initialized, but got nil") 36 | } 37 | 38 | if QueryDuration.GetName() != expectedName { 39 | t.Errorf("Expected QueryDuration Name to be '%s', but got '%s'", expectedName, QueryDuration.GetName()) 40 | } 41 | 42 | if QueryDuration.GetUnit() != expectedUnit { 43 | t.Errorf("Expected QueryDuration Unit to be '%s', but got '%s'", expectedUnit, QueryDuration.GetUnit()) 44 | } 45 | 46 | if QueryDuration.GetDescription() != expectedDescription { 47 | t.Errorf("Expected QueryDuration Description to be '%s', but got '%s'", expectedDescription, QueryDuration.GetDescription()) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /telemetry/interfaces.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | /* 4 | CheckRequestTupleKeyInterface is a simplified interface that defines the methods the CheckRequestTupleKey struct implements, relevant to the context of the telemetry package. 5 | */ 6 | type CheckRequestTupleKeyInterface interface { 7 | GetUser() *string 8 | } 9 | 10 | /* 11 | CheckRequestInterface is a simplified interface that defines the methods the CheckRequest struct implements, relevant to the context of the telemetry package. 12 | */ 13 | type CheckRequestInterface interface { 14 | GetTupleKey() CheckRequestTupleKeyInterface 15 | RequestAuthorizationModelIdInterface 16 | } 17 | 18 | /* 19 | RequestAuthorizationModelIdInterface is a generic interface that defines the GetAuthorizationModelId() method a Request struct implements, relevant to the context of the telemetry package. 20 | */ 21 | type RequestAuthorizationModelIdInterface interface { 22 | GetAuthorizationModelId() *string 23 | } 24 | -------------------------------------------------------------------------------- /telemetry/interfaces_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | type MockCheckRequestTupleKey struct { 8 | user *string 9 | } 10 | 11 | func (m *MockCheckRequestTupleKey) GetUser() *string { 12 | return m.user 13 | } 14 | 15 | type MockRequestAuthorizationModelId struct { 16 | authorizationModelId *string 17 | } 18 | 19 | func (m *MockRequestAuthorizationModelId) GetAuthorizationModelId() *string { 20 | return m.authorizationModelId 21 | } 22 | 23 | type MockCheckRequest struct { 24 | MockCheckRequestTupleKey 25 | MockRequestAuthorizationModelId 26 | } 27 | 28 | func (m *MockCheckRequest) GetTupleKey() *MockCheckRequestTupleKey { 29 | return &m.MockCheckRequestTupleKey 30 | } 31 | 32 | func TestCheckRequestInterfaceImplementation(t *testing.T) { 33 | user := "test-user" 34 | modelId := "test-model-id" 35 | 36 | mockCheckRequest := &MockCheckRequest{ 37 | MockCheckRequestTupleKey: MockCheckRequestTupleKey{user: &user}, 38 | MockRequestAuthorizationModelId: MockRequestAuthorizationModelId{authorizationModelId: &modelId}, 39 | } 40 | 41 | if mockCheckRequest.GetTupleKey().GetUser() != &user { 42 | t.Errorf("Expected GetUser to return '%s', but got '%s'", user, *mockCheckRequest.GetTupleKey().GetUser()) 43 | } 44 | 45 | if mockCheckRequest.GetAuthorizationModelId() != &modelId { 46 | t.Errorf("Expected GetAuthorizationModelId to return '%s', but got '%s'", modelId, *mockCheckRequest.GetAuthorizationModelId()) 47 | } 48 | } 49 | 50 | func TestCheckRequestInterfaceNilValues(t *testing.T) { 51 | mockCheckRequest := &MockCheckRequest{} 52 | 53 | if mockCheckRequest.GetTupleKey().GetUser() != nil { 54 | t.Errorf("Expected GetUser to return nil, but got '%s'", *mockCheckRequest.GetTupleKey().GetUser()) 55 | } 56 | 57 | if mockCheckRequest.GetAuthorizationModelId() != nil { 58 | t.Errorf("Expected GetAuthorizationModelId to return nil, but got '%s'", *mockCheckRequest.GetAuthorizationModelId()) 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /telemetry/metric.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | type Metric struct { 4 | Name string 5 | Description string 6 | MetricInterface 7 | } 8 | 9 | type MetricInterface interface { 10 | GetName() string 11 | GetDescription() string 12 | } 13 | 14 | func (m *Metric) GetName() string { 15 | return m.Name 16 | } 17 | 18 | func (m *Metric) GetDescription() string { 19 | return m.Description 20 | } 21 | -------------------------------------------------------------------------------- /telemetry/metric_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | type MockMetric struct { 8 | Name string 9 | Description string 10 | } 11 | 12 | func (m *MockMetric) GetName() string { 13 | return m.Name 14 | } 15 | 16 | func (m *MockMetric) GetDescription() string { 17 | return m.Description 18 | } 19 | 20 | func TestMetric_GetName(t *testing.T) { 21 | metricName := "test-metric" 22 | metricDescription := "This is a test metric." 23 | 24 | metric := &Metric{ 25 | Name: metricName, 26 | Description: metricDescription, 27 | MetricInterface: &MockMetric{ 28 | Name: metricName, 29 | Description: metricDescription, 30 | }, 31 | } 32 | 33 | if metric.GetName() != metricName { 34 | t.Errorf("Expected Metric Name to be '%s', but got '%s'", metricName, metric.GetName()) 35 | } 36 | 37 | if metric.GetDescription() != metricDescription { 38 | t.Errorf("Expected Metric Description to be '%s', but got '%s'", metricDescription, metric.GetDescription()) 39 | } 40 | } 41 | 42 | func TestMetricInterfaceImplementation(t *testing.T) { 43 | metricName := "interface-metric" 44 | metricDescription := "Metric implemented using MetricInterface." 45 | 46 | mockMetric := &MockMetric{ 47 | Name: metricName, 48 | Description: metricDescription, 49 | } 50 | 51 | metric := &Metric{ 52 | Name: metricName, 53 | Description: metricDescription, 54 | MetricInterface: mockMetric, 55 | } 56 | 57 | if metric.MetricInterface.GetName() != metricName { 58 | t.Errorf("Expected MetricInterface Name to be '%s', but got '%s'", metricName, metric.MetricInterface.GetName()) 59 | } 60 | 61 | if metric.MetricInterface.GetDescription() != metricDescription { 62 | t.Errorf("Expected MetricInterface Description to be '%s', but got '%s'", metricDescription, metric.MetricInterface.GetDescription()) 63 | } 64 | } 65 | 66 | func TestEmptyMetric(t *testing.T) { 67 | metric := &Metric{} 68 | 69 | if metric.GetName() != "" { 70 | t.Errorf("Expected Metric Name to be empty, but got '%s'", metric.GetName()) 71 | } 72 | 73 | if metric.GetDescription() != "" { 74 | t.Errorf("Expected Metric Description to be empty, but got '%s'", metric.GetDescription()) 75 | } 76 | } 77 | --------------------------------------------------------------------------------