diff --git a/.gitignore b/.gitignore index 6f72f89..daf913b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,24 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a *.so -*.dylib -# Test binary, built with `go test -c` -*.test +# Folders +_obj +_test -# Output of the go coverage tool, specifically when used with LiteIDE -*.out +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out -# Dependency directories (remove the comment below to include it) -# vendor/ +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* -# Go workspace file -go.work -go.work.sum +_testmain.go -# env file -.env +*.exe +*.test +*.prof diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..b96d583 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,33 @@ +# IMPORTANT: this file is generated with the option `openapiGeneratorIgnoreList` enabled +# (--openapi-generator-ignore-list in CLI for example) so the entries below are pre-populated based +# on the input provided by the users and this file will be overwritten every time when the option is +# enabled (which is the exact opposite of the default behaviour to not overwrite +# .openapi-generator-ignore if the file exists). + +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +# The following entries are pre-populated based on the input obtained via +# the option `openapiGeneratorIgnoreList` (--openapi-generator-ignore-list in CLI for example). +.travis.yml diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..9423513 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,504 @@ +.gitignore +README.md +api/openapi.yaml +api_auth.go +api_dfiq.go +api_entities.go +api_graph.go +api_import_data.go +api_import_misp_json.go +api_indicators.go +api_observables.go +api_system.go +api_tags.go +api_tasks.go +api_templates.go +api_users.go +client.go +configuration.go +docs/ASNInput.md +docs/ASNOutput.md +docs/AddContextRequest.md +docs/AddTextRequest.md +docs/AddedInner.md +docs/AnalysisRequest.md +docs/AnalysisResponse.md +docs/AnalyticsTask.md +docs/AttackPatternInput.md +docs/AttackPatternOutput.md +docs/AuthAPI.md +docs/BICInput.md +docs/BICOutput.md +docs/BulkObservableAddResponse.md +docs/CIDRInput.md +docs/CIDROutput.md +docs/CampaignInput.md +docs/CampaignOutput.md +docs/CertificateInput.md +docs/CertificateOutput.md +docs/CommandLineInput.md +docs/CommandLineOutput.md +docs/CompanyInput.md +docs/CompanyOutput.md +docs/CourseOfActionInput.md +docs/CourseOfActionOutput.md +docs/DFIQApproach.md +docs/DFIQApproachNotes.md +docs/DFIQApproachStep.md +docs/DFIQConfigResponse.md +docs/DFIQFacet.md +docs/DFIQQuestion.md +docs/DFIQScenario.md +docs/DFIQSearchRequest.md +docs/DFIQSearchRequestType.md +docs/DFIQSearchResponse.md +docs/DFIQType.md +docs/DFIQValidateRequest.md +docs/DFIQValidateResponse.md +docs/DeleteContextRequest.md +docs/DfiqAPI.md +docs/DfiqInner.md +docs/DiamondModel.md +docs/DockerImageInput.md +docs/DockerImageOutput.md +docs/EmailInput.md +docs/EmailOutput.md +docs/EntitiesAPI.md +docs/EntitiesInner.md +docs/Entity.md +docs/Entity1.md +docs/EntitySearchRequest.md +docs/EntitySearchRequestType.md +docs/EntitySearchResponse.md +docs/EntityTagRequest.md +docs/EntityTagResponse.md +docs/EntityType.md +docs/Error.md +docs/ExportTaskInput.md +docs/ExportTaskOutput.md +docs/FeedTask.md +docs/FileInput.md +docs/FileOutput.md +docs/ForensicArtifactInput.md +docs/ForensicArtifactOutput.md +docs/GenericInput.md +docs/GenericOutput.md +docs/GraphAPI.md +docs/GraphAddRequest.md +docs/GraphDirection.md +docs/GraphFilter.md +docs/GraphPatchRequest.md +docs/GraphSearchRequest.md +docs/GraphSearchResponse.md +docs/HTTPValidationError.md +docs/Hops.md +docs/HostnameInput.md +docs/HostnameOutput.md +docs/IBANInput.md +docs/IBANOutput.md +docs/IPv4Input.md +docs/IPv4Output.md +docs/IPv6Input.md +docs/IPv6Output.md +docs/IdentityInput.md +docs/IdentityOutput.md +docs/ImphashInput.md +docs/ImphashOutput.md +docs/ImportDataAPI.md +docs/ImportMispJsonAPI.md +docs/Indicator.md +docs/Indicator1.md +docs/IndicatorSearchRequest.md +docs/IndicatorSearchRequestType.md +docs/IndicatorSearchResponse.md +docs/IndicatorTagRequest.md +docs/IndicatorTagResponse.md +docs/IndicatorType.md +docs/IndicatorsAPI.md +docs/IndicatorsInner.md +docs/IntrusionSetInput.md +docs/IntrusionSetOutput.md +docs/InvestigationInput.md +docs/InvestigationOutput.md +docs/JA3Input.md +docs/JA3Output.md +docs/JARMInput.md +docs/JARMOutput.md +docs/MD5Input.md +docs/MD5Output.md +docs/MacAddressInput.md +docs/MacAddressOutput.md +docs/MalwareInput.md +docs/MalwareOutput.md +docs/MaxHops.md +docs/MergeTagRequest.md +docs/MergeTagResult.md +docs/MinHops.md +docs/MutexInput.md +docs/MutexOutput.md +docs/Name.md +docs/NamedPipeInput.md +docs/NamedPipeOutput.md +docs/NewBulkObservableAddRequest.md +docs/NewDFIQRequest.md +docs/NewEntityRequest.md +docs/NewExportRequest.md +docs/NewExtendedObservableRequest.md +docs/NewIndicatorRequest.md +docs/NewObservableRequest.md +docs/NewRequest.md +docs/NewUserRequest.md +docs/NoteInput.md +docs/NoteOutput.md +docs/Observable.md +docs/Observable1.md +docs/ObservableSearchRequest.md +docs/ObservableSearchRequestType.md +docs/ObservableSearchResponse.md +docs/ObservableTagRequest.md +docs/ObservableTagResponse.md +docs/ObservableTypeInput.md +docs/ObservablesAPI.md +docs/OneShotTask.md +docs/PackageInput.md +docs/PackageOutput.md +docs/PatchDFIQRequest.md +docs/PatchEntityRequest.md +docs/PatchExportRequest.md +docs/PatchIndicatorRequest.md +docs/PatchObservableRequest.md +docs/PathInput.md +docs/PathOutput.md +docs/PathsInnerInner.md +docs/PhoneInput.md +docs/PhoneOutput.md +docs/QueryInput.md +docs/QueryOutput.md +docs/QueryValue.md +docs/RegexInput.md +docs/RegexOutput.md +docs/RegistryHive.md +docs/RegistryKeyInput.md +docs/RegistryKeyOutput.md +docs/Relationship.md +docs/RenderTemplateRequest.md +docs/ResetApiKeyRequest.md +docs/ResetPasswordRequest.md +docs/ResponseAddContextApiV2ObservablesObservableIdContextPost.md +docs/ResponseAddTextApiV2ObservablesAddTextPost.md +docs/ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost.md +docs/ResponseDetailsApiV2DfiqDfiqIdGet.md +docs/ResponseDetailsApiV2EntitiesEntityIdGet.md +docs/ResponseDetailsApiV2IndicatorsIndicatorIdGet.md +docs/ResponseDetailsApiV2ObservablesObservableIdGet.md +docs/ResponseNewApiV2EntitiesPost.md +docs/ResponseNewApiV2IndicatorsPost.md +docs/ResponseNewApiV2ObservablesPost.md +docs/ResponseNewExtendedApiV2ObservablesExtendedPost.md +docs/ResponseNewFromYamlApiV2DfiqFromYamlPost.md +docs/ResponsePatchApiV2DfiqDfiqIdPatch.md +docs/ResponsePatchApiV2EntitiesEntityIdPatch.md +docs/ResponsePatchApiV2IndicatorsIndicatorIdPatch.md +docs/ResponsePatchApiV2ObservablesObservableIdPatch.md +docs/ResponseToggleApiV2TasksTaskNameTogglePost.md +docs/SHA1Input.md +docs/SHA1Output.md +docs/SHA256Input.md +docs/SHA256Output.md +docs/SearchQuery.md +docs/SearchUserRequest.md +docs/SearchUserResponse.md +docs/SeverityType.md +docs/SigmaInput.md +docs/SigmaOutput.md +docs/SsdeepInput.md +docs/SsdeepOutput.md +docs/SuricataInput.md +docs/SuricataOutput.md +docs/SystemAPI.md +docs/SystemConfigResponse.md +docs/TLSHInput.md +docs/TLSHOutput.md +docs/Tag.md +docs/TagRelationshipInput.md +docs/TagRelationshipOutput.md +docs/TagSearchRequest.md +docs/TagSearchResponse.md +docs/TagsAPI.md +docs/TaskParams.md +docs/TaskSearchRequest.md +docs/TaskSearchRequestType.md +docs/TaskSearchResponse.md +docs/TaskStatus.md +docs/TaskType.md +docs/TasksAPI.md +docs/TasksInner.md +docs/Template.md +docs/TemplateSearchRequest.md +docs/TemplateSearchResponse.md +docs/TemplatesAPI.md +docs/ThreatActorInput.md +docs/ThreatActorOutput.md +docs/ToggleUserRequest.md +docs/ToggleableField.md +docs/ToolInput.md +docs/ToolOutput.md +docs/UpdateRequest.md +docs/UrlInput.md +docs/UrlOutput.md +docs/User.md +docs/UserAccountInput.md +docs/UserAccountOutput.md +docs/UserAgentInput.md +docs/UserAgentOutput.md +docs/UsersAPI.md +docs/ValidationError.md +docs/ValidationErrorLocInner.md +docs/VerticesValue.md +docs/VulnerabilityInput.md +docs/VulnerabilityOutput.md +docs/WalletInput.md +docs/WalletOutput.md +docs/WorkerRestartResponse.md +docs/WorkerStatusResponse.md +docs/YaraInput.md +docs/YaraOutput.md +git_push.sh +go.mod +go.sum +model_add_context_request.go +model_add_text_request.go +model_added_inner.go +model_analysis_request.go +model_analysis_response.go +model_analytics_task.go +model_asn_input.go +model_asn_output.go +model_attack_pattern_input.go +model_attack_pattern_output.go +model_bic_input.go +model_bic_output.go +model_bulk_observable_add_response.go +model_campaign_input.go +model_campaign_output.go +model_certificate_input.go +model_certificate_output.go +model_cidr_input.go +model_cidr_output.go +model_command_line_input.go +model_command_line_output.go +model_company_input.go +model_company_output.go +model_course_of_action_input.go +model_course_of_action_output.go +model_delete_context_request.go +model_dfiq_approach.go +model_dfiq_approach_notes.go +model_dfiq_approach_step.go +model_dfiq_config_response.go +model_dfiq_facet.go +model_dfiq_inner.go +model_dfiq_question.go +model_dfiq_scenario.go +model_dfiq_search_request.go +model_dfiq_search_request_type.go +model_dfiq_search_response.go +model_dfiq_type.go +model_dfiq_validate_request.go +model_dfiq_validate_response.go +model_diamond_model.go +model_docker_image_input.go +model_docker_image_output.go +model_email_input.go +model_email_output.go +model_entities_inner.go +model_entity.go +model_entity_1.go +model_entity_search_request.go +model_entity_search_request_type.go +model_entity_search_response.go +model_entity_tag_request.go +model_entity_tag_response.go +model_entity_type.go +model_error.go +model_export_task_input.go +model_export_task_output.go +model_feed_task.go +model_file_input.go +model_file_output.go +model_forensic_artifact_input.go +model_forensic_artifact_output.go +model_generic_input.go +model_generic_output.go +model_graph_add_request.go +model_graph_direction.go +model_graph_filter.go +model_graph_patch_request.go +model_graph_search_request.go +model_graph_search_response.go +model_hops.go +model_hostname_input.go +model_hostname_output.go +model_http_validation_error.go +model_iban_input.go +model_iban_output.go +model_identity_input.go +model_identity_output.go +model_imphash_input.go +model_imphash_output.go +model_indicator.go +model_indicator_1.go +model_indicator_search_request.go +model_indicator_search_request_type.go +model_indicator_search_response.go +model_indicator_tag_request.go +model_indicator_tag_response.go +model_indicator_type.go +model_indicators_inner.go +model_intrusion_set_input.go +model_intrusion_set_output.go +model_investigation_input.go +model_investigation_output.go +model_ipv4_input.go +model_ipv4_output.go +model_ipv6_input.go +model_ipv6_output.go +model_ja3_input.go +model_ja3_output.go +model_jarm_input.go +model_jarm_output.go +model_mac_address_input.go +model_mac_address_output.go +model_malware_input.go +model_malware_output.go +model_max_hops.go +model_md5_input.go +model_md5_output.go +model_merge_tag_request.go +model_merge_tag_result.go +model_min_hops.go +model_mutex_input.go +model_mutex_output.go +model_name.go +model_named_pipe_input.go +model_named_pipe_output.go +model_new_bulk_observable_add_request.go +model_new_dfiq_request.go +model_new_entity_request.go +model_new_export_request.go +model_new_extended_observable_request.go +model_new_indicator_request.go +model_new_observable_request.go +model_new_request.go +model_new_user_request.go +model_note_input.go +model_note_output.go +model_observable.go +model_observable_1.go +model_observable_search_request.go +model_observable_search_request_type.go +model_observable_search_response.go +model_observable_tag_request.go +model_observable_tag_response.go +model_observable_type_input.go +model_one_shot_task.go +model_package_input.go +model_package_output.go +model_patch_dfiq_request.go +model_patch_entity_request.go +model_patch_export_request.go +model_patch_indicator_request.go +model_patch_observable_request.go +model_path_input.go +model_path_output.go +model_paths_inner_inner.go +model_phone_input.go +model_phone_output.go +model_query_input.go +model_query_output.go +model_query_value.go +model_regex_input.go +model_regex_output.go +model_registry_hive.go +model_registry_key_input.go +model_registry_key_output.go +model_relationship.go +model_render_template_request.go +model_reset_api_key_request.go +model_reset_password_request.go +model_response_add_context_api_v2_observables__observable_id__context_post.go +model_response_add_text_api_v2_observables_add_text_post.go +model_response_delete_context_api_v2_observables__observable_id__context_delete_post.go +model_response_details_api_v2_dfiq__dfiq_id__get.go +model_response_details_api_v2_entities__entity_id__get.go +model_response_details_api_v2_indicators__indicator_id__get.go +model_response_details_api_v2_observables__observable_id__get.go +model_response_new_api_v2_entities__post.go +model_response_new_api_v2_indicators__post.go +model_response_new_api_v2_observables__post.go +model_response_new_extended_api_v2_observables_extended_post.go +model_response_new_from_yaml_api_v2_dfiq_from_yaml_post.go +model_response_patch_api_v2_dfiq__dfiq_id__patch.go +model_response_patch_api_v2_entities__entity_id__patch.go +model_response_patch_api_v2_indicators__indicator_id__patch.go +model_response_patch_api_v2_observables__observable_id__patch.go +model_response_toggle_api_v2_tasks__task_name__toggle_post.go +model_search_query.go +model_search_user_request.go +model_search_user_response.go +model_severity_type.go +model_sha1_input.go +model_sha1_output.go +model_sha256_input.go +model_sha256_output.go +model_sigma_input.go +model_sigma_output.go +model_ssdeep_input.go +model_ssdeep_output.go +model_suricata_input.go +model_suricata_output.go +model_system_config_response.go +model_tag.go +model_tag_relationship_input.go +model_tag_relationship_output.go +model_tag_search_request.go +model_tag_search_response.go +model_task_params.go +model_task_search_request.go +model_task_search_request_type.go +model_task_search_response.go +model_task_status.go +model_task_type.go +model_tasks_inner.go +model_template.go +model_template_search_request.go +model_template_search_response.go +model_threat_actor_input.go +model_threat_actor_output.go +model_tlsh_input.go +model_tlsh_output.go +model_toggle_user_request.go +model_toggleable_field.go +model_tool_input.go +model_tool_output.go +model_update_request.go +model_url_input.go +model_url_output.go +model_user.go +model_user_account_input.go +model_user_account_output.go +model_user_agent_input.go +model_user_agent_output.go +model_validation_error.go +model_validation_error_loc_inner.go +model_vertices_value.go +model_vulnerability_input.go +model_vulnerability_output.go +model_wallet_input.go +model_wallet_output.go +model_worker_restart_response.go +model_worker_status_response.go +model_yara_input.go +model_yara_output.go +response.go +utils.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..6935482 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.10.0-SNAPSHOT diff --git a/Makefile b/Makefile index 26e4ed4..cea25e5 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +.PHONY: help init generate tidy lint fmt test cov update_spec + + all: generate tidy fmt test help: ## Display this help section @@ -24,11 +27,30 @@ fmt: ## run go fmt against code go fmt ./... test: tidy fmt generate ## run go test against code - go test -race -coverprofile=coverage.out $(go list ./... | grep -v /mocks/) + go test -race -coverprofile=coverage.out ./... go tool cover -func=coverage.out rm -f coverage.out cov: tidy fmt generate ## run go test against code and generate coverage report - go test -coverprofile=coverage.out $(go list ./... | grep -v /mocks/) + go test -coverprofile=coverage.out ./... go tool cover -html=coverage.out rm -f coverage.out + +_generate_templates: ## PRIVATE generate the templates. Warning: this will overwrite the templates + docker run --rm -v "$(shell pwd):/local" openapitools/openapi-generator-cli author template -g go -o /local/templates + +_update_spec: ## PRIVATE update the openapi spec, you need to set YETI_INSTANCE +ifndef YETI_INSTANCE + $(error YETI_INSTANCE is undefined) +endif + docker run --rm -v "$(shell pwd):/local" openapitools/openapi-generator-cli generate \ + -i https://${YETI_INSTANCE}/openapi.json \ + --openapi-generator-ignore-list ".travis.yml" \ + -g go \ + --config /local/config.yaml \ + -o /local/ + +_patch_spec_update: ## PRIVATE patch the spec update until it is fixed + gsed -i -e "s/var error_ Error =/var error_ Error/g" model_dfiq_validate_response.go + +update_spec: _update_spec _patch_spec_update fmt test ## update the openapi spec, you need to set YETI_INSTANCE diff --git a/README.md b/README.md index 3ffff91..bafde5e 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,485 @@ -# goyeti +# Go API client for goyeti -Go client for the Yeti API +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -## Examples +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -To make it work, you need to set the `YETI_URL` and the `YETI_API_KEY` environment variables to your Yeti URL and API key. -Example shows how to authenticate and query observables from the Yeti API. -[Query observables](./examples/observable_test.go) +- API version: 0.1.0 +- Package version: 1.0.0 +- Generator version: 7.10.0-SNAPSHOT +- Build package: org.openapitools.codegen.languages.GoClientCodegen -## Contributing +## Installation + +Install the following dependencies: + +```sh +go get github.com/stretchr/testify/assert +go get golang.org/x/oauth2 +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```go +import goyeti "github.com/yeti-platform/goyeti" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```go +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `goyeti.ContextServerIndex` of type `int`. + +```go +ctx := context.WithValue(context.Background(), goyeti.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `goyeti.ContextServerVariables` of type `map[string]string`. + +```go +ctx := context.WithValue(context.Background(), goyeti.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `goyeti.ContextOperationServerIndices` and `goyeti.ContextOperationServerVariables` context maps. + +```go +ctx := context.WithValue(context.Background(), goyeti.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), goyeti.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthAPI* | [**LoginApiApiV2AuthApiTokenPost**](docs/AuthAPI.md#loginapiapiv2authapitokenpost) | **Post** /api/v2/auth/api-token | Login Api +*AuthAPI* | [**LoginApiV2AuthTokenPost**](docs/AuthAPI.md#loginapiv2authtokenpost) | **Post** /api/v2/auth/token | Login +*AuthAPI* | [**LogoutApiV2AuthLogoutPost**](docs/AuthAPI.md#logoutapiv2authlogoutpost) | **Post** /api/v2/auth/logout | Logout +*AuthAPI* | [**MeApiV2AuthMeGet**](docs/AuthAPI.md#meapiv2authmeget) | **Get** /api/v2/auth/me | Me +*DfiqAPI* | [**ConfigApiV2DfiqConfigGet**](docs/DfiqAPI.md#configapiv2dfiqconfigget) | **Get** /api/v2/dfiq/config | Config +*DfiqAPI* | [**DeleteApiV2DfiqDfiqIdDelete**](docs/DfiqAPI.md#deleteapiv2dfiqdfiqiddelete) | **Delete** /api/v2/dfiq/{dfiq_id} | Delete +*DfiqAPI* | [**DetailsApiV2DfiqDfiqIdGet**](docs/DfiqAPI.md#detailsapiv2dfiqdfiqidget) | **Get** /api/v2/dfiq/{dfiq_id} | Details +*DfiqAPI* | [**FromArchiveApiV2DfiqFromArchivePost**](docs/DfiqAPI.md#fromarchiveapiv2dfiqfromarchivepost) | **Post** /api/v2/dfiq/from_archive | From Archive +*DfiqAPI* | [**NewFromYamlApiV2DfiqFromYamlPost**](docs/DfiqAPI.md#newfromyamlapiv2dfiqfromyamlpost) | **Post** /api/v2/dfiq/from_yaml | New From Yaml +*DfiqAPI* | [**PatchApiV2DfiqDfiqIdPatch**](docs/DfiqAPI.md#patchapiv2dfiqdfiqidpatch) | **Patch** /api/v2/dfiq/{dfiq_id} | Patch +*DfiqAPI* | [**SearchApiV2DfiqSearchPost**](docs/DfiqAPI.md#searchapiv2dfiqsearchpost) | **Post** /api/v2/dfiq/search | Search +*DfiqAPI* | [**ToArchiveApiV2DfiqToArchivePost**](docs/DfiqAPI.md#toarchiveapiv2dfiqtoarchivepost) | **Post** /api/v2/dfiq/to_archive | To Archive +*DfiqAPI* | [**ValidateDfiqYamlApiV2DfiqValidatePost**](docs/DfiqAPI.md#validatedfiqyamlapiv2dfiqvalidatepost) | **Post** /api/v2/dfiq/validate | Validate Dfiq Yaml +*EntitiesAPI* | [**DeleteApiV2EntitiesEntityIdDelete**](docs/EntitiesAPI.md#deleteapiv2entitiesentityiddelete) | **Delete** /api/v2/entities/{entity_id} | Delete +*EntitiesAPI* | [**DetailsApiV2EntitiesEntityIdGet**](docs/EntitiesAPI.md#detailsapiv2entitiesentityidget) | **Get** /api/v2/entities/{entity_id} | Details +*EntitiesAPI* | [**NewApiV2EntitiesPost**](docs/EntitiesAPI.md#newapiv2entitiespost) | **Post** /api/v2/entities/ | New +*EntitiesAPI* | [**PatchApiV2EntitiesEntityIdPatch**](docs/EntitiesAPI.md#patchapiv2entitiesentityidpatch) | **Patch** /api/v2/entities/{entity_id} | Patch +*EntitiesAPI* | [**SearchApiV2EntitiesSearchPost**](docs/EntitiesAPI.md#searchapiv2entitiessearchpost) | **Post** /api/v2/entities/search | Search +*EntitiesAPI* | [**TagApiV2EntitiesTagPost**](docs/EntitiesAPI.md#tagapiv2entitiestagpost) | **Post** /api/v2/entities/tag | Tag +*GraphAPI* | [**AddApiV2GraphAddPost**](docs/GraphAPI.md#addapiv2graphaddpost) | **Post** /api/v2/graph/add | Add +*GraphAPI* | [**DeleteApiV2GraphRelationshipIdDelete**](docs/GraphAPI.md#deleteapiv2graphrelationshipiddelete) | **Delete** /api/v2/graph/{relationship_id} | Delete +*GraphAPI* | [**EditApiV2GraphRelationshipIdPatch**](docs/GraphAPI.md#editapiv2graphrelationshipidpatch) | **Patch** /api/v2/graph/{relationship_id} | Edit +*GraphAPI* | [**MatchApiV2GraphMatchPost**](docs/GraphAPI.md#matchapiv2graphmatchpost) | **Post** /api/v2/graph/match | Match +*GraphAPI* | [**SearchApiV2GraphSearchPost**](docs/GraphAPI.md#searchapiv2graphsearchpost) | **Post** /api/v2/graph/search | Search +*GraphAPI* | [**SwapApiV2GraphRelationshipIdSwapPost**](docs/GraphAPI.md#swapapiv2graphrelationshipidswappost) | **Post** /api/v2/graph/{relationship_id}/swap | Swap +*ImportDataAPI* | [**ImportMispJsonApiV2ImportDataImportMispJsonPost**](docs/ImportDataAPI.md#importmispjsonapiv2importdataimportmispjsonpost) | **Post** /api/v2/import_data/import_misp_json | Import Misp Json +*ImportMispJsonAPI* | [**ImportMispJsonApiV2ImportDataImportMispJsonPost_0**](docs/ImportMispJsonAPI.md#importmispjsonapiv2importdataimportmispjsonpost_0) | **Post** /api/v2/import_data/import_misp_json | Import Misp Json +*IndicatorsAPI* | [**DeleteApiV2IndicatorsIndicatorIdDelete**](docs/IndicatorsAPI.md#deleteapiv2indicatorsindicatoriddelete) | **Delete** /api/v2/indicators/{indicator_id} | Delete +*IndicatorsAPI* | [**DetailsApiV2IndicatorsIndicatorIdGet**](docs/IndicatorsAPI.md#detailsapiv2indicatorsindicatoridget) | **Get** /api/v2/indicators/{indicator_id} | Details +*IndicatorsAPI* | [**NewApiV2IndicatorsPost**](docs/IndicatorsAPI.md#newapiv2indicatorspost) | **Post** /api/v2/indicators/ | New +*IndicatorsAPI* | [**PatchApiV2IndicatorsIndicatorIdPatch**](docs/IndicatorsAPI.md#patchapiv2indicatorsindicatoridpatch) | **Patch** /api/v2/indicators/{indicator_id} | Patch +*IndicatorsAPI* | [**SearchApiV2IndicatorsSearchPost**](docs/IndicatorsAPI.md#searchapiv2indicatorssearchpost) | **Post** /api/v2/indicators/search | Search +*IndicatorsAPI* | [**TagApiV2IndicatorsTagPost**](docs/IndicatorsAPI.md#tagapiv2indicatorstagpost) | **Post** /api/v2/indicators/tag | Tag +*ObservablesAPI* | [**AddContextApiV2ObservablesObservableIdContextPost**](docs/ObservablesAPI.md#addcontextapiv2observablesobservableidcontextpost) | **Post** /api/v2/observables/{observable_id}/context | Add Context +*ObservablesAPI* | [**AddTextApiV2ObservablesAddTextPost**](docs/ObservablesAPI.md#addtextapiv2observablesaddtextpost) | **Post** /api/v2/observables/add_text | Add Text +*ObservablesAPI* | [**BulkAddApiV2ObservablesBulkPost**](docs/ObservablesAPI.md#bulkaddapiv2observablesbulkpost) | **Post** /api/v2/observables/bulk | Bulk Add +*ObservablesAPI* | [**DeleteApiV2ObservablesObservableIdDelete**](docs/ObservablesAPI.md#deleteapiv2observablesobservableiddelete) | **Delete** /api/v2/observables/{observable_id} | Delete +*ObservablesAPI* | [**DeleteContextApiV2ObservablesObservableIdContextDeletePost**](docs/ObservablesAPI.md#deletecontextapiv2observablesobservableidcontextdeletepost) | **Post** /api/v2/observables/{observable_id}/context/delete | Delete Context +*ObservablesAPI* | [**DetailsApiV2ObservablesObservableIdGet**](docs/ObservablesAPI.md#detailsapiv2observablesobservableidget) | **Get** /api/v2/observables/{observable_id} | Details +*ObservablesAPI* | [**NewApiV2ObservablesPost**](docs/ObservablesAPI.md#newapiv2observablespost) | **Post** /api/v2/observables/ | New +*ObservablesAPI* | [**NewExtendedApiV2ObservablesExtendedPost**](docs/ObservablesAPI.md#newextendedapiv2observablesextendedpost) | **Post** /api/v2/observables/extended | New Extended +*ObservablesAPI* | [**ObservablesRootApiV2ObservablesGet**](docs/ObservablesAPI.md#observablesrootapiv2observablesget) | **Get** /api/v2/observables/ | Observables Root +*ObservablesAPI* | [**PatchApiV2ObservablesObservableIdPatch**](docs/ObservablesAPI.md#patchapiv2observablesobservableidpatch) | **Patch** /api/v2/observables/{observable_id} | Patch +*ObservablesAPI* | [**SearchApiV2ObservablesSearchPost**](docs/ObservablesAPI.md#searchapiv2observablessearchpost) | **Post** /api/v2/observables/search | Search +*ObservablesAPI* | [**TagObservableApiV2ObservablesTagPost**](docs/ObservablesAPI.md#tagobservableapiv2observablestagpost) | **Post** /api/v2/observables/tag | Tag Observable +*SystemAPI* | [**GetConfigApiV2SystemConfigGet**](docs/SystemAPI.md#getconfigapiv2systemconfigget) | **Get** /api/v2/system/config | Get Config +*SystemAPI* | [**GetWorkerStatusApiV2SystemWorkersGet**](docs/SystemAPI.md#getworkerstatusapiv2systemworkersget) | **Get** /api/v2/system/workers | Get Worker Status +*SystemAPI* | [**RestartWorkerApiV2SystemRestartworkerWorkerNamePost**](docs/SystemAPI.md#restartworkerapiv2systemrestartworkerworkernamepost) | **Post** /api/v2/system/restartworker/{worker_name} | Restart Worker +*TagsAPI* | [**DeleteApiV2TagsTagIdDelete**](docs/TagsAPI.md#deleteapiv2tagstagiddelete) | **Delete** /api/v2/tags/{tag_id} | Delete +*TagsAPI* | [**DetailsApiV2TagsTagIdGet**](docs/TagsAPI.md#detailsapiv2tagstagidget) | **Get** /api/v2/tags/{tag_id} | Details +*TagsAPI* | [**MergeApiV2TagsMergePost**](docs/TagsAPI.md#mergeapiv2tagsmergepost) | **Post** /api/v2/tags/merge | Merge +*TagsAPI* | [**NewApiV2TagsPost**](docs/TagsAPI.md#newapiv2tagspost) | **Post** /api/v2/tags/ | New +*TagsAPI* | [**SearchApiV2TagsSearchPost**](docs/TagsAPI.md#searchapiv2tagssearchpost) | **Post** /api/v2/tags/search | Search +*TagsAPI* | [**UpdateApiV2TagsTagIdPut**](docs/TagsAPI.md#updateapiv2tagstagidput) | **Put** /api/v2/tags/{tag_id} | Update +*TasksAPI* | [**DeleteExportApiV2TasksExportExportNameDelete**](docs/TasksAPI.md#deleteexportapiv2tasksexportexportnamedelete) | **Delete** /api/v2/tasks/export/{export_name} | Delete Export +*TasksAPI* | [**ExportContentApiV2TasksExportExportIdContentGet**](docs/TasksAPI.md#exportcontentapiv2tasksexportexportidcontentget) | **Get** /api/v2/tasks/export/{export_id}/content | Export Content +*TasksAPI* | [**NewExportApiV2TasksExportNewPost**](docs/TasksAPI.md#newexportapiv2tasksexportnewpost) | **Post** /api/v2/tasks/export/new | New Export +*TasksAPI* | [**PatchExportApiV2TasksExportExportNamePatch**](docs/TasksAPI.md#patchexportapiv2tasksexportexportnamepatch) | **Patch** /api/v2/tasks/export/{export_name} | Patch Export +*TasksAPI* | [**RunApiV2TasksTaskNameRunPost**](docs/TasksAPI.md#runapiv2taskstasknamerunpost) | **Post** /api/v2/tasks/{task_name}/run | Run +*TasksAPI* | [**SearchApiV2TasksSearchPost**](docs/TasksAPI.md#searchapiv2taskssearchpost) | **Post** /api/v2/tasks/search | Search +*TasksAPI* | [**ToggleApiV2TasksTaskNameTogglePost**](docs/TasksAPI.md#toggleapiv2taskstasknametogglepost) | **Post** /api/v2/tasks/{task_name}/toggle | Toggle +*TemplatesAPI* | [**RenderApiV2TemplatesRenderPost**](docs/TemplatesAPI.md#renderapiv2templatesrenderpost) | **Post** /api/v2/templates/render | Render +*TemplatesAPI* | [**SearchApiV2TemplatesSearchPost**](docs/TemplatesAPI.md#searchapiv2templatessearchpost) | **Post** /api/v2/templates/search | Search +*UsersAPI* | [**CreateApiV2UsersPost**](docs/UsersAPI.md#createapiv2userspost) | **Post** /api/v2/users/ | Create +*UsersAPI* | [**DeleteApiV2UsersUserIdDelete**](docs/UsersAPI.md#deleteapiv2usersuseriddelete) | **Delete** /api/v2/users/{user_id} | Delete +*UsersAPI* | [**GetApiV2UsersUserIdGet**](docs/UsersAPI.md#getapiv2usersuseridget) | **Get** /api/v2/users/{user_id} | Get +*UsersAPI* | [**ResetApiKeyApiV2UsersResetApiKeyPost**](docs/UsersAPI.md#resetapikeyapiv2usersresetapikeypost) | **Post** /api/v2/users/reset-api-key | Reset Api Key +*UsersAPI* | [**ResetPasswordApiV2UsersResetPasswordPost**](docs/UsersAPI.md#resetpasswordapiv2usersresetpasswordpost) | **Post** /api/v2/users/reset-password | Reset Password +*UsersAPI* | [**SearchApiV2UsersSearchPost**](docs/UsersAPI.md#searchapiv2userssearchpost) | **Post** /api/v2/users/search | Search +*UsersAPI* | [**ToggleApiV2UsersTogglePost**](docs/UsersAPI.md#toggleapiv2userstogglepost) | **Post** /api/v2/users/toggle | Toggle + + +## Documentation For Models + + - [ASNInput](docs/ASNInput.md) + - [ASNOutput](docs/ASNOutput.md) + - [AddContextRequest](docs/AddContextRequest.md) + - [AddTextRequest](docs/AddTextRequest.md) + - [AddedInner](docs/AddedInner.md) + - [AnalysisRequest](docs/AnalysisRequest.md) + - [AnalysisResponse](docs/AnalysisResponse.md) + - [AnalyticsTask](docs/AnalyticsTask.md) + - [AttackPatternInput](docs/AttackPatternInput.md) + - [AttackPatternOutput](docs/AttackPatternOutput.md) + - [BICInput](docs/BICInput.md) + - [BICOutput](docs/BICOutput.md) + - [BulkObservableAddResponse](docs/BulkObservableAddResponse.md) + - [CIDRInput](docs/CIDRInput.md) + - [CIDROutput](docs/CIDROutput.md) + - [CampaignInput](docs/CampaignInput.md) + - [CampaignOutput](docs/CampaignOutput.md) + - [CertificateInput](docs/CertificateInput.md) + - [CertificateOutput](docs/CertificateOutput.md) + - [CommandLineInput](docs/CommandLineInput.md) + - [CommandLineOutput](docs/CommandLineOutput.md) + - [CompanyInput](docs/CompanyInput.md) + - [CompanyOutput](docs/CompanyOutput.md) + - [CourseOfActionInput](docs/CourseOfActionInput.md) + - [CourseOfActionOutput](docs/CourseOfActionOutput.md) + - [DFIQApproach](docs/DFIQApproach.md) + - [DFIQApproachNotes](docs/DFIQApproachNotes.md) + - [DFIQApproachStep](docs/DFIQApproachStep.md) + - [DFIQConfigResponse](docs/DFIQConfigResponse.md) + - [DFIQFacet](docs/DFIQFacet.md) + - [DFIQQuestion](docs/DFIQQuestion.md) + - [DFIQScenario](docs/DFIQScenario.md) + - [DFIQSearchRequest](docs/DFIQSearchRequest.md) + - [DFIQSearchRequestType](docs/DFIQSearchRequestType.md) + - [DFIQSearchResponse](docs/DFIQSearchResponse.md) + - [DFIQType](docs/DFIQType.md) + - [DFIQValidateRequest](docs/DFIQValidateRequest.md) + - [DFIQValidateResponse](docs/DFIQValidateResponse.md) + - [DeleteContextRequest](docs/DeleteContextRequest.md) + - [DfiqInner](docs/DfiqInner.md) + - [DiamondModel](docs/DiamondModel.md) + - [DockerImageInput](docs/DockerImageInput.md) + - [DockerImageOutput](docs/DockerImageOutput.md) + - [EmailInput](docs/EmailInput.md) + - [EmailOutput](docs/EmailOutput.md) + - [EntitiesInner](docs/EntitiesInner.md) + - [Entity](docs/Entity.md) + - [Entity1](docs/Entity1.md) + - [EntitySearchRequest](docs/EntitySearchRequest.md) + - [EntitySearchRequestType](docs/EntitySearchRequestType.md) + - [EntitySearchResponse](docs/EntitySearchResponse.md) + - [EntityTagRequest](docs/EntityTagRequest.md) + - [EntityTagResponse](docs/EntityTagResponse.md) + - [EntityType](docs/EntityType.md) + - [Error](docs/Error.md) + - [ExportTaskInput](docs/ExportTaskInput.md) + - [ExportTaskOutput](docs/ExportTaskOutput.md) + - [FeedTask](docs/FeedTask.md) + - [FileInput](docs/FileInput.md) + - [FileOutput](docs/FileOutput.md) + - [ForensicArtifactInput](docs/ForensicArtifactInput.md) + - [ForensicArtifactOutput](docs/ForensicArtifactOutput.md) + - [GenericInput](docs/GenericInput.md) + - [GenericOutput](docs/GenericOutput.md) + - [GraphAddRequest](docs/GraphAddRequest.md) + - [GraphDirection](docs/GraphDirection.md) + - [GraphFilter](docs/GraphFilter.md) + - [GraphPatchRequest](docs/GraphPatchRequest.md) + - [GraphSearchRequest](docs/GraphSearchRequest.md) + - [GraphSearchResponse](docs/GraphSearchResponse.md) + - [HTTPValidationError](docs/HTTPValidationError.md) + - [Hops](docs/Hops.md) + - [HostnameInput](docs/HostnameInput.md) + - [HostnameOutput](docs/HostnameOutput.md) + - [IBANInput](docs/IBANInput.md) + - [IBANOutput](docs/IBANOutput.md) + - [IPv4Input](docs/IPv4Input.md) + - [IPv4Output](docs/IPv4Output.md) + - [IPv6Input](docs/IPv6Input.md) + - [IPv6Output](docs/IPv6Output.md) + - [IdentityInput](docs/IdentityInput.md) + - [IdentityOutput](docs/IdentityOutput.md) + - [ImphashInput](docs/ImphashInput.md) + - [ImphashOutput](docs/ImphashOutput.md) + - [Indicator](docs/Indicator.md) + - [Indicator1](docs/Indicator1.md) + - [IndicatorSearchRequest](docs/IndicatorSearchRequest.md) + - [IndicatorSearchRequestType](docs/IndicatorSearchRequestType.md) + - [IndicatorSearchResponse](docs/IndicatorSearchResponse.md) + - [IndicatorTagRequest](docs/IndicatorTagRequest.md) + - [IndicatorTagResponse](docs/IndicatorTagResponse.md) + - [IndicatorType](docs/IndicatorType.md) + - [IndicatorsInner](docs/IndicatorsInner.md) + - [IntrusionSetInput](docs/IntrusionSetInput.md) + - [IntrusionSetOutput](docs/IntrusionSetOutput.md) + - [InvestigationInput](docs/InvestigationInput.md) + - [InvestigationOutput](docs/InvestigationOutput.md) + - [JA3Input](docs/JA3Input.md) + - [JA3Output](docs/JA3Output.md) + - [JARMInput](docs/JARMInput.md) + - [JARMOutput](docs/JARMOutput.md) + - [MD5Input](docs/MD5Input.md) + - [MD5Output](docs/MD5Output.md) + - [MacAddressInput](docs/MacAddressInput.md) + - [MacAddressOutput](docs/MacAddressOutput.md) + - [MalwareInput](docs/MalwareInput.md) + - [MalwareOutput](docs/MalwareOutput.md) + - [MaxHops](docs/MaxHops.md) + - [MergeTagRequest](docs/MergeTagRequest.md) + - [MergeTagResult](docs/MergeTagResult.md) + - [MinHops](docs/MinHops.md) + - [MutexInput](docs/MutexInput.md) + - [MutexOutput](docs/MutexOutput.md) + - [Name](docs/Name.md) + - [NamedPipeInput](docs/NamedPipeInput.md) + - [NamedPipeOutput](docs/NamedPipeOutput.md) + - [NewBulkObservableAddRequest](docs/NewBulkObservableAddRequest.md) + - [NewDFIQRequest](docs/NewDFIQRequest.md) + - [NewEntityRequest](docs/NewEntityRequest.md) + - [NewExportRequest](docs/NewExportRequest.md) + - [NewExtendedObservableRequest](docs/NewExtendedObservableRequest.md) + - [NewIndicatorRequest](docs/NewIndicatorRequest.md) + - [NewObservableRequest](docs/NewObservableRequest.md) + - [NewRequest](docs/NewRequest.md) + - [NewUserRequest](docs/NewUserRequest.md) + - [NoteInput](docs/NoteInput.md) + - [NoteOutput](docs/NoteOutput.md) + - [Observable](docs/Observable.md) + - [Observable1](docs/Observable1.md) + - [ObservableSearchRequest](docs/ObservableSearchRequest.md) + - [ObservableSearchRequestType](docs/ObservableSearchRequestType.md) + - [ObservableSearchResponse](docs/ObservableSearchResponse.md) + - [ObservableTagRequest](docs/ObservableTagRequest.md) + - [ObservableTagResponse](docs/ObservableTagResponse.md) + - [ObservableTypeInput](docs/ObservableTypeInput.md) + - [OneShotTask](docs/OneShotTask.md) + - [PackageInput](docs/PackageInput.md) + - [PackageOutput](docs/PackageOutput.md) + - [PatchDFIQRequest](docs/PatchDFIQRequest.md) + - [PatchEntityRequest](docs/PatchEntityRequest.md) + - [PatchExportRequest](docs/PatchExportRequest.md) + - [PatchIndicatorRequest](docs/PatchIndicatorRequest.md) + - [PatchObservableRequest](docs/PatchObservableRequest.md) + - [PathInput](docs/PathInput.md) + - [PathOutput](docs/PathOutput.md) + - [PathsInnerInner](docs/PathsInnerInner.md) + - [PhoneInput](docs/PhoneInput.md) + - [PhoneOutput](docs/PhoneOutput.md) + - [QueryInput](docs/QueryInput.md) + - [QueryOutput](docs/QueryOutput.md) + - [QueryValue](docs/QueryValue.md) + - [RegexInput](docs/RegexInput.md) + - [RegexOutput](docs/RegexOutput.md) + - [RegistryHive](docs/RegistryHive.md) + - [RegistryKeyInput](docs/RegistryKeyInput.md) + - [RegistryKeyOutput](docs/RegistryKeyOutput.md) + - [Relationship](docs/Relationship.md) + - [RenderTemplateRequest](docs/RenderTemplateRequest.md) + - [ResetApiKeyRequest](docs/ResetApiKeyRequest.md) + - [ResetPasswordRequest](docs/ResetPasswordRequest.md) + - [ResponseAddContextApiV2ObservablesObservableIdContextPost](docs/ResponseAddContextApiV2ObservablesObservableIdContextPost.md) + - [ResponseAddTextApiV2ObservablesAddTextPost](docs/ResponseAddTextApiV2ObservablesAddTextPost.md) + - [ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost](docs/ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost.md) + - [ResponseDetailsApiV2DfiqDfiqIdGet](docs/ResponseDetailsApiV2DfiqDfiqIdGet.md) + - [ResponseDetailsApiV2EntitiesEntityIdGet](docs/ResponseDetailsApiV2EntitiesEntityIdGet.md) + - [ResponseDetailsApiV2IndicatorsIndicatorIdGet](docs/ResponseDetailsApiV2IndicatorsIndicatorIdGet.md) + - [ResponseDetailsApiV2ObservablesObservableIdGet](docs/ResponseDetailsApiV2ObservablesObservableIdGet.md) + - [ResponseNewApiV2EntitiesPost](docs/ResponseNewApiV2EntitiesPost.md) + - [ResponseNewApiV2IndicatorsPost](docs/ResponseNewApiV2IndicatorsPost.md) + - [ResponseNewApiV2ObservablesPost](docs/ResponseNewApiV2ObservablesPost.md) + - [ResponseNewExtendedApiV2ObservablesExtendedPost](docs/ResponseNewExtendedApiV2ObservablesExtendedPost.md) + - [ResponseNewFromYamlApiV2DfiqFromYamlPost](docs/ResponseNewFromYamlApiV2DfiqFromYamlPost.md) + - [ResponsePatchApiV2DfiqDfiqIdPatch](docs/ResponsePatchApiV2DfiqDfiqIdPatch.md) + - [ResponsePatchApiV2EntitiesEntityIdPatch](docs/ResponsePatchApiV2EntitiesEntityIdPatch.md) + - [ResponsePatchApiV2IndicatorsIndicatorIdPatch](docs/ResponsePatchApiV2IndicatorsIndicatorIdPatch.md) + - [ResponsePatchApiV2ObservablesObservableIdPatch](docs/ResponsePatchApiV2ObservablesObservableIdPatch.md) + - [ResponseToggleApiV2TasksTaskNameTogglePost](docs/ResponseToggleApiV2TasksTaskNameTogglePost.md) + - [SHA1Input](docs/SHA1Input.md) + - [SHA1Output](docs/SHA1Output.md) + - [SHA256Input](docs/SHA256Input.md) + - [SHA256Output](docs/SHA256Output.md) + - [SearchQuery](docs/SearchQuery.md) + - [SearchUserRequest](docs/SearchUserRequest.md) + - [SearchUserResponse](docs/SearchUserResponse.md) + - [SeverityType](docs/SeverityType.md) + - [SigmaInput](docs/SigmaInput.md) + - [SigmaOutput](docs/SigmaOutput.md) + - [SsdeepInput](docs/SsdeepInput.md) + - [SsdeepOutput](docs/SsdeepOutput.md) + - [SuricataInput](docs/SuricataInput.md) + - [SuricataOutput](docs/SuricataOutput.md) + - [SystemConfigResponse](docs/SystemConfigResponse.md) + - [TLSHInput](docs/TLSHInput.md) + - [TLSHOutput](docs/TLSHOutput.md) + - [Tag](docs/Tag.md) + - [TagRelationshipInput](docs/TagRelationshipInput.md) + - [TagRelationshipOutput](docs/TagRelationshipOutput.md) + - [TagSearchRequest](docs/TagSearchRequest.md) + - [TagSearchResponse](docs/TagSearchResponse.md) + - [TaskParams](docs/TaskParams.md) + - [TaskSearchRequest](docs/TaskSearchRequest.md) + - [TaskSearchRequestType](docs/TaskSearchRequestType.md) + - [TaskSearchResponse](docs/TaskSearchResponse.md) + - [TaskStatus](docs/TaskStatus.md) + - [TaskType](docs/TaskType.md) + - [TasksInner](docs/TasksInner.md) + - [Template](docs/Template.md) + - [TemplateSearchRequest](docs/TemplateSearchRequest.md) + - [TemplateSearchResponse](docs/TemplateSearchResponse.md) + - [ThreatActorInput](docs/ThreatActorInput.md) + - [ThreatActorOutput](docs/ThreatActorOutput.md) + - [ToggleUserRequest](docs/ToggleUserRequest.md) + - [ToggleableField](docs/ToggleableField.md) + - [ToolInput](docs/ToolInput.md) + - [ToolOutput](docs/ToolOutput.md) + - [UpdateRequest](docs/UpdateRequest.md) + - [UrlInput](docs/UrlInput.md) + - [UrlOutput](docs/UrlOutput.md) + - [User](docs/User.md) + - [UserAccountInput](docs/UserAccountInput.md) + - [UserAccountOutput](docs/UserAccountOutput.md) + - [UserAgentInput](docs/UserAgentInput.md) + - [UserAgentOutput](docs/UserAgentOutput.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) + - [VerticesValue](docs/VerticesValue.md) + - [VulnerabilityInput](docs/VulnerabilityInput.md) + - [VulnerabilityOutput](docs/VulnerabilityOutput.md) + - [WalletInput](docs/WalletInput.md) + - [WalletOutput](docs/WalletOutput.md) + - [WorkerRestartResponse](docs/WorkerRestartResponse.md) + - [WorkerStatusResponse](docs/WorkerStatusResponse.md) + - [YaraInput](docs/YaraInput.md) + - [YaraOutput](docs/YaraOutput.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### APIKeyHeader + +- **Type**: API key +- **API key parameter name**: x-yeti-apikey +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: APIKeyHeader and passed in as the auth context for each request. + +Example + +```go +auth := context.WithValue( + context.Background(), + goyeti.ContextAPIKeys, + map[string]goyeti.APIKey{ + "APIKeyHeader": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + +### OAuth2PasswordBearer + + +- **Type**: OAuth +- **Flow**: password +- **Authorization URL**: +- **Scopes**: N/A + +Example + +```go +auth := context.WithValue(context.Background(), goyeti.ContextAccessToken, "ACCESSTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +Or via OAuth2 module to automatically refresh tokens and perform user authentication. + +```go +import "golang.org/x/oauth2" + +/* Perform OAuth2 round trip request and obtain a token */ + +tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) +auth := context.WithValue(oauth2.NoContext, goyeti.ContextOAuth2, tokenSource) +r, err := client.Service.Operation(auth, args) +``` + +### APIKeyCookie + +- **Type**: API key +- **API key parameter name**: yeti_session +- **Location**: + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: APIKeyCookie and passed in as the auth context for each request. + +Example + +```go +auth := context.WithValue( + context.Background(), + goyeti.ContextAPIKeys, + map[string]goyeti.APIKey{ + "APIKeyCookie": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author -[See CONTRIBUTING.md](./CONTRIBUTING.md) -## TODO -- [ ] Use the Open API spec to generate the client once fixed -- [ ] Add more query functions diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 0000000..617585a --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,10963 @@ +openapi: 3.1.0 +info: + title: FastAPI + version: 0.1.0 +servers: +- url: / +paths: + /api/v2/auth/token: + post: + operationId: login_api_v2_auth_token_post + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Body_login_api_v2_auth_token_post' + required: true + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Login + tags: + - auth + /api/v2/auth/api-token: + post: + operationId: login_api_api_v2_auth_api_token_post + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + security: + - APIKeyHeader: [] + summary: Login Api + tags: + - auth + /api/v2/auth/me: + get: + operationId: me_api_v2_auth_me_get + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Successful Response + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Me + tags: + - auth + /api/v2/auth/logout: + post: + operationId: logout_api_v2_auth_logout_post + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + summary: Logout + tags: + - auth + /api/v2/observables/: + get: + operationId: observables_root_api_v2_observables__get + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Observable' + type: array + description: Successful Response + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Observables Root + tags: + - observables + post: + description: |- + Creates a new observable in the database. + + Raises: + HTTPException(400) if observable already exists. + operationId: new_api_v2_observables__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewObservableRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_New_Api_V2_Observables__Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: New + tags: + - observables + /api/v2/observables/extended: + post: + description: |- + Creates a new observable in the database with extended properties. + + Raises: + HTTPException(400) if observable already exists. + operationId: new_extended_api_v2_observables_extended_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewExtendedObservableRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_New_Extended_Api_V2_Observables_Extended_Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: New Extended + tags: + - observables + /api/v2/observables/{observable_id}: + delete: + description: Deletes an observable. + operationId: delete_api_v2_observables__observable_id__delete + parameters: + - explode: false + in: path + name: observable_id + required: true + schema: + title: Observable Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete + tags: + - observables + get: + description: Returns details about an observable. + operationId: details_api_v2_observables__observable_id__get + parameters: + - explode: false + in: path + name: observable_id + required: true + schema: {} + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Details_Api_V2_Observables__Observable_Id__Get' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Details + tags: + - observables + patch: + description: Modifies observable in the database. + operationId: patch_api_v2_observables__observable_id__patch + parameters: + - explode: false + in: path + name: observable_id + required: true + schema: {} + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchObservableRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Patch_Api_V2_Observables__Observable_Id__Patch' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Patch + tags: + - observables + /api/v2/observables/bulk: + post: + description: Bulk-creates new observables in the database. + operationId: bulk_add_api_v2_observables_bulk_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewBulkObservableAddRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BulkObservableAddResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Bulk Add + tags: + - observables + /api/v2/observables/{observable_id}/context: + post: + description: Adds context to an observable. + operationId: add_context_api_v2_observables__observable_id__context_post + parameters: + - explode: false + in: path + name: observable_id + required: true + schema: {} + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddContextRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Add_Context_Api_V2_Observables__Observable_Id__Context_Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Add Context + tags: + - observables + /api/v2/observables/{observable_id}/context/delete: + post: + description: Removes context to an observable. + operationId: delete_context_api_v2_observables__observable_id__context_delete_post + parameters: + - explode: false + in: path + name: observable_id + required: true + schema: {} + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteContextRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Delete_Context_Api_V2_Observables__Observable_Id__Context_Delete_Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete Context + tags: + - observables + /api/v2/observables/search: + post: + description: Searches for observables. + operationId: search_api_v2_observables_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ObservableSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ObservableSearchResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - observables + /api/v2/observables/add_text: + post: + description: |- + Adds and returns an observable for a given string, attempting to guess + its type. + operationId: add_text_api_v2_observables_add_text_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddTextRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Add_Text_Api_V2_Observables_Add_Text_Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Add Text + tags: + - observables + /api/v2/observables/tag: + post: + description: "Tags a set of observables, individually or in bulk." + operationId: tag_observable_api_v2_observables_tag_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ObservableTagRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ObservableTagResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Tag Observable + tags: + - observables + /api/v2/entities/: + post: + description: Creates a new entity in the database. + operationId: new_api_v2_entities__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewEntityRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_New_Api_V2_Entities__Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: New + tags: + - entities + /api/v2/entities/{entity_id}: + delete: + description: Deletes an Entity. + operationId: delete_api_v2_entities__entity_id__delete + parameters: + - explode: false + in: path + name: entity_id + required: true + schema: + title: Entity Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete + tags: + - entities + get: + description: Returns details about an observable. + operationId: details_api_v2_entities__entity_id__get + parameters: + - explode: false + in: path + name: entity_id + required: true + schema: {} + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Details_Api_V2_Entities__Entity_Id__Get' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Details + tags: + - entities + patch: + description: Modifies entity in the database. + operationId: patch_api_v2_entities__entity_id__patch + parameters: + - explode: false + in: path + name: entity_id + required: true + schema: {} + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchEntityRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Patch_Api_V2_Entities__Entity_Id__Patch' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Patch + tags: + - entities + /api/v2/entities/search: + post: + description: Searches for observables. + operationId: search_api_v2_entities_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EntitySearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EntitySearchResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - entities + /api/v2/entities/tag: + post: + description: Tags entities. + operationId: tag_api_v2_entities_tag_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EntityTagRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EntityTagResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Tag + tags: + - entities + /api/v2/indicators/: + post: + description: Creates a new indicator in the database. + operationId: new_api_v2_indicators__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewIndicatorRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_New_Api_V2_Indicators__Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: New + tags: + - indicators + /api/v2/indicators/{indicator_id}: + delete: + description: Deletes an indicator. + operationId: delete_api_v2_indicators__indicator_id__delete + parameters: + - explode: false + in: path + name: indicator_id + required: true + schema: + title: Indicator Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete + tags: + - indicators + get: + description: Returns details about an indicator. + operationId: details_api_v2_indicators__indicator_id__get + parameters: + - explode: false + in: path + name: indicator_id + required: true + schema: {} + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Details_Api_V2_Indicators__Indicator_Id__Get' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Details + tags: + - indicators + patch: + description: Modifies an indicator in the database. + operationId: patch_api_v2_indicators__indicator_id__patch + parameters: + - explode: false + in: path + name: indicator_id + required: true + schema: {} + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchIndicatorRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Patch_Api_V2_Indicators__Indicator_Id__Patch' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Patch + tags: + - indicators + /api/v2/indicators/search: + post: + description: Searches for indicators. + operationId: search_api_v2_indicators_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndicatorSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IndicatorSearchResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - indicators + /api/v2/indicators/tag: + post: + description: Tags entities. + operationId: tag_api_v2_indicators_tag_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndicatorTagRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IndicatorTagResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Tag + tags: + - indicators + /api/v2/tags/: + post: + description: Creates a new observable in the database. + operationId: new_api_v2_tags__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: New + tags: + - tags + /api/v2/tags/{tag_id}: + delete: + description: Deletes a Tag. + operationId: delete_api_v2_tags__tag_id__delete + parameters: + - explode: false + in: path + name: tag_id + required: true + schema: + title: Tag Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete + tags: + - tags + get: + description: Returns details about a Tag. + operationId: details_api_v2_tags__tag_id__get + parameters: + - explode: false + in: path + name: tag_id + required: true + schema: + title: Tag Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Details + tags: + - tags + put: + description: Updates an observable. + operationId: update_api_v2_tags__tag_id__put + parameters: + - explode: false + in: path + name: tag_id + required: true + schema: + title: Tag Id + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Update + tags: + - tags + /api/v2/tags/search: + post: + description: Searches for Tags. + operationId: search_api_v2_tags_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TagSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TagSearchResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - tags + /api/v2/tags/merge: + post: + operationId: merge_api_v2_tags_merge_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MergeTagRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MergeTagResult' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Merge + tags: + - tags + /api/v2/dfiq/config: + get: + operationId: config_api_v2_dfiq_config_get + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DFIQConfigResponse' + description: Successful Response + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Config + tags: + - dfiq + /api/v2/dfiq/from_archive: + post: + description: Uncompresses a ZIP archive and processes the DFIQ content inside + it. + operationId: from_archive_api_v2_dfiq_from_archive_post + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_from_archive_api_v2_dfiq_from_archive_post' + required: true + responses: + "200": + content: + application/json: + schema: + additionalProperties: + type: integer + title: Response From Archive Api V2 Dfiq From Archive Post + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: From Archive + tags: + - dfiq + /api/v2/dfiq/from_yaml: + post: + description: Creates a new DFIQ object in the database. + operationId: new_from_yaml_api_v2_dfiq_from_yaml_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewDFIQRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_New_From_Yaml_Api_V2_Dfiq_From_Yaml_Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: New From Yaml + tags: + - dfiq + /api/v2/dfiq/to_archive: + post: + description: |- + Compresses DFIQ objects into a ZIP archive. + + The structure of the archive is as follows: + - {public, internal}/ + - type/ + - dfiq_id.yaml + operationId: to_archive_api_v2_dfiq_to_archive_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DFIQSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: To Archive + tags: + - dfiq + /api/v2/dfiq/validate: + post: + description: Validates a DFIQ YAML string. + operationId: validate_dfiq_yaml_api_v2_dfiq_validate_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DFIQValidateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DFIQValidateResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Validate Dfiq Yaml + tags: + - dfiq + /api/v2/dfiq/{dfiq_id}: + delete: + description: Deletes a DFIQ object. + operationId: delete_api_v2_dfiq__dfiq_id__delete + parameters: + - explode: false + in: path + name: dfiq_id + required: true + schema: + title: Dfiq Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete + tags: + - dfiq + get: + description: Returns details about a DFIQ object. + operationId: details_api_v2_dfiq__dfiq_id__get + parameters: + - explode: false + in: path + name: dfiq_id + required: true + schema: {} + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Details_Api_V2_Dfiq__Dfiq_Id__Get' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Details + tags: + - dfiq + patch: + description: Modifies an DFIQ object in the database. + operationId: patch_api_v2_dfiq__dfiq_id__patch + parameters: + - explode: false + in: path + name: dfiq_id + required: true + schema: {} + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchDFIQRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Patch_Api_V2_Dfiq__Dfiq_Id__Patch' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Patch + tags: + - dfiq + /api/v2/dfiq/search: + post: + description: Searches for DFIQ objects. + operationId: search_api_v2_dfiq_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DFIQSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DFIQSearchResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - dfiq + /api/v2/tasks/{task_name}/run: + post: + description: Runs a task asynchronously. + operationId: run_api_v2_tasks__task_name__run_post + parameters: + - explode: false + in: path + name: task_name + required: true + schema: {} + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskParams' + responses: + "200": + content: + application/json: + schema: + title: Response Run Api V2 Tasks Task Name Run Post + type: object + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Run + tags: + - tasks + /api/v2/tasks/{task_name}/toggle: + post: + description: Toggles the enabled status on a task. + operationId: toggle_api_v2_tasks__task_name__toggle_post + parameters: + - explode: false + in: path + name: task_name + required: true + schema: {} + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Response_Toggle_Api_V2_Tasks__Task_Name__Toggle_Post' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Toggle + tags: + - tasks + /api/v2/tasks/search: + post: + description: Searches for tasks. + operationId: search_api_v2_tasks_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TaskSearchResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - tasks + /api/v2/tasks/export/new: + post: + description: Creates a new ExportTask in the database. + operationId: new_export_api_v2_tasks_export_new_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewExportRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExportTask-Output' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: New Export + tags: + - tasks + /api/v2/tasks/export/{export_name}: + delete: + description: Deletes an ExportTask. + operationId: delete_export_api_v2_tasks_export__export_name__delete + parameters: + - explode: false + in: path + name: export_name + required: true + schema: + title: Export Name + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete Export + tags: + - tasks + patch: + description: Pathes an existing ExportTask in the database. + operationId: patch_export_api_v2_tasks_export__export_name__patch + parameters: + - explode: false + in: path + name: export_name + required: true + schema: + title: Export Name + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchExportRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExportTask-Output' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Patch Export + tags: + - tasks + /api/v2/tasks/export/{export_id}/content: + get: + description: Downloads the latest contents of a given ExportTask. + operationId: export_content_api_v2_tasks_export__export_id__content_get + parameters: + - explode: false + in: path + name: export_id + required: true + schema: + title: Export Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Export Content + tags: + - tasks + /api/v2/graph/search: + post: + description: Fetches neighbros for a given Yeti Object. + operationId: search_api_v2_graph_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GraphSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GraphSearchResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - graph + /api/v2/graph/add: + post: + description: Adds a link to the graph. + operationId: add_api_v2_graph_add_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GraphAddRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Relationship' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Add + tags: + - graph + /api/v2/graph/{relationship_id}: + delete: + description: Deletes a link from the graph. + operationId: delete_api_v2_graph__relationship_id__delete + parameters: + - explode: false + in: path + name: relationship_id + required: true + schema: + title: Relationship Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete + tags: + - graph + patch: + description: Edits a Relationship in the graph. + operationId: edit_api_v2_graph__relationship_id__patch + parameters: + - explode: false + in: path + name: relationship_id + required: true + schema: + title: Relationship Id + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GraphPatchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Relationship' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Edit + tags: + - graph + /api/v2/graph/{relationship_id}/swap: + post: + description: Swaps the source and target of a relationship. + operationId: swap_api_v2_graph__relationship_id__swap_post + parameters: + - explode: false + in: path + name: relationship_id + required: true + schema: + title: Relationship Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Relationship' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Swap + tags: + - graph + /api/v2/graph/match: + post: + description: Fetches neighbors for a given Yeti Object. + operationId: match_api_v2_graph_match_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AnalysisRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnalysisResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Match + tags: + - graph + /api/v2/templates/search: + post: + description: Searches for observables. + operationId: search_api_v2_templates_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateSearchResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - templates + /api/v2/templates/render: + post: + description: Renders a template. + operationId: render_api_v2_templates_render_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RenderTemplateRequest' + required: true + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Render + tags: + - templates + /api/v2/users/{user_id}: + delete: + description: Deletes a user from the database. + operationId: delete_api_v2_users__user_id__delete + parameters: + - explode: false + in: path + name: user_id + required: true + schema: + title: User Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Delete + tags: + - users + get: + description: Gets a user by ID. + operationId: get_api_v2_users__user_id__get + parameters: + - explode: false + in: path + name: user_id + required: true + schema: + title: User Id + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Get + tags: + - users + /api/v2/users/search: + post: + description: Searches for users. + operationId: search_api_v2_users_search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchUserRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SearchUserResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Search + tags: + - users + /api/v2/users/toggle: + post: + description: Toggles a user's enabled or admin state. + operationId: toggle_api_v2_users_toggle_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ToggleUserRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Toggle + tags: + - users + /api/v2/users/reset-api-key: + post: + description: Resets a user's API key. + operationId: reset_api_key_api_v2_users_reset_api_key_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResetApiKeyRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Reset Api Key + tags: + - users + /api/v2/users/reset-password: + post: + description: Resets a user's password. + operationId: reset_password_api_v2_users_reset_password_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResetPasswordRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Reset Password + tags: + - users + /api/v2/users/: + post: + description: Creates a new user. + operationId: create_api_v2_users__post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewUserRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Create + tags: + - users + /api/v2/system/config: + get: + description: Gets the system config. + operationId: get_config_api_v2_system_config_get + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SystemConfigResponse' + description: Successful Response + summary: Get Config + tags: + - system + /api/v2/system/workers: + get: + operationId: get_worker_status_api_v2_system_workers_get + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkerStatusResponse' + description: Successful Response + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Get Worker Status + tags: + - system + /api/v2/system/restartworker/{worker_name}: + post: + description: Restarts a single or all Celery workers. + operationId: restart_worker_api_v2_system_restartworker__worker_name__post + parameters: + - explode: false + in: path + name: worker_name + required: true + schema: + title: Worker Name + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkerRestartResponse' + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Restart Worker + tags: + - system + /api/v2/import_data/import_misp_json: + post: + operationId: import_misp_json_api_v2_import_data_import_misp_json_post + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_import_misp_json_api_v2_import_data_import_misp_json_post' + required: true + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - APIKeyCookie: [] + summary: Import Misp Json + tags: + - import_data + - import_misp_json +components: + schemas: + ASN-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: asn + enum: + - asn + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + country: + nullable: true + type: string + description: + nullable: true + type: string + required: + - value + title: ASN + ASN-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: asn + enum: + - asn + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + country: + nullable: true + type: string + description: + nullable: true + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: ASN + AddContextRequest: + additionalProperties: {} + example: + context: "{}" + source: source + skip_compare: + - "" + - "" + properties: + source: + title: Source + context: + title: Context + skip_compare: + default: [] + items: {} + title: Skip Compare + uniqueItems: true + required: + - context + - source + title: AddContextRequest + AddTextRequest: + additionalProperties: {} + example: + text: text + tags: + - tags + - tags + - tags + - tags + - tags + properties: + tags: + default: [] + items: {} + maxItems: 50 + title: Tags + text: + title: Text + required: + - text + title: AddTextRequest + AnalysisRequest: + example: + add_tags: + - add_tags + - add_tags + - add_tags + - add_tags + - add_tags + observables: + - observables + - observables + add_unknown: false + regex_match: false + fetch_neighbors: true + add_type: cidr + properties: + observables: + items: + type: string + type: array + add_tags: + default: [] + items: + type: string + maxItems: 50 + type: array + regex_match: + default: false + title: Regex Match + type: boolean + add_type: + $ref: '#/components/schemas/ObservableType-Input' + fetch_neighbors: + default: true + title: Fetch Neighbors + type: boolean + add_unknown: + default: false + title: Add Unknown + type: boolean + required: + - observables + title: AnalysisRequest + AnalysisResponse: + example: + observables: + - - "" + - "" + - - "" + - "" + known: + - root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + - root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + entities: + - - "" + - "" + - - "" + - "" + matches: + - - "" + - "" + - - "" + - "" + unknown: + - unknown + - unknown + properties: + entities: + items: + items: {} + maxItems: 2 + minItems: 2 + type: array + type: array + observables: + items: + items: {} + maxItems: 2 + minItems: 2 + type: array + type: array + known: + items: + $ref: '#/components/schemas/Observable' + type: array + matches: + items: + items: {} + maxItems: 2 + minItems: 2 + type: array + type: array + unknown: + items: + type: string + type: array + uniqueItems: true + required: + - entities + - known + - matches + - observables + - unknown + title: AnalysisResponse + AnalyticsTask: + properties: + name: + title: Name + type: string + enabled: + default: false + title: Enabled + type: boolean + description: + default: "" + title: Description + type: string + status: + $ref: '#/components/schemas/TaskStatus' + status_message: + default: "" + title: Status Message + type: string + last_run: + format: date-time + nullable: true + type: string + frequency: + format: duration + nullable: true + type: string + acts_on: + default: [] + items: + type: string + type: array + type: + default: analytics + enum: + - analytics + title: Type + type: string + id: + readOnly: true + title: Id + type: string + required: + - id + - name + title: AnalyticsTask + AttackPattern-Input: + properties: + type: + default: attack-pattern + enum: + - attack-pattern + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + aliases: + default: [] + items: + type: string + type: array + kill_chain_phases: + default: [] + items: + type: string + type: array + required: + - name + title: AttackPattern + AttackPattern-Output: + properties: + type: + default: attack-pattern + enum: + - attack-pattern + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + aliases: + default: [] + items: + type: string + type: array + kill_chain_phases: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: AttackPattern + BIC-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: bic + enum: + - bic + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: BIC + BIC-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: bic + enum: + - bic + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: BIC + Body_from_archive_api_v2_dfiq_from_archive_post: + properties: + archive: + format: binary + title: Archive + type: string + required: + - archive + title: Body_from_archive_api_v2_dfiq_from_archive_post + Body_import_misp_json_api_v2_import_data_import_misp_json_post: + properties: + misp_file_json: + format: binary + title: Misp File Json + type: string + required: + - misp_file_json + title: Body_import_misp_json_api_v2_import_data_import_misp_json_post + Body_login_api_v2_auth_token_post: + properties: + grant_type: + nullable: true + pattern: password + type: string + username: + title: Username + type: string + password: + title: Password + type: string + scope: + default: "" + title: Scope + type: string + client_id: + nullable: true + type: string + client_secret: + nullable: true + type: string + required: + - password + - username + title: Body_login_api_v2_auth_token_post + BulkObservableAddResponse: + additionalProperties: {} + example: + added: + - root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: cidr + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + - root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: cidr + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + failed: + - failed + - failed + properties: + added: + default: [] + items: + $ref: '#/components/schemas/Added_inner' + title: Added + failed: + default: [] + items: {} + title: Failed + title: BulkObservableAddResponse + CIDR-Input: + example: + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + type: cidr + value: value + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: cidr + enum: + - cidr + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: CIDR + CIDR-Output: + example: + root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: cidr + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: cidr + enum: + - cidr + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: CIDR + Campaign-Input: + properties: + type: + default: campaign + enum: + - campaign + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + aliases: + default: [] + items: + type: string + type: array + first_seen: + format: date-time + title: First Seen + type: string + last_seen: + format: date-time + title: Last Seen + type: string + required: + - name + title: Campaign + Campaign-Output: + properties: + type: + default: campaign + enum: + - campaign + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + aliases: + default: [] + items: + type: string + type: array + first_seen: + format: date-time + title: First Seen + type: string + last_seen: + format: date-time + title: Last Seen + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Campaign + Certificate-Input: + description: |- + This is the schema for the Certificate observable type. + + Attributes: + last_seen: the last time the certificate was seen. + first_seen: the first time the certificate was seen. + issuer: the issuer of the certificate. + subject: the certificate subject. + serial_number: the certificate serial. + after: the date after which the certificate is valid. + before: the date before which the certificate is valid. + fingerprint: the certificate fingerprint. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: certificate + enum: + - certificate + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + last_seen: + format: date-time + title: Last Seen + type: string + first_seen: + format: date-time + title: First Seen + type: string + issuer: + nullable: true + type: string + subject: + nullable: true + type: string + serial_number: + nullable: true + type: string + after: + format: date-time + nullable: true + type: string + before: + format: date-time + nullable: true + type: string + fingerprint: + nullable: true + type: string + required: + - value + title: Certificate + Certificate-Output: + description: |- + This is the schema for the Certificate observable type. + + Attributes: + last_seen: the last time the certificate was seen. + first_seen: the first time the certificate was seen. + issuer: the issuer of the certificate. + subject: the certificate subject. + serial_number: the certificate serial. + after: the date after which the certificate is valid. + before: the date before which the certificate is valid. + fingerprint: the certificate fingerprint. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: certificate + enum: + - certificate + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + last_seen: + format: date-time + title: Last Seen + type: string + first_seen: + format: date-time + title: First Seen + type: string + issuer: + nullable: true + type: string + subject: + nullable: true + type: string + serial_number: + nullable: true + type: string + after: + format: date-time + nullable: true + type: string + before: + format: date-time + nullable: true + type: string + fingerprint: + nullable: true + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Certificate + CommandLine-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: command_line + enum: + - command_line + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: CommandLine + CommandLine-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: command_line + enum: + - command_line + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: CommandLine + Company-Input: + properties: + type: + default: company + enum: + - company + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + required: + - name + title: Company + Company-Output: + properties: + type: + default: company + enum: + - company + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Company + CourseOfAction-Input: + properties: + type: + default: course-of-action + enum: + - course-of-action + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + required: + - name + title: CourseOfAction + CourseOfAction-Output: + properties: + type: + default: course-of-action + enum: + - course-of-action + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: CourseOfAction + DFIQApproach: + properties: + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + tags: + default: [] + items: + type: string + type: array + references: + default: [] + items: + type: string + type: array + notes: + $ref: '#/components/schemas/DFIQApproachNotes' + steps: + default: [] + items: + $ref: '#/components/schemas/DFIQApproachStep' + type: array + required: + - description + - name + title: DFIQApproach + DFIQApproachNotes: + properties: + covered: + default: [] + items: + type: string + type: array + not_covered: + default: [] + items: + type: string + type: array + title: DFIQApproachNotes + DFIQApproachStep: + properties: + name: + minLength: 1 + title: Name + type: string + description: + nullable: true + type: string + stage: + minLength: 1 + title: Stage + type: string + type: + nullable: true + type: string + value: + nullable: true + type: string + required: + - name + - stage + title: DFIQApproachStep + DFIQConfigResponse: + additionalProperties: {} + example: + step_types: + - step_types + - step_types + stage_types: + - stage_types + - stage_types + properties: + stage_types: + items: {} + title: Stage Types + step_types: + items: {} + title: Step Types + required: + - stage_types + - step_types + title: DFIQConfigResponse + DFIQFacet: + properties: + name: + minLength: 1 + title: Name + type: string + uuid: + nullable: true + type: string + dfiq_id: + nullable: true + type: string + dfiq_version: + minLength: 1 + title: Dfiq Version + type: string + dfiq_tags: + items: + type: string + nullable: true + type: array + contributors: + items: + type: string + nullable: true + type: array + dfiq_yaml: + minLength: 1 + title: Dfiq Yaml + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + description: + nullable: true + type: string + parent_ids: + items: + type: string + type: array + type: + default: facet + enum: + - facet + title: Type + type: string + id: + readOnly: true + title: Id + type: string + root_type: + enum: + - root_type + readOnly: true + title: Root Type + type: string + required: + - description + - dfiq_version + - dfiq_yaml + - id + - name + - parent_ids + - root_type + title: DFIQFacet + DFIQQuestion: + properties: + name: + minLength: 1 + title: Name + type: string + uuid: + nullable: true + type: string + dfiq_id: + nullable: true + type: string + dfiq_version: + minLength: 1 + title: Dfiq Version + type: string + dfiq_tags: + items: + type: string + nullable: true + type: array + contributors: + items: + type: string + nullable: true + type: array + dfiq_yaml: + minLength: 1 + title: Dfiq Yaml + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + description: + nullable: true + type: string + parent_ids: + items: + type: string + type: array + type: + default: question + enum: + - question + title: Type + type: string + approaches: + default: [] + items: + $ref: '#/components/schemas/DFIQApproach' + type: array + id: + readOnly: true + title: Id + type: string + root_type: + enum: + - root_type + readOnly: true + title: Root Type + type: string + required: + - description + - dfiq_version + - dfiq_yaml + - id + - name + - parent_ids + - root_type + title: DFIQQuestion + DFIQScenario: + example: + root_type: root_type + created: 2000-01-23T04:56:07.000+00:00 + dfiq_tags: + - dfiq_tags + - dfiq_tags + dfiq_id: dfiq_id + description: description + type: scenario + uuid: uuid + dfiq_yaml: dfiq_yaml + name: name + modified: 2000-01-23T04:56:07.000+00:00 + contributors: + - contributors + - contributors + id: id + dfiq_version: dfiq_version + properties: + name: + minLength: 1 + title: Name + type: string + uuid: + nullable: true + type: string + dfiq_id: + nullable: true + type: string + dfiq_version: + minLength: 1 + title: Dfiq Version + type: string + dfiq_tags: + items: + type: string + nullable: true + type: array + contributors: + items: + type: string + nullable: true + type: array + dfiq_yaml: + minLength: 1 + title: Dfiq Yaml + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + description: + title: Description + type: string + type: + default: scenario + enum: + - scenario + title: Type + type: string + id: + readOnly: true + title: Id + type: string + root_type: + enum: + - root_type + readOnly: true + title: Root Type + type: string + required: + - description + - dfiq_version + - dfiq_yaml + - id + - name + - root_type + title: DFIQScenario + DFIQSearchRequest: + additionalProperties: {} + example: + query: + key: Query_value + sorting: + - - "" + - "" + - - "" + - "" + count: 0 + filter_aliases: + - - "" + - "" + - - "" + - "" + page: 6 + type: scenario + properties: + query: + additionalProperties: + $ref: '#/components/schemas/Query_value' + default: {} + title: Query + type: + $ref: '#/components/schemas/DFIQSearchRequest_type' + sorting: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Sorting + filter_aliases: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Filter Aliases + count: + default: 50 + title: Count + page: + default: 0 + title: Page + title: DFIQSearchRequest + DFIQSearchResponse: + additionalProperties: {} + example: + total: 0 + dfiq: + - root_type: root_type + created: 2000-01-23T04:56:07.000+00:00 + dfiq_tags: + - dfiq_tags + - dfiq_tags + dfiq_id: dfiq_id + description: description + type: scenario + uuid: uuid + dfiq_yaml: dfiq_yaml + name: name + modified: 2000-01-23T04:56:07.000+00:00 + contributors: + - contributors + - contributors + id: id + dfiq_version: dfiq_version + - root_type: root_type + created: 2000-01-23T04:56:07.000+00:00 + dfiq_tags: + - dfiq_tags + - dfiq_tags + dfiq_id: dfiq_id + description: description + type: scenario + uuid: uuid + dfiq_yaml: dfiq_yaml + name: name + modified: 2000-01-23T04:56:07.000+00:00 + contributors: + - contributors + - contributors + id: id + dfiq_version: dfiq_version + properties: + dfiq: + items: + $ref: '#/components/schemas/Dfiq_inner' + title: Dfiq + total: + title: Total + required: + - dfiq + - total + title: DFIQSearchResponse + DFIQType: + enum: + - scenario + - facet + - question + title: DFIQType + type: string + DFIQValidateRequest: + additionalProperties: {} + example: + dfiq_yaml: dfiq_yaml + update_indicators: false + dfiq_type: scenario + check_id: false + properties: + dfiq_yaml: + title: Dfiq Yaml + dfiq_type: + $ref: '#/components/schemas/DFIQType' + update_indicators: + default: false + title: Update Indicators + check_id: + default: false + title: Check Id + required: + - dfiq_type + - dfiq_yaml + title: DFIQValidateRequest + DFIQValidateResponse: + additionalProperties: {} + example: + valid: true + error_type: message + error: Error + properties: + valid: + title: Valid + error: + $ref: '#/components/schemas/Error' + error_type: + default: message + title: Error Type + required: + - valid + title: DFIQValidateResponse + DeleteContextRequest: + additionalProperties: {} + example: + context: "{}" + source: source + skip_compare: + - "" + - "" + properties: + source: + title: Source + context: + title: Context + skip_compare: + default: [] + items: {} + title: Skip Compare + uniqueItems: true + required: + - context + - source + title: DeleteContextRequest + DiamondModel: + enum: + - adversary + - capability + - infrastructure + - victim + title: DiamondModel + type: string + DockerImage-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: docker_image + enum: + - docker_image + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: DockerImage + DockerImage-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: docker_image + enum: + - docker_image + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: DockerImage + Email-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: email + enum: + - email + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: Email + Email-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: email + enum: + - email + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Email + Entity: + properties: + type: + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + - type + title: Entity + EntitySearchRequest: + additionalProperties: {} + example: + query: + key: Query_value + sorting: + - - "" + - "" + - - "" + - "" + count: 0 + filter_aliases: + - - "" + - "" + - - "" + - "" + page: 6 + type: investigation + properties: + query: + additionalProperties: + $ref: '#/components/schemas/Query_value' + default: {} + title: Query + type: + $ref: '#/components/schemas/EntitySearchRequest_type' + sorting: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Sorting + filter_aliases: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Filter Aliases + count: + default: 50 + title: Count + page: + default: 0 + title: Page + title: EntitySearchRequest + EntitySearchResponse: + additionalProperties: {} + example: + total: 6 + entities: + - reference: "" + root_type: entity + created: 2000-01-23T04:56:07.000+00:00 + name: name + context: + - "{}" + - "{}" + description: "" + modified: 2000-01-23T04:56:07.000+00:00 + id: id + related_observables_count: 0 + type: investigation + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + - reference: "" + root_type: entity + created: 2000-01-23T04:56:07.000+00:00 + name: name + context: + - "{}" + - "{}" + description: "" + modified: 2000-01-23T04:56:07.000+00:00 + id: id + related_observables_count: 0 + type: investigation + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + entities: + items: + $ref: '#/components/schemas/Entities_inner' + title: Entities + total: + title: Total + required: + - entities + - total + title: EntitySearchResponse + EntityTagRequest: + additionalProperties: {} + example: + ids: + - ids + - ids + strict: false + tags: + - tags + - tags + - tags + - tags + - tags + properties: + ids: + items: {} + title: Ids + tags: + default: [] + items: {} + maxItems: 50 + title: Tags + strict: + default: false + title: Strict + required: + - ids + title: EntityTagRequest + EntityTagResponse: + additionalProperties: {} + example: + tagged: 0 + tags: + key: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + tagged: + title: Tagged + tags: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + title: Tags + required: + - tagged + - tags + title: EntityTagResponse + EntityType: + enum: + - investigation + - course-of-action + - identity + - intrusion-set + - tool + - threat-actor + - campaign + - company + - malware + - phone + - note + - attack-pattern + - vulnerability + - honeypot + - threat-finding + title: EntityType + type: string + ExportTask-Input: + example: + status_message: "" + fresh_tags: true + sha256: sha256 + description: "" + last_run: 2000-01-23T04:56:07.000+00:00 + type: export + exclude_tags: + - exclude_tags + - exclude_tags + enabled: false + frequency: frequency + ignore_tags: + - ignore_tags + - ignore_tags + template_name: template_name + name: name + acts_on: + - cidr + - cidr + include_tags: + - include_tags + - include_tags + status: idle + properties: + name: + title: Name + type: string + enabled: + default: false + title: Enabled + type: boolean + description: + default: "" + title: Description + type: string + status: + $ref: '#/components/schemas/TaskStatus' + status_message: + default: "" + title: Status Message + type: string + last_run: + format: date-time + nullable: true + type: string + frequency: + format: duration + nullable: true + type: string + type: + default: export + enum: + - export + title: Type + type: string + include_tags: + default: [] + items: + type: string + type: array + exclude_tags: + default: [] + items: + type: string + type: array + ignore_tags: + default: [] + items: + type: string + type: array + fresh_tags: + default: true + title: Fresh Tags + type: boolean + acts_on: + default: [] + items: + $ref: '#/components/schemas/ObservableType-Input' + type: array + template_name: + title: Template Name + type: string + sha256: + nullable: true + type: string + required: + - name + - template_name + title: ExportTask + ExportTask-Output: + example: + status_message: "" + fresh_tags: true + sha256: sha256 + description: "" + last_run: 2000-01-23T04:56:07.000+00:00 + type: export + exclude_tags: + - exclude_tags + - exclude_tags + enabled: false + frequency: frequency + ignore_tags: + - ignore_tags + - ignore_tags + template_name: template_name + name: name + acts_on: + - null + - null + include_tags: + - include_tags + - include_tags + id: id + status: idle + properties: + name: + title: Name + type: string + enabled: + default: false + title: Enabled + type: boolean + description: + default: "" + title: Description + type: string + status: + $ref: '#/components/schemas/TaskStatus' + status_message: + default: "" + title: Status Message + type: string + last_run: + format: date-time + nullable: true + type: string + frequency: + format: duration + nullable: true + type: string + type: + default: export + enum: + - export + title: Type + type: string + include_tags: + default: [] + items: + type: string + type: array + exclude_tags: + default: [] + items: + type: string + type: array + ignore_tags: + default: [] + items: + type: string + type: array + fresh_tags: + default: true + title: Fresh Tags + type: boolean + acts_on: + default: [] + items: + $ref: '#/components/schemas/ObservableType-Output' + type: array + template_name: + title: Template Name + type: string + sha256: + nullable: true + type: string + id: + readOnly: true + title: Id + type: string + required: + - id + - name + - template_name + title: ExportTask + FeedTask: + example: + status_message: "" + name: name + description: "" + last_run: 2000-01-23T04:56:07.000+00:00 + id: id + type: feed + enabled: false + status: idle + frequency: frequency + properties: + name: + title: Name + type: string + enabled: + default: false + title: Enabled + type: boolean + description: + default: "" + title: Description + type: string + status: + $ref: '#/components/schemas/TaskStatus' + status_message: + default: "" + title: Status Message + type: string + last_run: + format: date-time + nullable: true + type: string + frequency: + format: duration + nullable: true + type: string + type: + default: feed + enum: + - feed + title: Type + type: string + id: + readOnly: true + title: Id + type: string + required: + - id + - name + title: FeedTask + File-Input: + description: |- + Represents a file. + + One of sha256, md5, or sha1 should be provided. + Value should to be in the form FILE:. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: file + enum: + - file + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + name: + nullable: true + type: string + size: + nullable: true + type: integer + sha256: + nullable: true + type: string + md5: + nullable: true + type: string + sha1: + nullable: true + type: string + mime_type: + nullable: true + type: string + required: + - value + title: File + File-Output: + description: |- + Represents a file. + + One of sha256, md5, or sha1 should be provided. + Value should to be in the form FILE:. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: file + enum: + - file + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + name: + nullable: true + type: string + size: + nullable: true + type: integer + sha256: + nullable: true + type: string + md5: + nullable: true + type: string + sha1: + nullable: true + type: string + mime_type: + nullable: true + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: File + ForensicArtifact-Input: + description: |- + Represents a Forensic Artifact + + As defined in https://github.com/ForensicArtifacts/artifacts + properties: + name: + title: Name + type: string + type: + default: forensicartifact + enum: + - forensicartifact + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + sources: + default: [] + items: + type: object + type: array + aliases: + default: [] + items: + type: string + type: array + supported_os: + default: [] + items: + type: string + type: array + required: + - diamond + - name + - pattern + title: ForensicArtifact + ForensicArtifact-Output: + description: |- + Represents a Forensic Artifact + + As defined in https://github.com/ForensicArtifacts/artifacts + properties: + name: + title: Name + type: string + type: + default: forensicartifact + enum: + - forensicartifact + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + sources: + default: [] + items: + type: object + type: array + aliases: + default: [] + items: + type: string + type: array + supported_os: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - indicator + readOnly: true + title: Root Type + type: string + required: + - diamond + - id + - name + - pattern + - root_type + - tags + title: ForensicArtifact + Generic-Input: + description: Use this type of Observable for any type of observable that doesn't + fit into any other category. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: generic + enum: + - generic + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: Generic + Generic-Output: + description: Use this type of Observable for any type of observable that doesn't + fit into any other category. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: generic + enum: + - generic + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Generic + GraphAddRequest: + additionalProperties: {} + example: + link_type: link_type + description: description + source: source + target: target + properties: + source: + title: Source + target: + title: Target + link_type: + title: Link Type + description: + title: Description + required: + - description + - link_type + - source + - target + title: GraphAddRequest + GraphDirection: + enum: + - outbound + - inbound + - any + title: GraphDirection + type: string + GraphFilter: + example: + value: value + key: key + operator: operator + properties: + key: + title: Key + type: string + value: + title: Value + type: string + operator: + title: Operator + type: string + required: + - key + - operator + - value + title: GraphFilter + GraphPatchRequest: + example: + link_type: link_type + description: description + properties: + link_type: + title: Link Type + type: string + description: + title: Description + type: string + required: + - description + - link_type + title: GraphPatchRequest + GraphSearchRequest: + additionalProperties: {} + example: + max_hops: 1 + count: 5 + source: source + graph: graph + target_types: + - target_types + - target_types + filter: + - value: value + key: key + operator: operator + - value: value + key: key + operator: operator + link_types: + - link_types + - link_types + include_original: true + sorting: + - - "" + - "" + - - "" + - "" + min_hops: 6 + hops: 0 + page: 5 + direction: outbound + properties: + source: + title: Source + link_types: + default: [] + items: {} + title: Link Types + target_types: + default: [] + items: {} + title: Target Types + hops: + $ref: '#/components/schemas/Hops' + min_hops: + $ref: '#/components/schemas/Min_Hops' + max_hops: + $ref: '#/components/schemas/Max_Hops' + graph: + title: Graph + direction: + $ref: '#/components/schemas/GraphDirection' + filter: + default: [] + items: + $ref: '#/components/schemas/GraphFilter' + title: Filter + include_original: + title: Include Original + count: + default: 50 + title: Count + page: + default: 0 + title: Page + sorting: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Sorting + required: + - direction + - graph + - include_original + - source + title: GraphSearchRequest + GraphSearchResponse: + additionalProperties: {} + example: + total: 6 + vertices: + key: + root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + paths: + - - created: 2000-01-23T04:56:07.000+00:00 + count: 0 + description: description + modified: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + type: type + target: target + - created: 2000-01-23T04:56:07.000+00:00 + count: 0 + description: description + modified: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + type: type + target: target + - - created: 2000-01-23T04:56:07.000+00:00 + count: 0 + description: description + modified: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + type: type + target: target + - created: 2000-01-23T04:56:07.000+00:00 + count: 0 + description: description + modified: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + type: type + target: target + properties: + vertices: + additionalProperties: + $ref: '#/components/schemas/Vertices_value' + title: Vertices + paths: + items: + items: + $ref: '#/components/schemas/Paths_inner_inner' + title: Paths + total: + title: Total + required: + - paths + - total + - vertices + title: GraphSearchResponse + HTTPValidationError: + example: + detail: + - msg: msg + loc: + - ValidationError_loc_inner + - ValidationError_loc_inner + type: type + - msg: msg + loc: + - ValidationError_loc_inner + - ValidationError_loc_inner + type: type + properties: + detail: + items: + $ref: '#/components/schemas/ValidationError' + type: array + title: HTTPValidationError + Hostname-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: hostname + enum: + - hostname + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: Hostname + Hostname-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: hostname + enum: + - hostname + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Hostname + IBAN-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: iban + enum: + - iban + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: IBAN + IBAN-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: iban + enum: + - iban + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: IBAN + IPv4-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: ipv4 + enum: + - ipv4 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: IPv4 + IPv4-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: ipv4 + enum: + - ipv4 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: IPv4 + IPv6-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: ipv6 + enum: + - ipv6 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: IPv6 + IPv6-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: ipv6 + enum: + - ipv6 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: IPv6 + Identity-Input: + properties: + type: + default: identity + enum: + - identity + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + identity_class: + default: "" + title: Identity Class + type: string + sectors: + default: [] + items: + type: string + type: array + contact_information: + default: "" + title: Contact Information + type: string + required: + - name + title: Identity + Identity-Output: + properties: + type: + default: identity + enum: + - identity + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + identity_class: + default: "" + title: Identity Class + type: string + sectors: + default: [] + items: + type: string + type: array + contact_information: + default: "" + title: Contact Information + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Identity + Imphash-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: imphash + enum: + - imphash + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: Imphash + Imphash-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: imphash + enum: + - imphash + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Imphash + Indicator: + properties: + name: + title: Name + type: string + type: + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - indicator + readOnly: true + title: Root Type + type: string + required: + - diamond + - id + - name + - pattern + - root_type + - tags + - type + title: Indicator + IndicatorSearchRequest: + additionalProperties: {} + example: + query: + key: Query_value + sorting: + - - "" + - "" + - - "" + - "" + count: 0 + filter_aliases: + - - "" + - "" + - - "" + - "" + page: 6 + type: query + properties: + query: + additionalProperties: + $ref: '#/components/schemas/Query_value' + default: {} + title: Query + type: + $ref: '#/components/schemas/IndicatorSearchRequest_type' + sorting: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Sorting + filter_aliases: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Filter Aliases + count: + default: 50 + title: Count + page: + default: 0 + title: Page + title: IndicatorSearchRequest + IndicatorSearchResponse: + additionalProperties: {} + example: + total: 0 + indicators: + - root_type: indicator + created: 2000-01-23T04:56:07.000+00:00 + pattern: pattern + description: "" + valid_from: 2000-01-23T04:56:07.000+00:00 + relevant_tags: + - relevant_tags + - relevant_tags + query_type: query_type + type: query + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + diamond: adversary + valid_until: 2000-01-23T04:56:07.000+00:00 + target_systems: + - target_systems + - target_systems + name: name + modified: 2000-01-23T04:56:07.000+00:00 + location: "" + kill_chain_phases: + - kill_chain_phases + - kill_chain_phases + id: id + - root_type: indicator + created: 2000-01-23T04:56:07.000+00:00 + pattern: pattern + description: "" + valid_from: 2000-01-23T04:56:07.000+00:00 + relevant_tags: + - relevant_tags + - relevant_tags + query_type: query_type + type: query + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + diamond: adversary + valid_until: 2000-01-23T04:56:07.000+00:00 + target_systems: + - target_systems + - target_systems + name: name + modified: 2000-01-23T04:56:07.000+00:00 + location: "" + kill_chain_phases: + - kill_chain_phases + - kill_chain_phases + id: id + properties: + indicators: + items: + $ref: '#/components/schemas/Indicators_inner' + title: Indicators + total: + title: Total + required: + - indicators + - total + title: IndicatorSearchResponse + IndicatorTagRequest: + additionalProperties: {} + example: + ids: + - ids + - ids + strict: false + tags: + - tags + - tags + - tags + - tags + - tags + properties: + ids: + items: {} + title: Ids + tags: + default: [] + items: {} + maxItems: 50 + title: Tags + strict: + default: false + title: Strict + required: + - ids + title: IndicatorTagRequest + IndicatorTagResponse: + additionalProperties: {} + example: + tagged: 0 + tags: + key: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + tagged: + title: Tagged + tags: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + title: Tags + required: + - tagged + - tags + title: IndicatorTagResponse + IndicatorType: + enum: + - query + - sigma + - regex + - forensicartifact + - suricata + - yara + title: IndicatorType + type: string + IntrusionSet-Input: + properties: + type: + default: intrusion-set + enum: + - intrusion-set + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + aliases: + default: [] + items: + type: string + type: array + first_seen: + format: date-time + title: First Seen + type: string + last_seen: + format: date-time + title: Last Seen + type: string + required: + - name + title: IntrusionSet + IntrusionSet-Output: + properties: + type: + default: intrusion-set + enum: + - intrusion-set + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + aliases: + default: [] + items: + type: string + type: array + first_seen: + format: date-time + title: First Seen + type: string + last_seen: + format: date-time + title: Last Seen + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: IntrusionSet + Investigation-Input: + example: + reference: "" + created: 2000-01-23T04:56:07.000+00:00 + name: name + context: + - "{}" + - "{}" + description: "" + modified: 2000-01-23T04:56:07.000+00:00 + type: investigation + properties: + type: + default: investigation + enum: + - investigation + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + reference: + default: "" + title: Reference + type: string + required: + - name + title: Investigation + Investigation-Output: + example: + reference: "" + root_type: entity + created: 2000-01-23T04:56:07.000+00:00 + name: name + context: + - "{}" + - "{}" + description: "" + modified: 2000-01-23T04:56:07.000+00:00 + id: id + related_observables_count: 0 + type: investigation + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + type: + default: investigation + enum: + - investigation + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + reference: + default: "" + title: Reference + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Investigation + JA3-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: ja3 + enum: + - ja3 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: JA3 + JA3-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: ja3 + enum: + - ja3 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: JA3 + JARM-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: jarm + enum: + - jarm + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: JARM + JARM-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: jarm + enum: + - jarm + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: JARM + MD5-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: md5 + enum: + - md5 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: MD5 + MD5-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: md5 + enum: + - md5 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: MD5 + MacAddress-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: mac_address + enum: + - mac_address + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: MacAddress + MacAddress-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: mac_address + enum: + - mac_address + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: MacAddress + Malware-Input: + properties: + type: + default: malware + enum: + - malware + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + kill_chain_phases: + default: [] + items: + type: string + type: array + aliases: + default: [] + items: + type: string + type: array + family: + default: "" + title: Family + type: string + required: + - name + title: Malware + Malware-Output: + properties: + type: + default: malware + enum: + - malware + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + kill_chain_phases: + default: [] + items: + type: string + type: array + aliases: + default: [] + items: + type: string + type: array + family: + default: "" + title: Family + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Malware + MergeTagRequest: + additionalProperties: {} + example: + merge_into: merge_into + permanent: false + merge: + - merge + - merge + properties: + merge: + items: {} + title: Merge + merge_into: + title: Merge Into + permanent: + default: false + title: Permanent + required: + - merge + - merge_into + title: MergeTagRequest + MergeTagResult: + additionalProperties: {} + example: + into: + default_expiration: P90D + created: 2000-01-23T04:56:07.000+00:00 + replaces: + - replaces + - replaces + name: name + count: 0 + produces: + - produces + - produces + id: id + merged: 0 + properties: + merged: + title: Merged + into: + $ref: '#/components/schemas/Tag' + required: + - into + - merged + title: MergeTagResult + Mutex-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: mutex + enum: + - mutex + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: Mutex + Mutex-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: mutex + enum: + - mutex + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Mutex + NamedPipe-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: named_pipe + enum: + - named_pipe + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: NamedPipe + NamedPipe-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: named_pipe + enum: + - named_pipe + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: NamedPipe + NewBulkObservableAddRequest: + additionalProperties: {} + example: + observables: + - type: cidr + value: value + tags: + - tags + - tags + - tags + - tags + - tags + - type: cidr + value: value + tags: + - tags + - tags + - tags + - tags + - tags + properties: + observables: + items: + $ref: '#/components/schemas/NewObservableRequest' + title: Observables + required: + - observables + title: NewBulkObservableAddRequest + NewDFIQRequest: + additionalProperties: {} + example: + dfiq_yaml: dfiq_yaml + update_indicators: false + dfiq_type: scenario + properties: + dfiq_yaml: + title: Dfiq Yaml + dfiq_type: + $ref: '#/components/schemas/DFIQType' + update_indicators: + default: false + title: Update Indicators + required: + - dfiq_type + - dfiq_yaml + title: NewDFIQRequest + NewEntityRequest: + additionalProperties: {} + example: + entity: + reference: "" + created: 2000-01-23T04:56:07.000+00:00 + name: name + context: + - "{}" + - "{}" + description: "" + modified: 2000-01-23T04:56:07.000+00:00 + type: investigation + tags: + - tags + - tags + - tags + - tags + - tags + properties: + entity: + $ref: '#/components/schemas/Entity_1' + tags: + default: [] + items: {} + maxItems: 50 + title: Tags + required: + - entity + title: NewEntityRequest + NewExportRequest: + additionalProperties: {} + example: + export: + status_message: "" + fresh_tags: true + sha256: sha256 + description: "" + last_run: 2000-01-23T04:56:07.000+00:00 + type: export + exclude_tags: + - exclude_tags + - exclude_tags + enabled: false + frequency: frequency + ignore_tags: + - ignore_tags + - ignore_tags + template_name: template_name + name: name + acts_on: + - cidr + - cidr + include_tags: + - include_tags + - include_tags + status: idle + properties: + export: + $ref: '#/components/schemas/ExportTask-Input' + required: + - export + title: NewExportRequest + NewExtendedObservableRequest: + additionalProperties: {} + example: + observable: + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + type: cidr + value: value + tags: + - tags + - tags + - tags + - tags + - tags + properties: + tags: + default: [] + items: {} + maxItems: 50 + title: Tags + observable: + $ref: '#/components/schemas/Observable_1' + required: + - observable + title: NewExtendedObservableRequest + NewIndicatorRequest: + additionalProperties: {} + example: + indicator: + created: 2000-01-23T04:56:07.000+00:00 + pattern: pattern + description: "" + valid_from: 2000-01-23T04:56:07.000+00:00 + relevant_tags: + - relevant_tags + - relevant_tags + query_type: query_type + type: query + diamond: adversary + valid_until: 2000-01-23T04:56:07.000+00:00 + target_systems: + - target_systems + - target_systems + name: name + modified: 2000-01-23T04:56:07.000+00:00 + location: "" + kill_chain_phases: + - kill_chain_phases + - kill_chain_phases + properties: + indicator: + $ref: '#/components/schemas/Indicator_1' + required: + - indicator + title: NewIndicatorRequest + NewObservableRequest: + additionalProperties: {} + example: + type: cidr + value: value + tags: + - tags + - tags + - tags + - tags + - tags + properties: + tags: + default: [] + items: {} + maxItems: 50 + title: Tags + value: + title: Value + type: + $ref: '#/components/schemas/ObservableType-Input' + required: + - type + - value + title: NewObservableRequest + NewRequest: + additionalProperties: {} + example: + default_expiration: P90D + replaces: + - replaces + - replaces + name: name + produces: + - produces + - produces + properties: + name: + title: Name + default_expiration: + default: P90D + format: duration + title: Default Expiration + produces: + default: [] + items: {} + title: Produces + replaces: + default: [] + items: {} + title: Replaces + required: + - name + title: NewRequest + NewUserRequest: + additionalProperties: {} + example: + password: password + admin: true + username: username + properties: + username: + title: Username + password: + title: Password + admin: + title: Admin + required: + - admin + - password + - username + title: NewUserRequest + Note-Input: + properties: + type: + default: note + enum: + - note + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + required: + - name + title: Note + Note-Output: + properties: + type: + default: note + enum: + - note + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Note + Observable: + example: + root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + value: + minLength: 1 + title: Value + type: string + type: + title: ObservableType + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - type + - value + title: Observable + ObservableSearchRequest: + additionalProperties: {} + example: + query: + key: Query_value + sorting: + - - "" + - "" + - - "" + - "" + count: 0 + page: 6 + type: cidr + properties: + query: + additionalProperties: + $ref: '#/components/schemas/Query_value' + default: {} + title: Query + type: + $ref: '#/components/schemas/ObservableSearchRequest_type' + sorting: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Sorting + count: + default: 50 + title: Count + page: + default: 0 + title: Page + title: ObservableSearchRequest + ObservableSearchResponse: + additionalProperties: {} + example: + observables: + - root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: cidr + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + - root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: cidr + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + total: 0 + properties: + observables: + items: + $ref: '#/components/schemas/Added_inner' + title: Observables + total: + title: Total + required: + - observables + - total + title: ObservableSearchResponse + ObservableTagRequest: + additionalProperties: {} + example: + ids: + - ids + - ids + strict: false + tags: + - tags + - tags + - tags + - tags + - tags + properties: + tags: + default: [] + items: {} + maxItems: 50 + title: Tags + ids: + items: {} + title: Ids + strict: + default: false + title: Strict + required: + - ids + title: ObservableTagRequest + ObservableTagResponse: + additionalProperties: {} + example: + tagged: 0 + tags: + key: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + tagged: + title: Tagged + tags: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + title: Tags + required: + - tagged + - tags + title: ObservableTagResponse + ObservableType-Input: + enum: + - cidr + - hostname + - mac_address + - certificate + - ipv6 + - user_account + - ssdeep + - bic + - package + - sha256 + - docker_image + - email + - jarm + - file + - mutex + - iban + - command_line + - url + - registry_key + - path + - ipv4 + - tlsh + - generic + - sha1 + - user_agent + - wallet + - md5 + - imphash + - asn + - named_pipe + - ja3 + - guess + title: ObservableType + type: string + ObservableType-Output: + title: ObservableType + type: string + OneShotTask: + properties: + name: + title: Name + type: string + enabled: + default: false + title: Enabled + type: boolean + description: + default: "" + title: Description + type: string + status: + $ref: '#/components/schemas/TaskStatus' + status_message: + default: "" + title: Status Message + type: string + last_run: + format: date-time + nullable: true + type: string + frequency: + format: duration + nullable: true + type: string + type: + default: oneshot + enum: + - oneshot + title: Type + type: string + acts_on: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + required: + - id + - name + title: OneShotTask + Package-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: package + enum: + - package + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + version: + title: Version + type: string + regitry_type: + title: Regitry Type + type: string + required: + - value + title: Package + Package-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: package + enum: + - package + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + version: + title: Version + type: string + regitry_type: + title: Regitry Type + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Package + PatchDFIQRequest: + additionalProperties: {} + example: + dfiq_yaml: dfiq_yaml + update_indicators: false + dfiq_type: scenario + properties: + dfiq_yaml: + title: Dfiq Yaml + dfiq_type: + $ref: '#/components/schemas/DFIQType' + update_indicators: + default: false + title: Update Indicators + required: + - dfiq_type + - dfiq_yaml + title: PatchDFIQRequest + PatchEntityRequest: + additionalProperties: {} + example: + entity: + reference: "" + created: 2000-01-23T04:56:07.000+00:00 + name: name + context: + - "{}" + - "{}" + description: "" + modified: 2000-01-23T04:56:07.000+00:00 + type: investigation + properties: + entity: + $ref: '#/components/schemas/Entity_1' + required: + - entity + title: PatchEntityRequest + PatchExportRequest: + additionalProperties: {} + example: + export: + status_message: "" + fresh_tags: true + sha256: sha256 + description: "" + last_run: 2000-01-23T04:56:07.000+00:00 + type: export + exclude_tags: + - exclude_tags + - exclude_tags + enabled: false + frequency: frequency + ignore_tags: + - ignore_tags + - ignore_tags + template_name: template_name + name: name + acts_on: + - cidr + - cidr + include_tags: + - include_tags + - include_tags + status: idle + properties: + export: + $ref: '#/components/schemas/ExportTask-Input' + required: + - export + title: PatchExportRequest + PatchIndicatorRequest: + additionalProperties: {} + example: + indicator: + created: 2000-01-23T04:56:07.000+00:00 + pattern: pattern + description: "" + valid_from: 2000-01-23T04:56:07.000+00:00 + relevant_tags: + - relevant_tags + - relevant_tags + query_type: query_type + type: query + diamond: adversary + valid_until: 2000-01-23T04:56:07.000+00:00 + target_systems: + - target_systems + - target_systems + name: name + modified: 2000-01-23T04:56:07.000+00:00 + location: "" + kill_chain_phases: + - kill_chain_phases + - kill_chain_phases + properties: + indicator: + $ref: '#/components/schemas/Indicator_1' + required: + - indicator + title: PatchIndicatorRequest + PatchObservableRequest: + additionalProperties: {} + example: + observable: + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + type: cidr + value: value + properties: + observable: + $ref: '#/components/schemas/Observable_1' + required: + - observable + title: PatchObservableRequest + Path-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: path + enum: + - path + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: Path + Path-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: path + enum: + - path + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Path + Phone-Input: + properties: + type: + default: phone + enum: + - phone + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + required: + - name + title: Phone + Phone-Output: + properties: + type: + default: phone + enum: + - phone + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Phone + Query-Input: + description: Represents a query that can be sent to another system. + example: + created: 2000-01-23T04:56:07.000+00:00 + pattern: pattern + description: "" + valid_from: 2000-01-23T04:56:07.000+00:00 + relevant_tags: + - relevant_tags + - relevant_tags + query_type: query_type + type: query + diamond: adversary + valid_until: 2000-01-23T04:56:07.000+00:00 + target_systems: + - target_systems + - target_systems + name: name + modified: 2000-01-23T04:56:07.000+00:00 + location: "" + kill_chain_phases: + - kill_chain_phases + - kill_chain_phases + properties: + name: + title: Name + type: string + type: + default: query + enum: + - query + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + query_type: + title: Query Type + type: string + target_systems: + default: [] + items: + type: string + type: array + required: + - diamond + - name + - pattern + - query_type + title: Query + Query-Output: + description: Represents a query that can be sent to another system. + example: + root_type: indicator + created: 2000-01-23T04:56:07.000+00:00 + pattern: pattern + description: "" + valid_from: 2000-01-23T04:56:07.000+00:00 + relevant_tags: + - relevant_tags + - relevant_tags + query_type: query_type + type: query + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + diamond: adversary + valid_until: 2000-01-23T04:56:07.000+00:00 + target_systems: + - target_systems + - target_systems + name: name + modified: 2000-01-23T04:56:07.000+00:00 + location: "" + kill_chain_phases: + - kill_chain_phases + - kill_chain_phases + id: id + properties: + name: + title: Name + type: string + type: + default: query + enum: + - query + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + query_type: + title: Query Type + type: string + target_systems: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - indicator + readOnly: true + title: Root Type + type: string + required: + - diamond + - id + - name + - pattern + - query_type + - root_type + - tags + title: Query + Regex-Input: + properties: + name: + title: Name + type: string + type: + default: regex + enum: + - regex + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + required: + - diamond + - name + - pattern + title: Regex + Regex-Output: + properties: + name: + title: Name + type: string + type: + default: regex + enum: + - regex + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - indicator + readOnly: true + title: Root Type + type: string + required: + - diamond + - id + - name + - pattern + - root_type + - tags + title: Regex + RegistryHive: + description: Registry Hive enum class. + enum: + - HKEY_CURRENT_CONFIG + - HKEY_CURRENT_USER + - HKEY_LOCAL_MACHINE_SAM + - HKEY_LOCAL_MACHINE_Security + - HKEY_LOCAL_MACHINE_Software + - HKEY_LOCAL_MACHINE_System + - HKEY_USERS_DEFAULT + title: RegistryHive + type: string + RegistryKey-Input: + description: |- + Registry Key observable schema class. + + Attributes: + key: The registry key name. + value: The registry key value. + hive: The registry hive like SYSEM, SOFTWARE, etc. + path_file: The filesystem path to the file that contains the registry key value. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: registry_key + enum: + - registry_key + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + key: + title: Key + type: string + data: + format: binary + title: Data + type: string + hive: + $ref: '#/components/schemas/RegistryHive' + path_file: + nullable: true + type: string + required: + - data + - hive + - key + - value + title: RegistryKey + RegistryKey-Output: + description: |- + Registry Key observable schema class. + + Attributes: + key: The registry key name. + value: The registry key value. + hive: The registry hive like SYSEM, SOFTWARE, etc. + path_file: The filesystem path to the file that contains the registry key value. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: registry_key + enum: + - registry_key + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + key: + title: Key + type: string + data: + format: binary + title: Data + type: string + hive: + $ref: '#/components/schemas/RegistryHive' + path_file: + nullable: true + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - data + - hive + - id + - key + - root_type + - tags + - value + title: RegistryKey + Relationship: + example: + created: 2000-01-23T04:56:07.000+00:00 + count: 0 + description: description + modified: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + type: type + target: target + properties: + source: + title: Source + type: string + target: + title: Target + type: string + type: + title: Type + type: string + count: + default: 1 + title: Count + type: integer + description: + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + id: + readOnly: true + title: Id + type: string + required: + - created + - description + - id + - modified + - source + - target + - type + title: Relationship + RenderTemplateRequest: + additionalProperties: {} + example: + template_name: template_name + observable_ids: + - observable_ids + - observable_ids + search_query: Search_Query + properties: + template_name: + title: Template Name + observable_ids: + default: [] + items: {} + title: Observable Ids + search_query: + $ref: '#/components/schemas/Search_Query' + required: + - template_name + title: RenderTemplateRequest + ResetApiKeyRequest: + additionalProperties: {} + example: + user_id: user_id + properties: + user_id: + title: User Id + required: + - user_id + title: ResetApiKeyRequest + ResetPasswordRequest: + additionalProperties: {} + example: + user_id: user_id + new_password: new_password + properties: + user_id: + title: User Id + new_password: + title: New Password + required: + - new_password + - user_id + title: ResetPasswordRequest + SHA1-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: sha1 + enum: + - sha1 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: SHA1 + SHA1-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: sha1 + enum: + - sha1 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: SHA1 + SHA256-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: sha256 + enum: + - sha256 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: SHA256 + SHA256-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: sha256 + enum: + - sha256 + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: SHA256 + SearchUserRequest: + additionalProperties: {} + example: + count: 0 + page: 6 + username: username + properties: + username: + title: Username + count: + default: 50 + title: Count + page: + default: 0 + title: Page + required: + - username + title: SearchUserRequest + SearchUserResponse: + additionalProperties: {} + example: + total: 0 + users: + - api_key: api_key + admin: false + id: id + enabled: true + username: username + - api_key: api_key + admin: false + id: id + enabled: true + username: username + properties: + users: + items: + $ref: '#/components/schemas/User' + title: Users + total: + title: Total + required: + - total + - users + title: SearchUserResponse + SeverityType: + enum: + - none + - low + - medium + - high + - critical + title: SeverityType + type: string + Sigma-Input: + description: |- + Represents a Sigma rule. + + Parsing and matching is yet TODO. + properties: + name: + title: Name + type: string + type: + default: sigma + enum: + - sigma + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + required: + - diamond + - name + - pattern + title: Sigma + Sigma-Output: + description: |- + Represents a Sigma rule. + + Parsing and matching is yet TODO. + properties: + name: + title: Name + type: string + type: + default: sigma + enum: + - sigma + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - indicator + readOnly: true + title: Root Type + type: string + required: + - diamond + - id + - name + - pattern + - root_type + - tags + title: Sigma + Ssdeep-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: ssdeep + enum: + - ssdeep + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: Ssdeep + Ssdeep-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: ssdeep + enum: + - ssdeep + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Ssdeep + Suricata-Input: + description: |- + Represents a Suricata rule. + + Parsing and matching is yet TODO. + properties: + name: + title: Name + type: string + type: + default: suricata + enum: + - suricata + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + sid: + default: 0 + title: Sid + type: integer + metadata: + default: [] + items: + type: string + type: array + references: + default: [] + items: + type: string + type: array + required: + - diamond + - name + - pattern + title: Suricata + Suricata-Output: + description: |- + Represents a Suricata rule. + + Parsing and matching is yet TODO. + example: + metadata: + - metadata + - metadata + references: + - references + - references + root_type: indicator + created: 2000-01-23T04:56:07.000+00:00 + pattern: pattern + description: "" + valid_from: 2000-01-23T04:56:07.000+00:00 + relevant_tags: + - relevant_tags + - relevant_tags + type: suricata + sid: 0 + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + diamond: adversary + valid_until: 2000-01-23T04:56:07.000+00:00 + name: name + modified: 2000-01-23T04:56:07.000+00:00 + location: "" + kill_chain_phases: + - kill_chain_phases + - kill_chain_phases + id: id + properties: + name: + title: Name + type: string + type: + default: suricata + enum: + - suricata + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + sid: + default: 0 + title: Sid + type: integer + metadata: + default: [] + items: + type: string + type: array + references: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - indicator + readOnly: true + title: Root Type + type: string + required: + - diamond + - id + - name + - pattern + - root_type + - tags + title: Suricata + SystemConfigResponse: + additionalProperties: {} + description: System config template. + example: + system: "{}" + auth: "{}" + properties: + auth: + title: Auth + system: + title: System + required: + - auth + - system + title: SystemConfigResponse + TLSH-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: tlsh + enum: + - tlsh + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: TLSH + TLSH-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: tlsh + enum: + - tlsh + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: TLSH + Tag: + example: + default_expiration: P90D + created: 2000-01-23T04:56:07.000+00:00 + replaces: + - replaces + - replaces + name: name + count: 0 + produces: + - produces + - produces + id: id + properties: + name: + maxLength: 50 + title: Name + type: string + count: + default: 0 + title: Count + type: integer + created: + format: date-time + title: Created + type: string + default_expiration: + default: P90D + format: duration + title: Default Expiration + type: string + produces: + default: [] + items: + type: string + type: array + replaces: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + required: + - id + - name + title: Tag + TagRelationship-Input: + properties: + source: + title: Source + type: string + target: + title: Target + type: string + last_seen: + format: date-time + title: Last Seen + type: string + expires: + format: date-time + nullable: true + type: string + fresh: + title: Fresh + type: boolean + required: + - fresh + - last_seen + - source + - target + title: TagRelationship + TagRelationship-Output: + example: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + source: + title: Source + type: string + target: + title: Target + type: string + last_seen: + format: date-time + title: Last Seen + type: string + expires: + format: date-time + nullable: true + type: string + fresh: + title: Fresh + type: boolean + id: + readOnly: true + title: Id + type: string + required: + - fresh + - id + - last_seen + - source + - target + title: TagRelationship + TagSearchRequest: + additionalProperties: {} + example: + replaces: + - replaces + - replaces + name: Name + produces: + - produces + - produces + count: 0 + page: 6 + properties: + name: + $ref: '#/components/schemas/Name' + produces: + default: [] + items: {} + title: Produces + replaces: + default: [] + items: {} + title: Replaces + count: + title: Count + page: + title: Page + required: + - count + - page + title: TagSearchRequest + TagSearchResponse: + additionalProperties: {} + example: + total: 0 + tags: + - default_expiration: P90D + created: 2000-01-23T04:56:07.000+00:00 + replaces: + - replaces + - replaces + name: name + count: 0 + produces: + - produces + - produces + id: id + - default_expiration: P90D + created: 2000-01-23T04:56:07.000+00:00 + replaces: + - replaces + - replaces + name: name + count: 0 + produces: + - produces + - produces + id: id + properties: + tags: + items: + $ref: '#/components/schemas/Tag' + title: Tags + total: + title: Total + required: + - tags + - total + title: TagSearchResponse + TaskParams: + example: + params: "{}" + properties: + params: + title: Params + type: object + title: TaskParams + TaskSearchRequest: + additionalProperties: {} + example: + query: + key: Query_value + sorting: + - - "" + - "" + - - "" + - "" + count: 0 + page: 6 + type: feed + properties: + query: + additionalProperties: + $ref: '#/components/schemas/Query_value' + default: {} + title: Query + type: + $ref: '#/components/schemas/TaskSearchRequest_type' + sorting: + default: [] + items: + items: {} + maxItems: 2 + minItems: 2 + title: Sorting + count: + default: 100 + title: Count + page: + default: 0 + title: Page + title: TaskSearchRequest + TaskSearchResponse: + additionalProperties: {} + example: + total: 0 + tasks: + - status_message: "" + name: name + description: "" + last_run: 2000-01-23T04:56:07.000+00:00 + id: id + type: feed + enabled: false + status: idle + frequency: frequency + - status_message: "" + name: name + description: "" + last_run: 2000-01-23T04:56:07.000+00:00 + id: id + type: feed + enabled: false + status: idle + frequency: frequency + properties: + tasks: + items: + $ref: '#/components/schemas/Tasks_inner' + title: Tasks + total: + title: Total + required: + - tasks + - total + title: TaskSearchResponse + TaskStatus: + enum: + - idle + - running + - completed + - failed + title: TaskStatus + type: string + TaskType: + enum: + - feed + - analytics + - export + - oneshot + - inline + title: TaskType + type: string + Template: + description: A template for exporting data to an external system. + example: + template: template + name: name + properties: + name: + title: Name + type: string + template: + title: Template + type: string + required: + - name + - template + title: Template + TemplateSearchRequest: + additionalProperties: {} + example: + name: "" + count: 0 + page: 6 + properties: + name: + default: "" + title: Name + count: + default: 50 + title: Count + page: + default: 0 + title: Page + title: TemplateSearchRequest + TemplateSearchResponse: + additionalProperties: {} + example: + total: 0 + templates: + - template: template + name: name + - template: template + name: name + properties: + templates: + items: + $ref: '#/components/schemas/Template' + title: Templates + total: + title: Total + required: + - templates + - total + title: TemplateSearchResponse + ThreatActor-Input: + properties: + type: + default: threat-actor + enum: + - threat-actor + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + threat_actor_types: + default: [] + items: + type: string + type: array + aliases: + default: [] + items: + type: string + type: array + first_seen: + format: date-time + title: First Seen + type: string + last_seen: + format: date-time + title: Last Seen + type: string + required: + - name + title: ThreatActor + ThreatActor-Output: + properties: + type: + default: threat-actor + enum: + - threat-actor + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + threat_actor_types: + default: [] + items: + type: string + type: array + aliases: + default: [] + items: + type: string + type: array + first_seen: + format: date-time + title: First Seen + type: string + last_seen: + format: date-time + title: Last Seen + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: ThreatActor + ToggleUserRequest: + additionalProperties: {} + example: + field: enabled + user_id: user_id + properties: + user_id: + title: User Id + field: + $ref: '#/components/schemas/ToggleableField' + required: + - field + - user_id + title: ToggleUserRequest + ToggleableField: + enum: + - enabled + - admin + title: ToggleableField + type: string + Tool-Input: + properties: + type: + default: tool + enum: + - tool + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + aliases: + default: [] + items: + type: string + type: array + kill_chain_phases: + default: [] + items: + type: string + type: array + tool_version: + default: "" + title: Tool Version + type: string + required: + - name + title: Tool + Tool-Output: + example: + aliases: + - aliases + - aliases + root_type: entity + created: 2000-01-23T04:56:07.000+00:00 + description: "" + related_observables_count: 0 + type: tool + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + tool_version: "" + name: name + context: + - "{}" + - "{}" + modified: 2000-01-23T04:56:07.000+00:00 + kill_chain_phases: + - kill_chain_phases + - kill_chain_phases + id: id + properties: + type: + default: tool + enum: + - tool + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + aliases: + default: [] + items: + type: string + type: array + kill_chain_phases: + default: [] + items: + type: string + type: array + tool_version: + default: "" + title: Tool Version + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Tool + UpdateRequest: + additionalProperties: {} + example: + default_expiration: P90D + replaces: + - replaces + - replaces + name: name + produces: + - produces + - produces + properties: + name: + title: Name + default_expiration: + default: P90D + format: duration + title: Default Expiration + produces: + default: [] + items: {} + title: Produces + replaces: + default: [] + items: {} + title: Replaces + required: + - name + title: UpdateRequest + Url-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: url + enum: + - url + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: Url + Url-Output: + example: + root_type: observable + created: 2000-01-23T04:56:07.000+00:00 + context: + - "{}" + - "{}" + last_analysis: + key: 2000-01-23T04:56:07.000+00:00 + id: id + type: url + value: value + tags: + key: + expires: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + source: source + id: id + fresh: true + target: target + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: url + enum: + - url + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Url + User: + example: + api_key: api_key + admin: false + id: id + enabled: true + username: username + properties: + username: + title: Username + type: string + enabled: + default: true + title: Enabled + type: boolean + admin: + default: false + title: Admin + type: boolean + api_key: + title: Api Key + type: string + id: + readOnly: true + title: Id + type: string + required: + - id + - username + title: User + UserAccount-Input: + description: |- + Represents a user account observable based on the Oasis schema. + https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_azo70vgj1vm2 + + account_login and account_type must be provided. + Value should to be in the form :. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: user_account + enum: + - user_account + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + user_id: + nullable: true + type: string + credential: + nullable: true + type: string + account_login: + nullable: true + type: string + account_type: + nullable: true + type: string + display_name: + nullable: true + type: string + is_service_account: + nullable: true + type: boolean + is_privileged: + nullable: true + type: boolean + can_escalate_privs: + nullable: true + type: boolean + is_disabled: + nullable: true + type: boolean + account_created: + format: date-time + nullable: true + type: string + account_expires: + format: date-time + nullable: true + type: string + credential_last_changed: + format: date-time + nullable: true + type: string + account_first_login: + format: date-time + nullable: true + type: string + account_last_login: + format: date-time + nullable: true + type: string + required: + - value + title: UserAccount + UserAccount-Output: + description: |- + Represents a user account observable based on the Oasis schema. + https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_azo70vgj1vm2 + + account_login and account_type must be provided. + Value should to be in the form :. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: user_account + enum: + - user_account + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + user_id: + nullable: true + type: string + credential: + nullable: true + type: string + account_login: + nullable: true + type: string + account_type: + nullable: true + type: string + display_name: + nullable: true + type: string + is_service_account: + nullable: true + type: boolean + is_privileged: + nullable: true + type: boolean + can_escalate_privs: + nullable: true + type: boolean + is_disabled: + nullable: true + type: boolean + account_created: + format: date-time + nullable: true + type: string + account_expires: + format: date-time + nullable: true + type: string + credential_last_changed: + format: date-time + nullable: true + type: string + account_first_login: + format: date-time + nullable: true + type: string + account_last_login: + format: date-time + nullable: true + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: UserAccount + UserAgent-Input: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: user_agent + enum: + - user_agent + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + required: + - value + title: UserAgent + UserAgent-Output: + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: user_agent + enum: + - user_agent + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: UserAgent + ValidationError: + example: + msg: msg + loc: + - ValidationError_loc_inner + - ValidationError_loc_inner + type: type + properties: + loc: + items: + $ref: '#/components/schemas/ValidationError_loc_inner' + type: array + msg: + title: Message + type: string + type: + title: Error Type + type: string + required: + - loc + - msg + - type + title: ValidationError + Vulnerability-Input: + description: |- + This class represents a vulnerability in the schema. + + Attributes: + title: title of the vulnerability. + base_score : base score of the vulnerability obtained from CVSS metric + ranging from 0.0 to 10.0. + severity: represents the severity of a vulnerability. One of none, low, + medium, high, critical. + properties: + type: + default: vulnerability + enum: + - vulnerability + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + title: + default: "" + title: Title + type: string + base_score: + default: 0.0 + maximum: 10.0 + minimum: 0.0 + title: Base Score + type: number + severity: + $ref: '#/components/schemas/SeverityType' + reference: + default: "" + title: Reference + type: string + required: + - name + title: Vulnerability + Vulnerability-Output: + description: |- + This class represents a vulnerability in the schema. + + Attributes: + title: title of the vulnerability. + base_score : base score of the vulnerability obtained from CVSS metric + ranging from 0.0 to 10.0. + severity: represents the severity of a vulnerability. One of none, low, + medium, high, critical. + properties: + type: + default: vulnerability + enum: + - vulnerability + title: Type + type: string + name: + minLength: 1 + title: Name + type: string + description: + default: "" + title: Description + type: string + context: + default: [] + items: + type: object + type: array + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + title: + default: "" + title: Title + type: string + base_score: + default: 0.0 + maximum: 10.0 + minimum: 0.0 + title: Base Score + type: number + severity: + $ref: '#/components/schemas/SeverityType' + reference: + default: "" + title: Reference + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - entity + readOnly: true + title: Root Type + type: string + related_observables_count: + readOnly: true + title: Related Observables Count + type: integer + required: + - id + - name + - related_observables_count + - root_type + - tags + title: Vulnerability + Wallet-Input: + description: |- + Represents a wallet observable. + + coin and address must be provided. + Value should be in the form :
. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: wallet + enum: + - wallet + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + coin: + nullable: true + type: string + address: + nullable: true + type: string + required: + - value + title: Wallet + Wallet-Output: + description: |- + Represents a wallet observable. + + coin and address must be provided. + Value should be in the form :
. + properties: + value: + minLength: 1 + title: Value + type: string + type: + default: wallet + enum: + - wallet + title: Type + type: string + created: + format: date-time + title: Created + type: string + context: + default: [] + items: + type: object + type: array + last_analysis: + additionalProperties: + format: date-time + type: string + default: {} + title: Last Analysis + coin: + nullable: true + type: string + address: + nullable: true + type: string + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - observable + readOnly: true + title: Root Type + type: string + required: + - id + - root_type + - tags + - value + title: Wallet + WorkerRestartResponse: + description: Worker restart API response. + example: + failures: + - failures + - failures + successes: + - successes + - successes + properties: + successes: + items: + type: string + type: array + uniqueItems: true + failures: + items: + type: string + type: array + uniqueItems: true + required: + - failures + - successes + title: WorkerRestartResponse + WorkerStatusResponse: + description: Worker status API response. + example: + registered: + key: + - registered + - registered + active: + - - "" + - "" + - - "" + - "" + properties: + registered: + additionalProperties: + items: + type: string + title: Registered + active: + items: + items: {} + maxItems: 2 + minItems: 2 + type: array + type: array + required: + - active + - registered + title: WorkerStatusResponse + Yara-Input: + description: |- + Represents a Yara rule. + + Parsing and matching is yet TODO. + properties: + name: + title: Name + type: string + type: + default: yara + enum: + - yara + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + required: + - diamond + - name + - pattern + title: Yara + Yara-Output: + description: |- + Represents a Yara rule. + + Parsing and matching is yet TODO. + properties: + name: + title: Name + type: string + type: + default: yara + enum: + - yara + title: Type + type: string + description: + default: "" + title: Description + type: string + created: + format: date-time + title: Created + type: string + modified: + format: date-time + title: Modified + type: string + valid_from: + format: date-time + title: Valid From + type: string + valid_until: + format: date-time + title: Valid Until + type: string + pattern: + minLength: 1 + title: Pattern + type: string + location: + default: "" + title: Location + type: string + diamond: + $ref: '#/components/schemas/DiamondModel' + kill_chain_phases: + default: [] + items: + type: string + type: array + relevant_tags: + default: [] + items: + type: string + type: array + id: + readOnly: true + title: Id + type: string + tags: + additionalProperties: + $ref: '#/components/schemas/TagRelationship-Output' + readOnly: true + title: Tags + root_type: + enum: + - indicator + readOnly: true + title: Root Type + type: string + required: + - diamond + - id + - name + - pattern + - root_type + - tags + title: Yara + Response_New_Api_V2_Observables__Post: + anyOf: + - $ref: '#/components/schemas/Url-Output' + - $ref: '#/components/schemas/Imphash-Output' + - $ref: '#/components/schemas/Certificate-Output' + - $ref: '#/components/schemas/RegistryKey-Output' + - $ref: '#/components/schemas/Ssdeep-Output' + - $ref: '#/components/schemas/NamedPipe-Output' + - $ref: '#/components/schemas/Email-Output' + - $ref: '#/components/schemas/Mutex-Output' + - $ref: '#/components/schemas/DockerImage-Output' + - $ref: '#/components/schemas/UserAgent-Output' + - $ref: '#/components/schemas/SHA256-Output' + - $ref: '#/components/schemas/Path-Output' + - $ref: '#/components/schemas/ASN-Output' + - $ref: '#/components/schemas/TLSH-Output' + - $ref: '#/components/schemas/MD5-Output' + - $ref: '#/components/schemas/BIC-Output' + - $ref: '#/components/schemas/IPv6-Output' + - $ref: '#/components/schemas/CIDR-Output' + - $ref: '#/components/schemas/Generic-Output' + - $ref: '#/components/schemas/Hostname-Output' + - $ref: '#/components/schemas/Package-Output' + - $ref: '#/components/schemas/CommandLine-Output' + - $ref: '#/components/schemas/File-Output' + - $ref: '#/components/schemas/MacAddress-Output' + - $ref: '#/components/schemas/JARM-Output' + - $ref: '#/components/schemas/UserAccount-Output' + - $ref: '#/components/schemas/IPv4-Output' + - $ref: '#/components/schemas/JA3-Output' + - $ref: '#/components/schemas/SHA1-Output' + - $ref: '#/components/schemas/IBAN-Output' + - $ref: '#/components/schemas/Wallet-Output' + title: Response New Api V2 Observables Post + Response_New_Extended_Api_V2_Observables_Extended_Post: + anyOf: + - $ref: '#/components/schemas/Url-Output' + - $ref: '#/components/schemas/Imphash-Output' + - $ref: '#/components/schemas/Certificate-Output' + - $ref: '#/components/schemas/RegistryKey-Output' + - $ref: '#/components/schemas/Ssdeep-Output' + - $ref: '#/components/schemas/NamedPipe-Output' + - $ref: '#/components/schemas/Email-Output' + - $ref: '#/components/schemas/Mutex-Output' + - $ref: '#/components/schemas/DockerImage-Output' + - $ref: '#/components/schemas/UserAgent-Output' + - $ref: '#/components/schemas/SHA256-Output' + - $ref: '#/components/schemas/Path-Output' + - $ref: '#/components/schemas/ASN-Output' + - $ref: '#/components/schemas/TLSH-Output' + - $ref: '#/components/schemas/MD5-Output' + - $ref: '#/components/schemas/BIC-Output' + - $ref: '#/components/schemas/IPv6-Output' + - $ref: '#/components/schemas/CIDR-Output' + - $ref: '#/components/schemas/Generic-Output' + - $ref: '#/components/schemas/Hostname-Output' + - $ref: '#/components/schemas/Package-Output' + - $ref: '#/components/schemas/CommandLine-Output' + - $ref: '#/components/schemas/File-Output' + - $ref: '#/components/schemas/MacAddress-Output' + - $ref: '#/components/schemas/JARM-Output' + - $ref: '#/components/schemas/UserAccount-Output' + - $ref: '#/components/schemas/IPv4-Output' + - $ref: '#/components/schemas/JA3-Output' + - $ref: '#/components/schemas/SHA1-Output' + - $ref: '#/components/schemas/IBAN-Output' + - $ref: '#/components/schemas/Wallet-Output' + title: Response New Extended Api V2 Observables Extended Post + Response_Details_Api_V2_Observables__Observable_Id__Get: + anyOf: + - $ref: '#/components/schemas/Url-Output' + - $ref: '#/components/schemas/Imphash-Output' + - $ref: '#/components/schemas/Certificate-Output' + - $ref: '#/components/schemas/RegistryKey-Output' + - $ref: '#/components/schemas/Ssdeep-Output' + - $ref: '#/components/schemas/NamedPipe-Output' + - $ref: '#/components/schemas/Email-Output' + - $ref: '#/components/schemas/Mutex-Output' + - $ref: '#/components/schemas/DockerImage-Output' + - $ref: '#/components/schemas/UserAgent-Output' + - $ref: '#/components/schemas/SHA256-Output' + - $ref: '#/components/schemas/Path-Output' + - $ref: '#/components/schemas/ASN-Output' + - $ref: '#/components/schemas/TLSH-Output' + - $ref: '#/components/schemas/MD5-Output' + - $ref: '#/components/schemas/BIC-Output' + - $ref: '#/components/schemas/IPv6-Output' + - $ref: '#/components/schemas/CIDR-Output' + - $ref: '#/components/schemas/Generic-Output' + - $ref: '#/components/schemas/Hostname-Output' + - $ref: '#/components/schemas/Package-Output' + - $ref: '#/components/schemas/CommandLine-Output' + - $ref: '#/components/schemas/File-Output' + - $ref: '#/components/schemas/MacAddress-Output' + - $ref: '#/components/schemas/JARM-Output' + - $ref: '#/components/schemas/UserAccount-Output' + - $ref: '#/components/schemas/IPv4-Output' + - $ref: '#/components/schemas/JA3-Output' + - $ref: '#/components/schemas/SHA1-Output' + - $ref: '#/components/schemas/IBAN-Output' + - $ref: '#/components/schemas/Wallet-Output' + title: Response Details Api V2 Observables Observable Id Get + Response_Patch_Api_V2_Observables__Observable_Id__Patch: + anyOf: + - $ref: '#/components/schemas/Url-Output' + - $ref: '#/components/schemas/Imphash-Output' + - $ref: '#/components/schemas/Certificate-Output' + - $ref: '#/components/schemas/RegistryKey-Output' + - $ref: '#/components/schemas/Ssdeep-Output' + - $ref: '#/components/schemas/NamedPipe-Output' + - $ref: '#/components/schemas/Email-Output' + - $ref: '#/components/schemas/Mutex-Output' + - $ref: '#/components/schemas/DockerImage-Output' + - $ref: '#/components/schemas/UserAgent-Output' + - $ref: '#/components/schemas/SHA256-Output' + - $ref: '#/components/schemas/Path-Output' + - $ref: '#/components/schemas/ASN-Output' + - $ref: '#/components/schemas/TLSH-Output' + - $ref: '#/components/schemas/MD5-Output' + - $ref: '#/components/schemas/BIC-Output' + - $ref: '#/components/schemas/IPv6-Output' + - $ref: '#/components/schemas/CIDR-Output' + - $ref: '#/components/schemas/Generic-Output' + - $ref: '#/components/schemas/Hostname-Output' + - $ref: '#/components/schemas/Package-Output' + - $ref: '#/components/schemas/CommandLine-Output' + - $ref: '#/components/schemas/File-Output' + - $ref: '#/components/schemas/MacAddress-Output' + - $ref: '#/components/schemas/JARM-Output' + - $ref: '#/components/schemas/UserAccount-Output' + - $ref: '#/components/schemas/IPv4-Output' + - $ref: '#/components/schemas/JA3-Output' + - $ref: '#/components/schemas/SHA1-Output' + - $ref: '#/components/schemas/IBAN-Output' + - $ref: '#/components/schemas/Wallet-Output' + title: Response Patch Api V2 Observables Observable Id Patch + Response_Add_Context_Api_V2_Observables__Observable_Id__Context_Post: + anyOf: + - $ref: '#/components/schemas/Url-Output' + - $ref: '#/components/schemas/Imphash-Output' + - $ref: '#/components/schemas/Certificate-Output' + - $ref: '#/components/schemas/RegistryKey-Output' + - $ref: '#/components/schemas/Ssdeep-Output' + - $ref: '#/components/schemas/NamedPipe-Output' + - $ref: '#/components/schemas/Email-Output' + - $ref: '#/components/schemas/Mutex-Output' + - $ref: '#/components/schemas/DockerImage-Output' + - $ref: '#/components/schemas/UserAgent-Output' + - $ref: '#/components/schemas/SHA256-Output' + - $ref: '#/components/schemas/Path-Output' + - $ref: '#/components/schemas/ASN-Output' + - $ref: '#/components/schemas/TLSH-Output' + - $ref: '#/components/schemas/MD5-Output' + - $ref: '#/components/schemas/BIC-Output' + - $ref: '#/components/schemas/IPv6-Output' + - $ref: '#/components/schemas/CIDR-Output' + - $ref: '#/components/schemas/Generic-Output' + - $ref: '#/components/schemas/Hostname-Output' + - $ref: '#/components/schemas/Package-Output' + - $ref: '#/components/schemas/CommandLine-Output' + - $ref: '#/components/schemas/File-Output' + - $ref: '#/components/schemas/MacAddress-Output' + - $ref: '#/components/schemas/JARM-Output' + - $ref: '#/components/schemas/UserAccount-Output' + - $ref: '#/components/schemas/IPv4-Output' + - $ref: '#/components/schemas/JA3-Output' + - $ref: '#/components/schemas/SHA1-Output' + - $ref: '#/components/schemas/IBAN-Output' + - $ref: '#/components/schemas/Wallet-Output' + title: Response Add Context Api V2 Observables Observable Id Context Post + Response_Delete_Context_Api_V2_Observables__Observable_Id__Context_Delete_Post: + anyOf: + - $ref: '#/components/schemas/Url-Output' + - $ref: '#/components/schemas/Imphash-Output' + - $ref: '#/components/schemas/Certificate-Output' + - $ref: '#/components/schemas/RegistryKey-Output' + - $ref: '#/components/schemas/Ssdeep-Output' + - $ref: '#/components/schemas/NamedPipe-Output' + - $ref: '#/components/schemas/Email-Output' + - $ref: '#/components/schemas/Mutex-Output' + - $ref: '#/components/schemas/DockerImage-Output' + - $ref: '#/components/schemas/UserAgent-Output' + - $ref: '#/components/schemas/SHA256-Output' + - $ref: '#/components/schemas/Path-Output' + - $ref: '#/components/schemas/ASN-Output' + - $ref: '#/components/schemas/TLSH-Output' + - $ref: '#/components/schemas/MD5-Output' + - $ref: '#/components/schemas/BIC-Output' + - $ref: '#/components/schemas/IPv6-Output' + - $ref: '#/components/schemas/CIDR-Output' + - $ref: '#/components/schemas/Generic-Output' + - $ref: '#/components/schemas/Hostname-Output' + - $ref: '#/components/schemas/Package-Output' + - $ref: '#/components/schemas/CommandLine-Output' + - $ref: '#/components/schemas/File-Output' + - $ref: '#/components/schemas/MacAddress-Output' + - $ref: '#/components/schemas/JARM-Output' + - $ref: '#/components/schemas/UserAccount-Output' + - $ref: '#/components/schemas/IPv4-Output' + - $ref: '#/components/schemas/JA3-Output' + - $ref: '#/components/schemas/SHA1-Output' + - $ref: '#/components/schemas/IBAN-Output' + - $ref: '#/components/schemas/Wallet-Output' + title: Response Delete Context Api V2 Observables Observable Id Context Delete + Post + Response_Add_Text_Api_V2_Observables_Add_Text_Post: + anyOf: + - $ref: '#/components/schemas/Url-Output' + - $ref: '#/components/schemas/Imphash-Output' + - $ref: '#/components/schemas/Certificate-Output' + - $ref: '#/components/schemas/RegistryKey-Output' + - $ref: '#/components/schemas/Ssdeep-Output' + - $ref: '#/components/schemas/NamedPipe-Output' + - $ref: '#/components/schemas/Email-Output' + - $ref: '#/components/schemas/Mutex-Output' + - $ref: '#/components/schemas/DockerImage-Output' + - $ref: '#/components/schemas/UserAgent-Output' + - $ref: '#/components/schemas/SHA256-Output' + - $ref: '#/components/schemas/Path-Output' + - $ref: '#/components/schemas/ASN-Output' + - $ref: '#/components/schemas/TLSH-Output' + - $ref: '#/components/schemas/MD5-Output' + - $ref: '#/components/schemas/BIC-Output' + - $ref: '#/components/schemas/IPv6-Output' + - $ref: '#/components/schemas/CIDR-Output' + - $ref: '#/components/schemas/Generic-Output' + - $ref: '#/components/schemas/Hostname-Output' + - $ref: '#/components/schemas/Package-Output' + - $ref: '#/components/schemas/CommandLine-Output' + - $ref: '#/components/schemas/File-Output' + - $ref: '#/components/schemas/MacAddress-Output' + - $ref: '#/components/schemas/JARM-Output' + - $ref: '#/components/schemas/UserAccount-Output' + - $ref: '#/components/schemas/IPv4-Output' + - $ref: '#/components/schemas/JA3-Output' + - $ref: '#/components/schemas/SHA1-Output' + - $ref: '#/components/schemas/IBAN-Output' + - $ref: '#/components/schemas/Wallet-Output' + title: Response Add Text Api V2 Observables Add Text Post + Response_New_Api_V2_Entities__Post: + anyOf: + - $ref: '#/components/schemas/Tool-Output' + - $ref: '#/components/schemas/Vulnerability-Output' + - $ref: '#/components/schemas/Malware-Output' + - $ref: '#/components/schemas/IntrusionSet-Output' + - $ref: '#/components/schemas/Investigation-Output' + - $ref: '#/components/schemas/ThreatActor-Output' + - $ref: '#/components/schemas/Identity-Output' + - $ref: '#/components/schemas/AttackPattern-Output' + - $ref: '#/components/schemas/Company-Output' + - $ref: '#/components/schemas/Phone-Output' + - $ref: '#/components/schemas/Campaign-Output' + - $ref: '#/components/schemas/CourseOfAction-Output' + - $ref: '#/components/schemas/Note-Output' + title: Response New Api V2 Entities Post + Response_Details_Api_V2_Entities__Entity_Id__Get: + anyOf: + - $ref: '#/components/schemas/Tool-Output' + - $ref: '#/components/schemas/Vulnerability-Output' + - $ref: '#/components/schemas/Malware-Output' + - $ref: '#/components/schemas/IntrusionSet-Output' + - $ref: '#/components/schemas/Investigation-Output' + - $ref: '#/components/schemas/ThreatActor-Output' + - $ref: '#/components/schemas/Identity-Output' + - $ref: '#/components/schemas/AttackPattern-Output' + - $ref: '#/components/schemas/Company-Output' + - $ref: '#/components/schemas/Phone-Output' + - $ref: '#/components/schemas/Campaign-Output' + - $ref: '#/components/schemas/CourseOfAction-Output' + - $ref: '#/components/schemas/Note-Output' + title: Response Details Api V2 Entities Entity Id Get + Response_Patch_Api_V2_Entities__Entity_Id__Patch: + anyOf: + - $ref: '#/components/schemas/Tool-Output' + - $ref: '#/components/schemas/Vulnerability-Output' + - $ref: '#/components/schemas/Malware-Output' + - $ref: '#/components/schemas/IntrusionSet-Output' + - $ref: '#/components/schemas/Investigation-Output' + - $ref: '#/components/schemas/ThreatActor-Output' + - $ref: '#/components/schemas/Identity-Output' + - $ref: '#/components/schemas/AttackPattern-Output' + - $ref: '#/components/schemas/Company-Output' + - $ref: '#/components/schemas/Phone-Output' + - $ref: '#/components/schemas/Campaign-Output' + - $ref: '#/components/schemas/CourseOfAction-Output' + - $ref: '#/components/schemas/Note-Output' + title: Response Patch Api V2 Entities Entity Id Patch + Response_New_Api_V2_Indicators__Post: + anyOf: + - $ref: '#/components/schemas/Suricata-Output' + - $ref: '#/components/schemas/Yara-Output' + - $ref: '#/components/schemas/ForensicArtifact-Output' + - $ref: '#/components/schemas/Regex-Output' + - $ref: '#/components/schemas/Query-Output' + - $ref: '#/components/schemas/Sigma-Output' + title: Response New Api V2 Indicators Post + Response_Details_Api_V2_Indicators__Indicator_Id__Get: + anyOf: + - $ref: '#/components/schemas/Suricata-Output' + - $ref: '#/components/schemas/Yara-Output' + - $ref: '#/components/schemas/ForensicArtifact-Output' + - $ref: '#/components/schemas/Regex-Output' + - $ref: '#/components/schemas/Query-Output' + - $ref: '#/components/schemas/Sigma-Output' + title: Response Details Api V2 Indicators Indicator Id Get + Response_Patch_Api_V2_Indicators__Indicator_Id__Patch: + anyOf: + - $ref: '#/components/schemas/Suricata-Output' + - $ref: '#/components/schemas/Yara-Output' + - $ref: '#/components/schemas/ForensicArtifact-Output' + - $ref: '#/components/schemas/Regex-Output' + - $ref: '#/components/schemas/Query-Output' + - $ref: '#/components/schemas/Sigma-Output' + title: Response Patch Api V2 Indicators Indicator Id Patch + Response_New_From_Yaml_Api_V2_Dfiq_From_Yaml_Post: + discriminator: + mapping: + scenario: '#/components/schemas/DFIQScenario' + facet: '#/components/schemas/DFIQFacet' + question: '#/components/schemas/DFIQQuestion' + propertyName: type + oneOf: + - $ref: '#/components/schemas/DFIQScenario' + - $ref: '#/components/schemas/DFIQFacet' + - $ref: '#/components/schemas/DFIQQuestion' + title: Response New From Yaml Api V2 Dfiq From Yaml Post + Response_Details_Api_V2_Dfiq__Dfiq_Id__Get: + discriminator: + mapping: + scenario: '#/components/schemas/DFIQScenario' + facet: '#/components/schemas/DFIQFacet' + question: '#/components/schemas/DFIQQuestion' + propertyName: type + oneOf: + - $ref: '#/components/schemas/DFIQScenario' + - $ref: '#/components/schemas/DFIQFacet' + - $ref: '#/components/schemas/DFIQQuestion' + title: Response Details Api V2 Dfiq Dfiq Id Get + Response_Patch_Api_V2_Dfiq__Dfiq_Id__Patch: + discriminator: + mapping: + scenario: '#/components/schemas/DFIQScenario' + facet: '#/components/schemas/DFIQFacet' + question: '#/components/schemas/DFIQQuestion' + propertyName: type + oneOf: + - $ref: '#/components/schemas/DFIQScenario' + - $ref: '#/components/schemas/DFIQFacet' + - $ref: '#/components/schemas/DFIQQuestion' + title: Response Patch Api V2 Dfiq Dfiq Id Patch + Response_Toggle_Api_V2_Tasks__Task_Name__Toggle_Post: + anyOf: + - $ref: '#/components/schemas/FeedTask' + - $ref: '#/components/schemas/AnalyticsTask' + - $ref: '#/components/schemas/OneShotTask' + - $ref: '#/components/schemas/ExportTask-Output' + title: Response Toggle Api V2 Tasks Task Name Toggle Post + Added_inner: + anyOf: + - $ref: '#/components/schemas/CIDR-Output' + - $ref: '#/components/schemas/Hostname-Output' + - $ref: '#/components/schemas/MacAddress-Output' + - $ref: '#/components/schemas/Certificate-Output' + - $ref: '#/components/schemas/IPv6-Output' + - $ref: '#/components/schemas/UserAccount-Output' + - $ref: '#/components/schemas/Ssdeep-Output' + - $ref: '#/components/schemas/BIC-Output' + - $ref: '#/components/schemas/Package-Output' + - $ref: '#/components/schemas/SHA256-Output' + - $ref: '#/components/schemas/DockerImage-Output' + - $ref: '#/components/schemas/Email-Output' + - $ref: '#/components/schemas/JARM-Output' + - $ref: '#/components/schemas/File-Output' + - $ref: '#/components/schemas/Mutex-Output' + - $ref: '#/components/schemas/IBAN-Output' + - $ref: '#/components/schemas/CommandLine-Output' + - $ref: '#/components/schemas/Url-Output' + - $ref: '#/components/schemas/RegistryKey-Output' + - $ref: '#/components/schemas/Path-Output' + - $ref: '#/components/schemas/IPv4-Output' + - $ref: '#/components/schemas/TLSH-Output' + - $ref: '#/components/schemas/Generic-Output' + - $ref: '#/components/schemas/SHA1-Output' + - $ref: '#/components/schemas/UserAgent-Output' + - $ref: '#/components/schemas/Wallet-Output' + - $ref: '#/components/schemas/MD5-Output' + - $ref: '#/components/schemas/Imphash-Output' + - $ref: '#/components/schemas/ASN-Output' + - $ref: '#/components/schemas/NamedPipe-Output' + - $ref: '#/components/schemas/JA3-Output' + Query_value: + anyOf: + - {} + - {} + - items: {} + DFIQSearchRequest_type: + anyOf: + - $ref: '#/components/schemas/DFIQType' + - {} + Dfiq_inner: + discriminator: + mapping: + facet: '#/components/schemas/DFIQFacet' + question: '#/components/schemas/DFIQQuestion' + scenario: '#/components/schemas/DFIQScenario' + propertyName: type + oneOf: + - $ref: '#/components/schemas/DFIQScenario' + - $ref: '#/components/schemas/DFIQFacet' + - $ref: '#/components/schemas/DFIQQuestion' + Error: + anyOf: + - {} + - items: {} + default: "" + title: Error + EntitySearchRequest_type: + anyOf: + - $ref: '#/components/schemas/EntityType' + - {} + Entities_inner: + anyOf: + - $ref: '#/components/schemas/Investigation-Output' + - $ref: '#/components/schemas/CourseOfAction-Output' + - $ref: '#/components/schemas/Identity-Output' + - $ref: '#/components/schemas/IntrusionSet-Output' + - $ref: '#/components/schemas/Tool-Output' + - $ref: '#/components/schemas/ThreatActor-Output' + - $ref: '#/components/schemas/Campaign-Output' + - $ref: '#/components/schemas/Company-Output' + - $ref: '#/components/schemas/Malware-Output' + - $ref: '#/components/schemas/Phone-Output' + - $ref: '#/components/schemas/Note-Output' + - $ref: '#/components/schemas/AttackPattern-Output' + - $ref: '#/components/schemas/Vulnerability-Output' + Hops: + anyOf: + - {} + - {} + title: Hops + Min_Hops: + anyOf: + - {} + - {} + title: Min Hops + Max_Hops: + anyOf: + - {} + - {} + title: Max Hops + Vertices_value: + anyOf: + - $ref: '#/components/schemas/Observable' + - $ref: '#/components/schemas/Investigation-Output' + - $ref: '#/components/schemas/CourseOfAction-Output' + - $ref: '#/components/schemas/Identity-Output' + - $ref: '#/components/schemas/IntrusionSet-Output' + - $ref: '#/components/schemas/Tool-Output' + - $ref: '#/components/schemas/ThreatActor-Output' + - $ref: '#/components/schemas/Campaign-Output' + - $ref: '#/components/schemas/Company-Output' + - $ref: '#/components/schemas/Malware-Output' + - $ref: '#/components/schemas/Phone-Output' + - $ref: '#/components/schemas/Note-Output' + - $ref: '#/components/schemas/AttackPattern-Output' + - $ref: '#/components/schemas/Vulnerability-Output' + - $ref: '#/components/schemas/Query-Output' + - $ref: '#/components/schemas/Sigma-Output' + - $ref: '#/components/schemas/Regex-Output' + - $ref: '#/components/schemas/ForensicArtifact-Output' + - $ref: '#/components/schemas/Suricata-Output' + - $ref: '#/components/schemas/Yara-Output' + - $ref: '#/components/schemas/Tag' + - $ref: '#/components/schemas/Dfiq_inner' + Paths_inner_inner: + anyOf: + - $ref: '#/components/schemas/Relationship' + - $ref: '#/components/schemas/TagRelationship-Output' + IndicatorSearchRequest_type: + anyOf: + - $ref: '#/components/schemas/IndicatorType' + - {} + Indicators_inner: + anyOf: + - $ref: '#/components/schemas/Query-Output' + - $ref: '#/components/schemas/Sigma-Output' + - $ref: '#/components/schemas/Regex-Output' + - $ref: '#/components/schemas/ForensicArtifact-Output' + - $ref: '#/components/schemas/Suricata-Output' + - $ref: '#/components/schemas/Yara-Output' + Entity_1: + discriminator: + mapping: + attack-pattern: '#/components/schemas/AttackPattern-Input' + campaign: '#/components/schemas/Campaign-Input' + company: '#/components/schemas/Company-Input' + course-of-action: '#/components/schemas/CourseOfAction-Input' + identity: '#/components/schemas/Identity-Input' + intrusion-set: '#/components/schemas/IntrusionSet-Input' + investigation: '#/components/schemas/Investigation-Input' + malware: '#/components/schemas/Malware-Input' + note: '#/components/schemas/Note-Input' + phone: '#/components/schemas/Phone-Input' + threat-actor: '#/components/schemas/ThreatActor-Input' + tool: '#/components/schemas/Tool-Input' + vulnerability: '#/components/schemas/Vulnerability-Input' + propertyName: type + oneOf: + - $ref: '#/components/schemas/Investigation-Input' + - $ref: '#/components/schemas/CourseOfAction-Input' + - $ref: '#/components/schemas/Identity-Input' + - $ref: '#/components/schemas/IntrusionSet-Input' + - $ref: '#/components/schemas/Tool-Input' + - $ref: '#/components/schemas/ThreatActor-Input' + - $ref: '#/components/schemas/Campaign-Input' + - $ref: '#/components/schemas/Company-Input' + - $ref: '#/components/schemas/Malware-Input' + - $ref: '#/components/schemas/Phone-Input' + - $ref: '#/components/schemas/Note-Input' + - $ref: '#/components/schemas/AttackPattern-Input' + - $ref: '#/components/schemas/Vulnerability-Input' + title: Entity + Observable_1: + anyOf: + - $ref: '#/components/schemas/CIDR-Input' + - $ref: '#/components/schemas/Hostname-Input' + - $ref: '#/components/schemas/MacAddress-Input' + - $ref: '#/components/schemas/Certificate-Input' + - $ref: '#/components/schemas/IPv6-Input' + - $ref: '#/components/schemas/UserAccount-Input' + - $ref: '#/components/schemas/Ssdeep-Input' + - $ref: '#/components/schemas/BIC-Input' + - $ref: '#/components/schemas/Package-Input' + - $ref: '#/components/schemas/SHA256-Input' + - $ref: '#/components/schemas/DockerImage-Input' + - $ref: '#/components/schemas/Email-Input' + - $ref: '#/components/schemas/JARM-Input' + - $ref: '#/components/schemas/File-Input' + - $ref: '#/components/schemas/Mutex-Input' + - $ref: '#/components/schemas/IBAN-Input' + - $ref: '#/components/schemas/CommandLine-Input' + - $ref: '#/components/schemas/Url-Input' + - $ref: '#/components/schemas/RegistryKey-Input' + - $ref: '#/components/schemas/Path-Input' + - $ref: '#/components/schemas/IPv4-Input' + - $ref: '#/components/schemas/TLSH-Input' + - $ref: '#/components/schemas/Generic-Input' + - $ref: '#/components/schemas/SHA1-Input' + - $ref: '#/components/schemas/UserAgent-Input' + - $ref: '#/components/schemas/Wallet-Input' + - $ref: '#/components/schemas/MD5-Input' + - $ref: '#/components/schemas/Imphash-Input' + - $ref: '#/components/schemas/ASN-Input' + - $ref: '#/components/schemas/NamedPipe-Input' + - $ref: '#/components/schemas/JA3-Input' + title: Observable + discriminant: type + Indicator_1: + discriminator: + mapping: + forensicartifact: '#/components/schemas/ForensicArtifact-Input' + query: '#/components/schemas/Query-Input' + regex: '#/components/schemas/Regex-Input' + sigma: '#/components/schemas/Sigma-Input' + suricata: '#/components/schemas/Suricata-Input' + yara: '#/components/schemas/Yara-Input' + propertyName: type + oneOf: + - $ref: '#/components/schemas/Query-Input' + - $ref: '#/components/schemas/Sigma-Input' + - $ref: '#/components/schemas/Regex-Input' + - $ref: '#/components/schemas/ForensicArtifact-Input' + - $ref: '#/components/schemas/Suricata-Input' + - $ref: '#/components/schemas/Yara-Input' + title: Indicator + ObservableSearchRequest_type: + anyOf: + - $ref: '#/components/schemas/ObservableType-Input' + - {} + Search_Query: + anyOf: + - {} + - {} + title: Search Query + Name: + anyOf: + - {} + - {} + title: Name + TaskSearchRequest_type: + anyOf: + - $ref: '#/components/schemas/TaskType' + - {} + Tasks_inner: + anyOf: + - $ref: '#/components/schemas/FeedTask' + - $ref: '#/components/schemas/AnalyticsTask' + - $ref: '#/components/schemas/OneShotTask' + - $ref: '#/components/schemas/ExportTask-Output' + ValidationError_loc_inner: + anyOf: + - type: string + - type: integer + securitySchemes: + APIKeyHeader: + in: header + name: x-yeti-apikey + type: apiKey + OAuth2PasswordBearer: + flows: + password: + scopes: {} + tokenUrl: api/v2/auth/token + type: oauth2 + APIKeyCookie: + in: cookie + name: yeti_session + type: apiKey diff --git a/api_auth.go b/api_auth.go new file mode 100644 index 0000000..377310e --- /dev/null +++ b/api_auth.go @@ -0,0 +1,494 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + +// AuthAPIService AuthAPI service +type AuthAPIService service + +type ApiLoginApiApiV2AuthApiTokenPostRequest struct { + ctx context.Context + ApiService *AuthAPIService +} + +func (r ApiLoginApiApiV2AuthApiTokenPostRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.LoginApiApiV2AuthApiTokenPostExecute(r) +} + +/* +LoginApiApiV2AuthApiTokenPost Login Api + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLoginApiApiV2AuthApiTokenPostRequest +*/ +func (a *AuthAPIService) LoginApiApiV2AuthApiTokenPost(ctx context.Context) ApiLoginApiApiV2AuthApiTokenPostRequest { + return ApiLoginApiApiV2AuthApiTokenPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *AuthAPIService) LoginApiApiV2AuthApiTokenPostExecute(r ApiLoginApiApiV2AuthApiTokenPostRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthAPIService.LoginApiApiV2AuthApiTokenPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/auth/api-token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["APIKeyHeader"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["x-yeti-apikey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLoginApiV2AuthTokenPostRequest struct { + ctx context.Context + ApiService *AuthAPIService + username *string + password *string + grantType *string + scope *string + clientId *string + clientSecret *string +} + +func (r ApiLoginApiV2AuthTokenPostRequest) Username(username string) ApiLoginApiV2AuthTokenPostRequest { + r.username = &username + return r +} + +func (r ApiLoginApiV2AuthTokenPostRequest) Password(password string) ApiLoginApiV2AuthTokenPostRequest { + r.password = &password + return r +} + +func (r ApiLoginApiV2AuthTokenPostRequest) GrantType(grantType string) ApiLoginApiV2AuthTokenPostRequest { + r.grantType = &grantType + return r +} + +func (r ApiLoginApiV2AuthTokenPostRequest) Scope(scope string) ApiLoginApiV2AuthTokenPostRequest { + r.scope = &scope + return r +} + +func (r ApiLoginApiV2AuthTokenPostRequest) ClientId(clientId string) ApiLoginApiV2AuthTokenPostRequest { + r.clientId = &clientId + return r +} + +func (r ApiLoginApiV2AuthTokenPostRequest) ClientSecret(clientSecret string) ApiLoginApiV2AuthTokenPostRequest { + r.clientSecret = &clientSecret + return r +} + +func (r ApiLoginApiV2AuthTokenPostRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.LoginApiV2AuthTokenPostExecute(r) +} + +/* +LoginApiV2AuthTokenPost Login + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLoginApiV2AuthTokenPostRequest +*/ +func (a *AuthAPIService) LoginApiV2AuthTokenPost(ctx context.Context) ApiLoginApiV2AuthTokenPostRequest { + return ApiLoginApiV2AuthTokenPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *AuthAPIService) LoginApiV2AuthTokenPostExecute(r ApiLoginApiV2AuthTokenPostRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthAPIService.LoginApiV2AuthTokenPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/auth/token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.username == nil { + return localVarReturnValue, nil, reportError("username is required and must be specified") + } + if r.password == nil { + return localVarReturnValue, nil, reportError("password is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.grantType != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "grant_type", r.grantType, "", "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "username", r.username, "", "") + parameterAddToHeaderOrQuery(localVarFormParams, "password", r.password, "", "") + if r.scope != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "scope", r.scope, "", "") + } + if r.clientId != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "client_id", r.clientId, "", "") + } + if r.clientSecret != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "client_secret", r.clientSecret, "", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLogoutApiV2AuthLogoutPostRequest struct { + ctx context.Context + ApiService *AuthAPIService +} + +func (r ApiLogoutApiV2AuthLogoutPostRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.LogoutApiV2AuthLogoutPostExecute(r) +} + +/* +LogoutApiV2AuthLogoutPost Logout + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLogoutApiV2AuthLogoutPostRequest +*/ +func (a *AuthAPIService) LogoutApiV2AuthLogoutPost(ctx context.Context) ApiLogoutApiV2AuthLogoutPostRequest { + return ApiLogoutApiV2AuthLogoutPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *AuthAPIService) LogoutApiV2AuthLogoutPostExecute(r ApiLogoutApiV2AuthLogoutPostRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthAPIService.LogoutApiV2AuthLogoutPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/auth/logout" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiMeApiV2AuthMeGetRequest struct { + ctx context.Context + ApiService *AuthAPIService +} + +func (r ApiMeApiV2AuthMeGetRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.MeApiV2AuthMeGetExecute(r) +} + +/* +MeApiV2AuthMeGet Me + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiMeApiV2AuthMeGetRequest +*/ +func (a *AuthAPIService) MeApiV2AuthMeGet(ctx context.Context) ApiMeApiV2AuthMeGetRequest { + return ApiMeApiV2AuthMeGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return User +func (a *AuthAPIService) MeApiV2AuthMeGetExecute(r ApiMeApiV2AuthMeGetRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthAPIService.MeApiV2AuthMeGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/auth/me" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_dfiq.go b/api_dfiq.go new file mode 100644 index 0000000..53df516 --- /dev/null +++ b/api_dfiq.go @@ -0,0 +1,1100 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" + "strings" +) + +// DfiqAPIService DfiqAPI service +type DfiqAPIService service + +type ApiConfigApiV2DfiqConfigGetRequest struct { + ctx context.Context + ApiService *DfiqAPIService +} + +func (r ApiConfigApiV2DfiqConfigGetRequest) Execute() (*DFIQConfigResponse, *http.Response, error) { + return r.ApiService.ConfigApiV2DfiqConfigGetExecute(r) +} + +/* +ConfigApiV2DfiqConfigGet Config + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiConfigApiV2DfiqConfigGetRequest +*/ +func (a *DfiqAPIService) ConfigApiV2DfiqConfigGet(ctx context.Context) ApiConfigApiV2DfiqConfigGetRequest { + return ApiConfigApiV2DfiqConfigGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DFIQConfigResponse +func (a *DfiqAPIService) ConfigApiV2DfiqConfigGetExecute(r ApiConfigApiV2DfiqConfigGetRequest) (*DFIQConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DFIQConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.ConfigApiV2DfiqConfigGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/config" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteApiV2DfiqDfiqIdDeleteRequest struct { + ctx context.Context + ApiService *DfiqAPIService + dfiqId string +} + +func (r ApiDeleteApiV2DfiqDfiqIdDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.DeleteApiV2DfiqDfiqIdDeleteExecute(r) +} + +/* +DeleteApiV2DfiqDfiqIdDelete Delete + +Deletes a DFIQ object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dfiqId + @return ApiDeleteApiV2DfiqDfiqIdDeleteRequest +*/ +func (a *DfiqAPIService) DeleteApiV2DfiqDfiqIdDelete(ctx context.Context, dfiqId string) ApiDeleteApiV2DfiqDfiqIdDeleteRequest { + return ApiDeleteApiV2DfiqDfiqIdDeleteRequest{ + ApiService: a, + ctx: ctx, + dfiqId: dfiqId, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *DfiqAPIService) DeleteApiV2DfiqDfiqIdDeleteExecute(r ApiDeleteApiV2DfiqDfiqIdDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.DeleteApiV2DfiqDfiqIdDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/{dfiq_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dfiq_id"+"}", url.PathEscape(parameterValueToString(r.dfiqId, "dfiqId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDetailsApiV2DfiqDfiqIdGetRequest struct { + ctx context.Context + ApiService *DfiqAPIService + dfiqId interface{} +} + +func (r ApiDetailsApiV2DfiqDfiqIdGetRequest) Execute() (*ResponseDetailsApiV2DfiqDfiqIdGet, *http.Response, error) { + return r.ApiService.DetailsApiV2DfiqDfiqIdGetExecute(r) +} + +/* +DetailsApiV2DfiqDfiqIdGet Details + +Returns details about a DFIQ object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dfiqId + @return ApiDetailsApiV2DfiqDfiqIdGetRequest +*/ +func (a *DfiqAPIService) DetailsApiV2DfiqDfiqIdGet(ctx context.Context, dfiqId interface{}) ApiDetailsApiV2DfiqDfiqIdGetRequest { + return ApiDetailsApiV2DfiqDfiqIdGetRequest{ + ApiService: a, + ctx: ctx, + dfiqId: dfiqId, + } +} + +// Execute executes the request +// +// @return ResponseDetailsApiV2DfiqDfiqIdGet +func (a *DfiqAPIService) DetailsApiV2DfiqDfiqIdGetExecute(r ApiDetailsApiV2DfiqDfiqIdGetRequest) (*ResponseDetailsApiV2DfiqDfiqIdGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDetailsApiV2DfiqDfiqIdGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.DetailsApiV2DfiqDfiqIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/{dfiq_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dfiq_id"+"}", url.PathEscape(parameterValueToString(r.dfiqId, "dfiqId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiFromArchiveApiV2DfiqFromArchivePostRequest struct { + ctx context.Context + ApiService *DfiqAPIService + archive *os.File +} + +func (r ApiFromArchiveApiV2DfiqFromArchivePostRequest) Archive(archive *os.File) ApiFromArchiveApiV2DfiqFromArchivePostRequest { + r.archive = archive + return r +} + +func (r ApiFromArchiveApiV2DfiqFromArchivePostRequest) Execute() (map[string]int32, *http.Response, error) { + return r.ApiService.FromArchiveApiV2DfiqFromArchivePostExecute(r) +} + +/* +FromArchiveApiV2DfiqFromArchivePost From Archive + +Uncompresses a ZIP archive and processes the DFIQ content inside it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFromArchiveApiV2DfiqFromArchivePostRequest +*/ +func (a *DfiqAPIService) FromArchiveApiV2DfiqFromArchivePost(ctx context.Context) ApiFromArchiveApiV2DfiqFromArchivePostRequest { + return ApiFromArchiveApiV2DfiqFromArchivePostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return map[string]int32 +func (a *DfiqAPIService) FromArchiveApiV2DfiqFromArchivePostExecute(r ApiFromArchiveApiV2DfiqFromArchivePostRequest) (map[string]int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.FromArchiveApiV2DfiqFromArchivePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/from_archive" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.archive == nil { + return localVarReturnValue, nil, reportError("archive is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var archiveLocalVarFormFileName string + var archiveLocalVarFileName string + var archiveLocalVarFileBytes []byte + + archiveLocalVarFormFileName = "archive" + archiveLocalVarFile := r.archive + + if archiveLocalVarFile != nil { + fbs, _ := io.ReadAll(archiveLocalVarFile) + + archiveLocalVarFileBytes = fbs + archiveLocalVarFileName = archiveLocalVarFile.Name() + archiveLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: archiveLocalVarFileBytes, fileName: archiveLocalVarFileName, formFileName: archiveLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiNewFromYamlApiV2DfiqFromYamlPostRequest struct { + ctx context.Context + ApiService *DfiqAPIService + newDFIQRequest *NewDFIQRequest +} + +func (r ApiNewFromYamlApiV2DfiqFromYamlPostRequest) NewDFIQRequest(newDFIQRequest NewDFIQRequest) ApiNewFromYamlApiV2DfiqFromYamlPostRequest { + r.newDFIQRequest = &newDFIQRequest + return r +} + +func (r ApiNewFromYamlApiV2DfiqFromYamlPostRequest) Execute() (*ResponseNewFromYamlApiV2DfiqFromYamlPost, *http.Response, error) { + return r.ApiService.NewFromYamlApiV2DfiqFromYamlPostExecute(r) +} + +/* +NewFromYamlApiV2DfiqFromYamlPost New From Yaml + +Creates a new DFIQ object in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiNewFromYamlApiV2DfiqFromYamlPostRequest +*/ +func (a *DfiqAPIService) NewFromYamlApiV2DfiqFromYamlPost(ctx context.Context) ApiNewFromYamlApiV2DfiqFromYamlPostRequest { + return ApiNewFromYamlApiV2DfiqFromYamlPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ResponseNewFromYamlApiV2DfiqFromYamlPost +func (a *DfiqAPIService) NewFromYamlApiV2DfiqFromYamlPostExecute(r ApiNewFromYamlApiV2DfiqFromYamlPostRequest) (*ResponseNewFromYamlApiV2DfiqFromYamlPost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseNewFromYamlApiV2DfiqFromYamlPost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.NewFromYamlApiV2DfiqFromYamlPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/from_yaml" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newDFIQRequest == nil { + return localVarReturnValue, nil, reportError("newDFIQRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newDFIQRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPatchApiV2DfiqDfiqIdPatchRequest struct { + ctx context.Context + ApiService *DfiqAPIService + dfiqId interface{} + patchDFIQRequest *PatchDFIQRequest +} + +func (r ApiPatchApiV2DfiqDfiqIdPatchRequest) PatchDFIQRequest(patchDFIQRequest PatchDFIQRequest) ApiPatchApiV2DfiqDfiqIdPatchRequest { + r.patchDFIQRequest = &patchDFIQRequest + return r +} + +func (r ApiPatchApiV2DfiqDfiqIdPatchRequest) Execute() (*ResponsePatchApiV2DfiqDfiqIdPatch, *http.Response, error) { + return r.ApiService.PatchApiV2DfiqDfiqIdPatchExecute(r) +} + +/* +PatchApiV2DfiqDfiqIdPatch Patch + +Modifies an DFIQ object in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dfiqId + @return ApiPatchApiV2DfiqDfiqIdPatchRequest +*/ +func (a *DfiqAPIService) PatchApiV2DfiqDfiqIdPatch(ctx context.Context, dfiqId interface{}) ApiPatchApiV2DfiqDfiqIdPatchRequest { + return ApiPatchApiV2DfiqDfiqIdPatchRequest{ + ApiService: a, + ctx: ctx, + dfiqId: dfiqId, + } +} + +// Execute executes the request +// +// @return ResponsePatchApiV2DfiqDfiqIdPatch +func (a *DfiqAPIService) PatchApiV2DfiqDfiqIdPatchExecute(r ApiPatchApiV2DfiqDfiqIdPatchRequest) (*ResponsePatchApiV2DfiqDfiqIdPatch, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePatchApiV2DfiqDfiqIdPatch + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.PatchApiV2DfiqDfiqIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/{dfiq_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dfiq_id"+"}", url.PathEscape(parameterValueToString(r.dfiqId, "dfiqId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchDFIQRequest == nil { + return localVarReturnValue, nil, reportError("patchDFIQRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchDFIQRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2DfiqSearchPostRequest struct { + ctx context.Context + ApiService *DfiqAPIService + dFIQSearchRequest *DFIQSearchRequest +} + +func (r ApiSearchApiV2DfiqSearchPostRequest) DFIQSearchRequest(dFIQSearchRequest DFIQSearchRequest) ApiSearchApiV2DfiqSearchPostRequest { + r.dFIQSearchRequest = &dFIQSearchRequest + return r +} + +func (r ApiSearchApiV2DfiqSearchPostRequest) Execute() (*DFIQSearchResponse, *http.Response, error) { + return r.ApiService.SearchApiV2DfiqSearchPostExecute(r) +} + +/* +SearchApiV2DfiqSearchPost Search + +Searches for DFIQ objects. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2DfiqSearchPostRequest +*/ +func (a *DfiqAPIService) SearchApiV2DfiqSearchPost(ctx context.Context) ApiSearchApiV2DfiqSearchPostRequest { + return ApiSearchApiV2DfiqSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DFIQSearchResponse +func (a *DfiqAPIService) SearchApiV2DfiqSearchPostExecute(r ApiSearchApiV2DfiqSearchPostRequest) (*DFIQSearchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DFIQSearchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.SearchApiV2DfiqSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dFIQSearchRequest == nil { + return localVarReturnValue, nil, reportError("dFIQSearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dFIQSearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiToArchiveApiV2DfiqToArchivePostRequest struct { + ctx context.Context + ApiService *DfiqAPIService + dFIQSearchRequest *DFIQSearchRequest +} + +func (r ApiToArchiveApiV2DfiqToArchivePostRequest) DFIQSearchRequest(dFIQSearchRequest DFIQSearchRequest) ApiToArchiveApiV2DfiqToArchivePostRequest { + r.dFIQSearchRequest = &dFIQSearchRequest + return r +} + +func (r ApiToArchiveApiV2DfiqToArchivePostRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.ToArchiveApiV2DfiqToArchivePostExecute(r) +} + +/* +ToArchiveApiV2DfiqToArchivePost To Archive + +Compresses DFIQ objects into a ZIP archive. + +The structure of the archive is as follows: +- {public, internal}/ + + - type/ + + - dfiq_id.yaml + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiToArchiveApiV2DfiqToArchivePostRequest +*/ +func (a *DfiqAPIService) ToArchiveApiV2DfiqToArchivePost(ctx context.Context) ApiToArchiveApiV2DfiqToArchivePostRequest { + return ApiToArchiveApiV2DfiqToArchivePostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *DfiqAPIService) ToArchiveApiV2DfiqToArchivePostExecute(r ApiToArchiveApiV2DfiqToArchivePostRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.ToArchiveApiV2DfiqToArchivePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/to_archive" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dFIQSearchRequest == nil { + return localVarReturnValue, nil, reportError("dFIQSearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dFIQSearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiValidateDfiqYamlApiV2DfiqValidatePostRequest struct { + ctx context.Context + ApiService *DfiqAPIService + dFIQValidateRequest *DFIQValidateRequest +} + +func (r ApiValidateDfiqYamlApiV2DfiqValidatePostRequest) DFIQValidateRequest(dFIQValidateRequest DFIQValidateRequest) ApiValidateDfiqYamlApiV2DfiqValidatePostRequest { + r.dFIQValidateRequest = &dFIQValidateRequest + return r +} + +func (r ApiValidateDfiqYamlApiV2DfiqValidatePostRequest) Execute() (*DFIQValidateResponse, *http.Response, error) { + return r.ApiService.ValidateDfiqYamlApiV2DfiqValidatePostExecute(r) +} + +/* +ValidateDfiqYamlApiV2DfiqValidatePost Validate Dfiq Yaml + +Validates a DFIQ YAML string. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiValidateDfiqYamlApiV2DfiqValidatePostRequest +*/ +func (a *DfiqAPIService) ValidateDfiqYamlApiV2DfiqValidatePost(ctx context.Context) ApiValidateDfiqYamlApiV2DfiqValidatePostRequest { + return ApiValidateDfiqYamlApiV2DfiqValidatePostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DFIQValidateResponse +func (a *DfiqAPIService) ValidateDfiqYamlApiV2DfiqValidatePostExecute(r ApiValidateDfiqYamlApiV2DfiqValidatePostRequest) (*DFIQValidateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DFIQValidateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DfiqAPIService.ValidateDfiqYamlApiV2DfiqValidatePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/dfiq/validate" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dFIQValidateRequest == nil { + return localVarReturnValue, nil, reportError("dFIQValidateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dFIQValidateRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_entities.go b/api_entities.go new file mode 100644 index 0000000..6302cfc --- /dev/null +++ b/api_entities.go @@ -0,0 +1,739 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// EntitiesAPIService EntitiesAPI service +type EntitiesAPIService service + +type ApiDeleteApiV2EntitiesEntityIdDeleteRequest struct { + ctx context.Context + ApiService *EntitiesAPIService + entityId string +} + +func (r ApiDeleteApiV2EntitiesEntityIdDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.DeleteApiV2EntitiesEntityIdDeleteExecute(r) +} + +/* +DeleteApiV2EntitiesEntityIdDelete Delete + +Deletes an Entity. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param entityId + @return ApiDeleteApiV2EntitiesEntityIdDeleteRequest +*/ +func (a *EntitiesAPIService) DeleteApiV2EntitiesEntityIdDelete(ctx context.Context, entityId string) ApiDeleteApiV2EntitiesEntityIdDeleteRequest { + return ApiDeleteApiV2EntitiesEntityIdDeleteRequest{ + ApiService: a, + ctx: ctx, + entityId: entityId, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *EntitiesAPIService) DeleteApiV2EntitiesEntityIdDeleteExecute(r ApiDeleteApiV2EntitiesEntityIdDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EntitiesAPIService.DeleteApiV2EntitiesEntityIdDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/entities/{entity_id}" + localVarPath = strings.Replace(localVarPath, "{"+"entity_id"+"}", url.PathEscape(parameterValueToString(r.entityId, "entityId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDetailsApiV2EntitiesEntityIdGetRequest struct { + ctx context.Context + ApiService *EntitiesAPIService + entityId interface{} +} + +func (r ApiDetailsApiV2EntitiesEntityIdGetRequest) Execute() (*ResponseDetailsApiV2EntitiesEntityIdGet, *http.Response, error) { + return r.ApiService.DetailsApiV2EntitiesEntityIdGetExecute(r) +} + +/* +DetailsApiV2EntitiesEntityIdGet Details + +Returns details about an observable. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param entityId + @return ApiDetailsApiV2EntitiesEntityIdGetRequest +*/ +func (a *EntitiesAPIService) DetailsApiV2EntitiesEntityIdGet(ctx context.Context, entityId interface{}) ApiDetailsApiV2EntitiesEntityIdGetRequest { + return ApiDetailsApiV2EntitiesEntityIdGetRequest{ + ApiService: a, + ctx: ctx, + entityId: entityId, + } +} + +// Execute executes the request +// +// @return ResponseDetailsApiV2EntitiesEntityIdGet +func (a *EntitiesAPIService) DetailsApiV2EntitiesEntityIdGetExecute(r ApiDetailsApiV2EntitiesEntityIdGetRequest) (*ResponseDetailsApiV2EntitiesEntityIdGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDetailsApiV2EntitiesEntityIdGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EntitiesAPIService.DetailsApiV2EntitiesEntityIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/entities/{entity_id}" + localVarPath = strings.Replace(localVarPath, "{"+"entity_id"+"}", url.PathEscape(parameterValueToString(r.entityId, "entityId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiNewApiV2EntitiesPostRequest struct { + ctx context.Context + ApiService *EntitiesAPIService + newEntityRequest *NewEntityRequest +} + +func (r ApiNewApiV2EntitiesPostRequest) NewEntityRequest(newEntityRequest NewEntityRequest) ApiNewApiV2EntitiesPostRequest { + r.newEntityRequest = &newEntityRequest + return r +} + +func (r ApiNewApiV2EntitiesPostRequest) Execute() (*ResponseNewApiV2EntitiesPost, *http.Response, error) { + return r.ApiService.NewApiV2EntitiesPostExecute(r) +} + +/* +NewApiV2EntitiesPost New + +Creates a new entity in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiNewApiV2EntitiesPostRequest +*/ +func (a *EntitiesAPIService) NewApiV2EntitiesPost(ctx context.Context) ApiNewApiV2EntitiesPostRequest { + return ApiNewApiV2EntitiesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ResponseNewApiV2EntitiesPost +func (a *EntitiesAPIService) NewApiV2EntitiesPostExecute(r ApiNewApiV2EntitiesPostRequest) (*ResponseNewApiV2EntitiesPost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseNewApiV2EntitiesPost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EntitiesAPIService.NewApiV2EntitiesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/entities/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newEntityRequest == nil { + return localVarReturnValue, nil, reportError("newEntityRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newEntityRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPatchApiV2EntitiesEntityIdPatchRequest struct { + ctx context.Context + ApiService *EntitiesAPIService + entityId interface{} + patchEntityRequest *PatchEntityRequest +} + +func (r ApiPatchApiV2EntitiesEntityIdPatchRequest) PatchEntityRequest(patchEntityRequest PatchEntityRequest) ApiPatchApiV2EntitiesEntityIdPatchRequest { + r.patchEntityRequest = &patchEntityRequest + return r +} + +func (r ApiPatchApiV2EntitiesEntityIdPatchRequest) Execute() (*ResponsePatchApiV2EntitiesEntityIdPatch, *http.Response, error) { + return r.ApiService.PatchApiV2EntitiesEntityIdPatchExecute(r) +} + +/* +PatchApiV2EntitiesEntityIdPatch Patch + +Modifies entity in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param entityId + @return ApiPatchApiV2EntitiesEntityIdPatchRequest +*/ +func (a *EntitiesAPIService) PatchApiV2EntitiesEntityIdPatch(ctx context.Context, entityId interface{}) ApiPatchApiV2EntitiesEntityIdPatchRequest { + return ApiPatchApiV2EntitiesEntityIdPatchRequest{ + ApiService: a, + ctx: ctx, + entityId: entityId, + } +} + +// Execute executes the request +// +// @return ResponsePatchApiV2EntitiesEntityIdPatch +func (a *EntitiesAPIService) PatchApiV2EntitiesEntityIdPatchExecute(r ApiPatchApiV2EntitiesEntityIdPatchRequest) (*ResponsePatchApiV2EntitiesEntityIdPatch, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePatchApiV2EntitiesEntityIdPatch + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EntitiesAPIService.PatchApiV2EntitiesEntityIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/entities/{entity_id}" + localVarPath = strings.Replace(localVarPath, "{"+"entity_id"+"}", url.PathEscape(parameterValueToString(r.entityId, "entityId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchEntityRequest == nil { + return localVarReturnValue, nil, reportError("patchEntityRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchEntityRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2EntitiesSearchPostRequest struct { + ctx context.Context + ApiService *EntitiesAPIService + entitySearchRequest *EntitySearchRequest +} + +func (r ApiSearchApiV2EntitiesSearchPostRequest) EntitySearchRequest(entitySearchRequest EntitySearchRequest) ApiSearchApiV2EntitiesSearchPostRequest { + r.entitySearchRequest = &entitySearchRequest + return r +} + +func (r ApiSearchApiV2EntitiesSearchPostRequest) Execute() (*EntitySearchResponse, *http.Response, error) { + return r.ApiService.SearchApiV2EntitiesSearchPostExecute(r) +} + +/* +SearchApiV2EntitiesSearchPost Search + +Searches for observables. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2EntitiesSearchPostRequest +*/ +func (a *EntitiesAPIService) SearchApiV2EntitiesSearchPost(ctx context.Context) ApiSearchApiV2EntitiesSearchPostRequest { + return ApiSearchApiV2EntitiesSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EntitySearchResponse +func (a *EntitiesAPIService) SearchApiV2EntitiesSearchPostExecute(r ApiSearchApiV2EntitiesSearchPostRequest) (*EntitySearchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EntitySearchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EntitiesAPIService.SearchApiV2EntitiesSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/entities/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.entitySearchRequest == nil { + return localVarReturnValue, nil, reportError("entitySearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.entitySearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTagApiV2EntitiesTagPostRequest struct { + ctx context.Context + ApiService *EntitiesAPIService + entityTagRequest *EntityTagRequest +} + +func (r ApiTagApiV2EntitiesTagPostRequest) EntityTagRequest(entityTagRequest EntityTagRequest) ApiTagApiV2EntitiesTagPostRequest { + r.entityTagRequest = &entityTagRequest + return r +} + +func (r ApiTagApiV2EntitiesTagPostRequest) Execute() (*EntityTagResponse, *http.Response, error) { + return r.ApiService.TagApiV2EntitiesTagPostExecute(r) +} + +/* +TagApiV2EntitiesTagPost Tag + +Tags entities. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTagApiV2EntitiesTagPostRequest +*/ +func (a *EntitiesAPIService) TagApiV2EntitiesTagPost(ctx context.Context) ApiTagApiV2EntitiesTagPostRequest { + return ApiTagApiV2EntitiesTagPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EntityTagResponse +func (a *EntitiesAPIService) TagApiV2EntitiesTagPostExecute(r ApiTagApiV2EntitiesTagPostRequest) (*EntityTagResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EntityTagResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EntitiesAPIService.TagApiV2EntitiesTagPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/entities/tag" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.entityTagRequest == nil { + return localVarReturnValue, nil, reportError("entityTagRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.entityTagRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_graph.go b/api_graph.go new file mode 100644 index 0000000..2fdd7fc --- /dev/null +++ b/api_graph.go @@ -0,0 +1,739 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// GraphAPIService GraphAPI service +type GraphAPIService service + +type ApiAddApiV2GraphAddPostRequest struct { + ctx context.Context + ApiService *GraphAPIService + graphAddRequest *GraphAddRequest +} + +func (r ApiAddApiV2GraphAddPostRequest) GraphAddRequest(graphAddRequest GraphAddRequest) ApiAddApiV2GraphAddPostRequest { + r.graphAddRequest = &graphAddRequest + return r +} + +func (r ApiAddApiV2GraphAddPostRequest) Execute() (*Relationship, *http.Response, error) { + return r.ApiService.AddApiV2GraphAddPostExecute(r) +} + +/* +AddApiV2GraphAddPost Add + +Adds a link to the graph. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddApiV2GraphAddPostRequest +*/ +func (a *GraphAPIService) AddApiV2GraphAddPost(ctx context.Context) ApiAddApiV2GraphAddPostRequest { + return ApiAddApiV2GraphAddPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Relationship +func (a *GraphAPIService) AddApiV2GraphAddPostExecute(r ApiAddApiV2GraphAddPostRequest) (*Relationship, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Relationship + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GraphAPIService.AddApiV2GraphAddPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/graph/add" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.graphAddRequest == nil { + return localVarReturnValue, nil, reportError("graphAddRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.graphAddRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteApiV2GraphRelationshipIdDeleteRequest struct { + ctx context.Context + ApiService *GraphAPIService + relationshipId string +} + +func (r ApiDeleteApiV2GraphRelationshipIdDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.DeleteApiV2GraphRelationshipIdDeleteExecute(r) +} + +/* +DeleteApiV2GraphRelationshipIdDelete Delete + +Deletes a link from the graph. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param relationshipId + @return ApiDeleteApiV2GraphRelationshipIdDeleteRequest +*/ +func (a *GraphAPIService) DeleteApiV2GraphRelationshipIdDelete(ctx context.Context, relationshipId string) ApiDeleteApiV2GraphRelationshipIdDeleteRequest { + return ApiDeleteApiV2GraphRelationshipIdDeleteRequest{ + ApiService: a, + ctx: ctx, + relationshipId: relationshipId, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *GraphAPIService) DeleteApiV2GraphRelationshipIdDeleteExecute(r ApiDeleteApiV2GraphRelationshipIdDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GraphAPIService.DeleteApiV2GraphRelationshipIdDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/graph/{relationship_id}" + localVarPath = strings.Replace(localVarPath, "{"+"relationship_id"+"}", url.PathEscape(parameterValueToString(r.relationshipId, "relationshipId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiEditApiV2GraphRelationshipIdPatchRequest struct { + ctx context.Context + ApiService *GraphAPIService + relationshipId string + graphPatchRequest *GraphPatchRequest +} + +func (r ApiEditApiV2GraphRelationshipIdPatchRequest) GraphPatchRequest(graphPatchRequest GraphPatchRequest) ApiEditApiV2GraphRelationshipIdPatchRequest { + r.graphPatchRequest = &graphPatchRequest + return r +} + +func (r ApiEditApiV2GraphRelationshipIdPatchRequest) Execute() (*Relationship, *http.Response, error) { + return r.ApiService.EditApiV2GraphRelationshipIdPatchExecute(r) +} + +/* +EditApiV2GraphRelationshipIdPatch Edit + +Edits a Relationship in the graph. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param relationshipId + @return ApiEditApiV2GraphRelationshipIdPatchRequest +*/ +func (a *GraphAPIService) EditApiV2GraphRelationshipIdPatch(ctx context.Context, relationshipId string) ApiEditApiV2GraphRelationshipIdPatchRequest { + return ApiEditApiV2GraphRelationshipIdPatchRequest{ + ApiService: a, + ctx: ctx, + relationshipId: relationshipId, + } +} + +// Execute executes the request +// +// @return Relationship +func (a *GraphAPIService) EditApiV2GraphRelationshipIdPatchExecute(r ApiEditApiV2GraphRelationshipIdPatchRequest) (*Relationship, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Relationship + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GraphAPIService.EditApiV2GraphRelationshipIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/graph/{relationship_id}" + localVarPath = strings.Replace(localVarPath, "{"+"relationship_id"+"}", url.PathEscape(parameterValueToString(r.relationshipId, "relationshipId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.graphPatchRequest == nil { + return localVarReturnValue, nil, reportError("graphPatchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.graphPatchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiMatchApiV2GraphMatchPostRequest struct { + ctx context.Context + ApiService *GraphAPIService + analysisRequest *AnalysisRequest +} + +func (r ApiMatchApiV2GraphMatchPostRequest) AnalysisRequest(analysisRequest AnalysisRequest) ApiMatchApiV2GraphMatchPostRequest { + r.analysisRequest = &analysisRequest + return r +} + +func (r ApiMatchApiV2GraphMatchPostRequest) Execute() (*AnalysisResponse, *http.Response, error) { + return r.ApiService.MatchApiV2GraphMatchPostExecute(r) +} + +/* +MatchApiV2GraphMatchPost Match + +Fetches neighbors for a given Yeti Object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiMatchApiV2GraphMatchPostRequest +*/ +func (a *GraphAPIService) MatchApiV2GraphMatchPost(ctx context.Context) ApiMatchApiV2GraphMatchPostRequest { + return ApiMatchApiV2GraphMatchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AnalysisResponse +func (a *GraphAPIService) MatchApiV2GraphMatchPostExecute(r ApiMatchApiV2GraphMatchPostRequest) (*AnalysisResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnalysisResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GraphAPIService.MatchApiV2GraphMatchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/graph/match" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.analysisRequest == nil { + return localVarReturnValue, nil, reportError("analysisRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.analysisRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2GraphSearchPostRequest struct { + ctx context.Context + ApiService *GraphAPIService + graphSearchRequest *GraphSearchRequest +} + +func (r ApiSearchApiV2GraphSearchPostRequest) GraphSearchRequest(graphSearchRequest GraphSearchRequest) ApiSearchApiV2GraphSearchPostRequest { + r.graphSearchRequest = &graphSearchRequest + return r +} + +func (r ApiSearchApiV2GraphSearchPostRequest) Execute() (*GraphSearchResponse, *http.Response, error) { + return r.ApiService.SearchApiV2GraphSearchPostExecute(r) +} + +/* +SearchApiV2GraphSearchPost Search + +Fetches neighbros for a given Yeti Object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2GraphSearchPostRequest +*/ +func (a *GraphAPIService) SearchApiV2GraphSearchPost(ctx context.Context) ApiSearchApiV2GraphSearchPostRequest { + return ApiSearchApiV2GraphSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GraphSearchResponse +func (a *GraphAPIService) SearchApiV2GraphSearchPostExecute(r ApiSearchApiV2GraphSearchPostRequest) (*GraphSearchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GraphSearchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GraphAPIService.SearchApiV2GraphSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/graph/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.graphSearchRequest == nil { + return localVarReturnValue, nil, reportError("graphSearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.graphSearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSwapApiV2GraphRelationshipIdSwapPostRequest struct { + ctx context.Context + ApiService *GraphAPIService + relationshipId string +} + +func (r ApiSwapApiV2GraphRelationshipIdSwapPostRequest) Execute() (*Relationship, *http.Response, error) { + return r.ApiService.SwapApiV2GraphRelationshipIdSwapPostExecute(r) +} + +/* +SwapApiV2GraphRelationshipIdSwapPost Swap + +Swaps the source and target of a relationship. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param relationshipId + @return ApiSwapApiV2GraphRelationshipIdSwapPostRequest +*/ +func (a *GraphAPIService) SwapApiV2GraphRelationshipIdSwapPost(ctx context.Context, relationshipId string) ApiSwapApiV2GraphRelationshipIdSwapPostRequest { + return ApiSwapApiV2GraphRelationshipIdSwapPostRequest{ + ApiService: a, + ctx: ctx, + relationshipId: relationshipId, + } +} + +// Execute executes the request +// +// @return Relationship +func (a *GraphAPIService) SwapApiV2GraphRelationshipIdSwapPostExecute(r ApiSwapApiV2GraphRelationshipIdSwapPostRequest) (*Relationship, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Relationship + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GraphAPIService.SwapApiV2GraphRelationshipIdSwapPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/graph/{relationship_id}/swap" + localVarPath = strings.Replace(localVarPath, "{"+"relationship_id"+"}", url.PathEscape(parameterValueToString(r.relationshipId, "relationshipId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_import_data.go b/api_import_data.go new file mode 100644 index 0000000..7e1f3c5 --- /dev/null +++ b/api_import_data.go @@ -0,0 +1,155 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" +) + +// ImportDataAPIService ImportDataAPI service +type ImportDataAPIService service + +type ApiImportMispJsonApiV2ImportDataImportMispJsonPostRequest struct { + ctx context.Context + ApiService *ImportDataAPIService + mispFileJson *os.File +} + +func (r ApiImportMispJsonApiV2ImportDataImportMispJsonPostRequest) MispFileJson(mispFileJson *os.File) ApiImportMispJsonApiV2ImportDataImportMispJsonPostRequest { + r.mispFileJson = mispFileJson + return r +} + +func (r ApiImportMispJsonApiV2ImportDataImportMispJsonPostRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.ImportMispJsonApiV2ImportDataImportMispJsonPostExecute(r) +} + +/* +ImportMispJsonApiV2ImportDataImportMispJsonPost Import Misp Json + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiImportMispJsonApiV2ImportDataImportMispJsonPostRequest +*/ +func (a *ImportDataAPIService) ImportMispJsonApiV2ImportDataImportMispJsonPost(ctx context.Context) ApiImportMispJsonApiV2ImportDataImportMispJsonPostRequest { + return ApiImportMispJsonApiV2ImportDataImportMispJsonPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *ImportDataAPIService) ImportMispJsonApiV2ImportDataImportMispJsonPostExecute(r ApiImportMispJsonApiV2ImportDataImportMispJsonPostRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportDataAPIService.ImportMispJsonApiV2ImportDataImportMispJsonPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/import_data/import_misp_json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mispFileJson == nil { + return localVarReturnValue, nil, reportError("mispFileJson is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var mispFileJsonLocalVarFormFileName string + var mispFileJsonLocalVarFileName string + var mispFileJsonLocalVarFileBytes []byte + + mispFileJsonLocalVarFormFileName = "misp_file_json" + mispFileJsonLocalVarFile := r.mispFileJson + + if mispFileJsonLocalVarFile != nil { + fbs, _ := io.ReadAll(mispFileJsonLocalVarFile) + + mispFileJsonLocalVarFileBytes = fbs + mispFileJsonLocalVarFileName = mispFileJsonLocalVarFile.Name() + mispFileJsonLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: mispFileJsonLocalVarFileBytes, fileName: mispFileJsonLocalVarFileName, formFileName: mispFileJsonLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_import_misp_json.go b/api_import_misp_json.go new file mode 100644 index 0000000..ea8e557 --- /dev/null +++ b/api_import_misp_json.go @@ -0,0 +1,155 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" +) + +// ImportMispJsonAPIService ImportMispJsonAPI service +type ImportMispJsonAPIService service + +type ApiImportMispJsonApiV2ImportDataImportMispJsonPost_0Request struct { + ctx context.Context + ApiService *ImportMispJsonAPIService + mispFileJson *os.File +} + +func (r ApiImportMispJsonApiV2ImportDataImportMispJsonPost_0Request) MispFileJson(mispFileJson *os.File) ApiImportMispJsonApiV2ImportDataImportMispJsonPost_0Request { + r.mispFileJson = mispFileJson + return r +} + +func (r ApiImportMispJsonApiV2ImportDataImportMispJsonPost_0Request) Execute() (interface{}, *http.Response, error) { + return r.ApiService.ImportMispJsonApiV2ImportDataImportMispJsonPostExecute(r) +} + +/* +ImportMispJsonApiV2ImportDataImportMispJsonPost_0 Import Misp Json + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiImportMispJsonApiV2ImportDataImportMispJsonPost_0Request +*/ +func (a *ImportMispJsonAPIService) ImportMispJsonApiV2ImportDataImportMispJsonPost(ctx context.Context) ApiImportMispJsonApiV2ImportDataImportMispJsonPost_0Request { + return ApiImportMispJsonApiV2ImportDataImportMispJsonPost_0Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *ImportMispJsonAPIService) ImportMispJsonApiV2ImportDataImportMispJsonPostExecute(r ApiImportMispJsonApiV2ImportDataImportMispJsonPost_0Request) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportMispJsonAPIService.ImportMispJsonApiV2ImportDataImportMispJsonPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/import_data/import_misp_json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mispFileJson == nil { + return localVarReturnValue, nil, reportError("mispFileJson is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var mispFileJsonLocalVarFormFileName string + var mispFileJsonLocalVarFileName string + var mispFileJsonLocalVarFileBytes []byte + + mispFileJsonLocalVarFormFileName = "misp_file_json" + mispFileJsonLocalVarFile := r.mispFileJson + + if mispFileJsonLocalVarFile != nil { + fbs, _ := io.ReadAll(mispFileJsonLocalVarFile) + + mispFileJsonLocalVarFileBytes = fbs + mispFileJsonLocalVarFileName = mispFileJsonLocalVarFile.Name() + mispFileJsonLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: mispFileJsonLocalVarFileBytes, fileName: mispFileJsonLocalVarFileName, formFileName: mispFileJsonLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_indicators.go b/api_indicators.go new file mode 100644 index 0000000..471db03 --- /dev/null +++ b/api_indicators.go @@ -0,0 +1,739 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// IndicatorsAPIService IndicatorsAPI service +type IndicatorsAPIService service + +type ApiDeleteApiV2IndicatorsIndicatorIdDeleteRequest struct { + ctx context.Context + ApiService *IndicatorsAPIService + indicatorId string +} + +func (r ApiDeleteApiV2IndicatorsIndicatorIdDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.DeleteApiV2IndicatorsIndicatorIdDeleteExecute(r) +} + +/* +DeleteApiV2IndicatorsIndicatorIdDelete Delete + +Deletes an indicator. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param indicatorId + @return ApiDeleteApiV2IndicatorsIndicatorIdDeleteRequest +*/ +func (a *IndicatorsAPIService) DeleteApiV2IndicatorsIndicatorIdDelete(ctx context.Context, indicatorId string) ApiDeleteApiV2IndicatorsIndicatorIdDeleteRequest { + return ApiDeleteApiV2IndicatorsIndicatorIdDeleteRequest{ + ApiService: a, + ctx: ctx, + indicatorId: indicatorId, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *IndicatorsAPIService) DeleteApiV2IndicatorsIndicatorIdDeleteExecute(r ApiDeleteApiV2IndicatorsIndicatorIdDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IndicatorsAPIService.DeleteApiV2IndicatorsIndicatorIdDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/indicators/{indicator_id}" + localVarPath = strings.Replace(localVarPath, "{"+"indicator_id"+"}", url.PathEscape(parameterValueToString(r.indicatorId, "indicatorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDetailsApiV2IndicatorsIndicatorIdGetRequest struct { + ctx context.Context + ApiService *IndicatorsAPIService + indicatorId interface{} +} + +func (r ApiDetailsApiV2IndicatorsIndicatorIdGetRequest) Execute() (*ResponseDetailsApiV2IndicatorsIndicatorIdGet, *http.Response, error) { + return r.ApiService.DetailsApiV2IndicatorsIndicatorIdGetExecute(r) +} + +/* +DetailsApiV2IndicatorsIndicatorIdGet Details + +Returns details about an indicator. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param indicatorId + @return ApiDetailsApiV2IndicatorsIndicatorIdGetRequest +*/ +func (a *IndicatorsAPIService) DetailsApiV2IndicatorsIndicatorIdGet(ctx context.Context, indicatorId interface{}) ApiDetailsApiV2IndicatorsIndicatorIdGetRequest { + return ApiDetailsApiV2IndicatorsIndicatorIdGetRequest{ + ApiService: a, + ctx: ctx, + indicatorId: indicatorId, + } +} + +// Execute executes the request +// +// @return ResponseDetailsApiV2IndicatorsIndicatorIdGet +func (a *IndicatorsAPIService) DetailsApiV2IndicatorsIndicatorIdGetExecute(r ApiDetailsApiV2IndicatorsIndicatorIdGetRequest) (*ResponseDetailsApiV2IndicatorsIndicatorIdGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDetailsApiV2IndicatorsIndicatorIdGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IndicatorsAPIService.DetailsApiV2IndicatorsIndicatorIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/indicators/{indicator_id}" + localVarPath = strings.Replace(localVarPath, "{"+"indicator_id"+"}", url.PathEscape(parameterValueToString(r.indicatorId, "indicatorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiNewApiV2IndicatorsPostRequest struct { + ctx context.Context + ApiService *IndicatorsAPIService + newIndicatorRequest *NewIndicatorRequest +} + +func (r ApiNewApiV2IndicatorsPostRequest) NewIndicatorRequest(newIndicatorRequest NewIndicatorRequest) ApiNewApiV2IndicatorsPostRequest { + r.newIndicatorRequest = &newIndicatorRequest + return r +} + +func (r ApiNewApiV2IndicatorsPostRequest) Execute() (*ResponseNewApiV2IndicatorsPost, *http.Response, error) { + return r.ApiService.NewApiV2IndicatorsPostExecute(r) +} + +/* +NewApiV2IndicatorsPost New + +Creates a new indicator in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiNewApiV2IndicatorsPostRequest +*/ +func (a *IndicatorsAPIService) NewApiV2IndicatorsPost(ctx context.Context) ApiNewApiV2IndicatorsPostRequest { + return ApiNewApiV2IndicatorsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ResponseNewApiV2IndicatorsPost +func (a *IndicatorsAPIService) NewApiV2IndicatorsPostExecute(r ApiNewApiV2IndicatorsPostRequest) (*ResponseNewApiV2IndicatorsPost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseNewApiV2IndicatorsPost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IndicatorsAPIService.NewApiV2IndicatorsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/indicators/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newIndicatorRequest == nil { + return localVarReturnValue, nil, reportError("newIndicatorRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newIndicatorRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPatchApiV2IndicatorsIndicatorIdPatchRequest struct { + ctx context.Context + ApiService *IndicatorsAPIService + indicatorId interface{} + patchIndicatorRequest *PatchIndicatorRequest +} + +func (r ApiPatchApiV2IndicatorsIndicatorIdPatchRequest) PatchIndicatorRequest(patchIndicatorRequest PatchIndicatorRequest) ApiPatchApiV2IndicatorsIndicatorIdPatchRequest { + r.patchIndicatorRequest = &patchIndicatorRequest + return r +} + +func (r ApiPatchApiV2IndicatorsIndicatorIdPatchRequest) Execute() (*ResponsePatchApiV2IndicatorsIndicatorIdPatch, *http.Response, error) { + return r.ApiService.PatchApiV2IndicatorsIndicatorIdPatchExecute(r) +} + +/* +PatchApiV2IndicatorsIndicatorIdPatch Patch + +Modifies an indicator in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param indicatorId + @return ApiPatchApiV2IndicatorsIndicatorIdPatchRequest +*/ +func (a *IndicatorsAPIService) PatchApiV2IndicatorsIndicatorIdPatch(ctx context.Context, indicatorId interface{}) ApiPatchApiV2IndicatorsIndicatorIdPatchRequest { + return ApiPatchApiV2IndicatorsIndicatorIdPatchRequest{ + ApiService: a, + ctx: ctx, + indicatorId: indicatorId, + } +} + +// Execute executes the request +// +// @return ResponsePatchApiV2IndicatorsIndicatorIdPatch +func (a *IndicatorsAPIService) PatchApiV2IndicatorsIndicatorIdPatchExecute(r ApiPatchApiV2IndicatorsIndicatorIdPatchRequest) (*ResponsePatchApiV2IndicatorsIndicatorIdPatch, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePatchApiV2IndicatorsIndicatorIdPatch + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IndicatorsAPIService.PatchApiV2IndicatorsIndicatorIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/indicators/{indicator_id}" + localVarPath = strings.Replace(localVarPath, "{"+"indicator_id"+"}", url.PathEscape(parameterValueToString(r.indicatorId, "indicatorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchIndicatorRequest == nil { + return localVarReturnValue, nil, reportError("patchIndicatorRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchIndicatorRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2IndicatorsSearchPostRequest struct { + ctx context.Context + ApiService *IndicatorsAPIService + indicatorSearchRequest *IndicatorSearchRequest +} + +func (r ApiSearchApiV2IndicatorsSearchPostRequest) IndicatorSearchRequest(indicatorSearchRequest IndicatorSearchRequest) ApiSearchApiV2IndicatorsSearchPostRequest { + r.indicatorSearchRequest = &indicatorSearchRequest + return r +} + +func (r ApiSearchApiV2IndicatorsSearchPostRequest) Execute() (*IndicatorSearchResponse, *http.Response, error) { + return r.ApiService.SearchApiV2IndicatorsSearchPostExecute(r) +} + +/* +SearchApiV2IndicatorsSearchPost Search + +Searches for indicators. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2IndicatorsSearchPostRequest +*/ +func (a *IndicatorsAPIService) SearchApiV2IndicatorsSearchPost(ctx context.Context) ApiSearchApiV2IndicatorsSearchPostRequest { + return ApiSearchApiV2IndicatorsSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return IndicatorSearchResponse +func (a *IndicatorsAPIService) SearchApiV2IndicatorsSearchPostExecute(r ApiSearchApiV2IndicatorsSearchPostRequest) (*IndicatorSearchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *IndicatorSearchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IndicatorsAPIService.SearchApiV2IndicatorsSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/indicators/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.indicatorSearchRequest == nil { + return localVarReturnValue, nil, reportError("indicatorSearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.indicatorSearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTagApiV2IndicatorsTagPostRequest struct { + ctx context.Context + ApiService *IndicatorsAPIService + indicatorTagRequest *IndicatorTagRequest +} + +func (r ApiTagApiV2IndicatorsTagPostRequest) IndicatorTagRequest(indicatorTagRequest IndicatorTagRequest) ApiTagApiV2IndicatorsTagPostRequest { + r.indicatorTagRequest = &indicatorTagRequest + return r +} + +func (r ApiTagApiV2IndicatorsTagPostRequest) Execute() (*IndicatorTagResponse, *http.Response, error) { + return r.ApiService.TagApiV2IndicatorsTagPostExecute(r) +} + +/* +TagApiV2IndicatorsTagPost Tag + +Tags entities. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTagApiV2IndicatorsTagPostRequest +*/ +func (a *IndicatorsAPIService) TagApiV2IndicatorsTagPost(ctx context.Context) ApiTagApiV2IndicatorsTagPostRequest { + return ApiTagApiV2IndicatorsTagPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return IndicatorTagResponse +func (a *IndicatorsAPIService) TagApiV2IndicatorsTagPostExecute(r ApiTagApiV2IndicatorsTagPostRequest) (*IndicatorTagResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *IndicatorTagResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IndicatorsAPIService.TagApiV2IndicatorsTagPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/indicators/tag" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.indicatorTagRequest == nil { + return localVarReturnValue, nil, reportError("indicatorTagRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.indicatorTagRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_observables.go b/api_observables.go new file mode 100644 index 0000000..e8482e2 --- /dev/null +++ b/api_observables.go @@ -0,0 +1,1459 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ObservablesAPIService ObservablesAPI service +type ObservablesAPIService service + +type ApiAddContextApiV2ObservablesObservableIdContextPostRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + observableId interface{} + addContextRequest *AddContextRequest +} + +func (r ApiAddContextApiV2ObservablesObservableIdContextPostRequest) AddContextRequest(addContextRequest AddContextRequest) ApiAddContextApiV2ObservablesObservableIdContextPostRequest { + r.addContextRequest = &addContextRequest + return r +} + +func (r ApiAddContextApiV2ObservablesObservableIdContextPostRequest) Execute() (*ResponseAddContextApiV2ObservablesObservableIdContextPost, *http.Response, error) { + return r.ApiService.AddContextApiV2ObservablesObservableIdContextPostExecute(r) +} + +/* +AddContextApiV2ObservablesObservableIdContextPost Add Context + +Adds context to an observable. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param observableId + @return ApiAddContextApiV2ObservablesObservableIdContextPostRequest +*/ +func (a *ObservablesAPIService) AddContextApiV2ObservablesObservableIdContextPost(ctx context.Context, observableId interface{}) ApiAddContextApiV2ObservablesObservableIdContextPostRequest { + return ApiAddContextApiV2ObservablesObservableIdContextPostRequest{ + ApiService: a, + ctx: ctx, + observableId: observableId, + } +} + +// Execute executes the request +// +// @return ResponseAddContextApiV2ObservablesObservableIdContextPost +func (a *ObservablesAPIService) AddContextApiV2ObservablesObservableIdContextPostExecute(r ApiAddContextApiV2ObservablesObservableIdContextPostRequest) (*ResponseAddContextApiV2ObservablesObservableIdContextPost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAddContextApiV2ObservablesObservableIdContextPost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.AddContextApiV2ObservablesObservableIdContextPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/{observable_id}/context" + localVarPath = strings.Replace(localVarPath, "{"+"observable_id"+"}", url.PathEscape(parameterValueToString(r.observableId, "observableId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.addContextRequest == nil { + return localVarReturnValue, nil, reportError("addContextRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addContextRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAddTextApiV2ObservablesAddTextPostRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + addTextRequest *AddTextRequest +} + +func (r ApiAddTextApiV2ObservablesAddTextPostRequest) AddTextRequest(addTextRequest AddTextRequest) ApiAddTextApiV2ObservablesAddTextPostRequest { + r.addTextRequest = &addTextRequest + return r +} + +func (r ApiAddTextApiV2ObservablesAddTextPostRequest) Execute() (*ResponseAddTextApiV2ObservablesAddTextPost, *http.Response, error) { + return r.ApiService.AddTextApiV2ObservablesAddTextPostExecute(r) +} + +/* +AddTextApiV2ObservablesAddTextPost Add Text + +Adds and returns an observable for a given string, attempting to guess +its type. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddTextApiV2ObservablesAddTextPostRequest +*/ +func (a *ObservablesAPIService) AddTextApiV2ObservablesAddTextPost(ctx context.Context) ApiAddTextApiV2ObservablesAddTextPostRequest { + return ApiAddTextApiV2ObservablesAddTextPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ResponseAddTextApiV2ObservablesAddTextPost +func (a *ObservablesAPIService) AddTextApiV2ObservablesAddTextPostExecute(r ApiAddTextApiV2ObservablesAddTextPostRequest) (*ResponseAddTextApiV2ObservablesAddTextPost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAddTextApiV2ObservablesAddTextPost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.AddTextApiV2ObservablesAddTextPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/add_text" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.addTextRequest == nil { + return localVarReturnValue, nil, reportError("addTextRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addTextRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiBulkAddApiV2ObservablesBulkPostRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + newBulkObservableAddRequest *NewBulkObservableAddRequest +} + +func (r ApiBulkAddApiV2ObservablesBulkPostRequest) NewBulkObservableAddRequest(newBulkObservableAddRequest NewBulkObservableAddRequest) ApiBulkAddApiV2ObservablesBulkPostRequest { + r.newBulkObservableAddRequest = &newBulkObservableAddRequest + return r +} + +func (r ApiBulkAddApiV2ObservablesBulkPostRequest) Execute() (*BulkObservableAddResponse, *http.Response, error) { + return r.ApiService.BulkAddApiV2ObservablesBulkPostExecute(r) +} + +/* +BulkAddApiV2ObservablesBulkPost Bulk Add + +Bulk-creates new observables in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiBulkAddApiV2ObservablesBulkPostRequest +*/ +func (a *ObservablesAPIService) BulkAddApiV2ObservablesBulkPost(ctx context.Context) ApiBulkAddApiV2ObservablesBulkPostRequest { + return ApiBulkAddApiV2ObservablesBulkPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return BulkObservableAddResponse +func (a *ObservablesAPIService) BulkAddApiV2ObservablesBulkPostExecute(r ApiBulkAddApiV2ObservablesBulkPostRequest) (*BulkObservableAddResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BulkObservableAddResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.BulkAddApiV2ObservablesBulkPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/bulk" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newBulkObservableAddRequest == nil { + return localVarReturnValue, nil, reportError("newBulkObservableAddRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newBulkObservableAddRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteApiV2ObservablesObservableIdDeleteRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + observableId string +} + +func (r ApiDeleteApiV2ObservablesObservableIdDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.DeleteApiV2ObservablesObservableIdDeleteExecute(r) +} + +/* +DeleteApiV2ObservablesObservableIdDelete Delete + +Deletes an observable. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param observableId + @return ApiDeleteApiV2ObservablesObservableIdDeleteRequest +*/ +func (a *ObservablesAPIService) DeleteApiV2ObservablesObservableIdDelete(ctx context.Context, observableId string) ApiDeleteApiV2ObservablesObservableIdDeleteRequest { + return ApiDeleteApiV2ObservablesObservableIdDeleteRequest{ + ApiService: a, + ctx: ctx, + observableId: observableId, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *ObservablesAPIService) DeleteApiV2ObservablesObservableIdDeleteExecute(r ApiDeleteApiV2ObservablesObservableIdDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.DeleteApiV2ObservablesObservableIdDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/{observable_id}" + localVarPath = strings.Replace(localVarPath, "{"+"observable_id"+"}", url.PathEscape(parameterValueToString(r.observableId, "observableId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + observableId interface{} + deleteContextRequest *DeleteContextRequest +} + +func (r ApiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest) DeleteContextRequest(deleteContextRequest DeleteContextRequest) ApiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest { + r.deleteContextRequest = &deleteContextRequest + return r +} + +func (r ApiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest) Execute() (*ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost, *http.Response, error) { + return r.ApiService.DeleteContextApiV2ObservablesObservableIdContextDeletePostExecute(r) +} + +/* +DeleteContextApiV2ObservablesObservableIdContextDeletePost Delete Context + +Removes context to an observable. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param observableId + @return ApiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest +*/ +func (a *ObservablesAPIService) DeleteContextApiV2ObservablesObservableIdContextDeletePost(ctx context.Context, observableId interface{}) ApiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest { + return ApiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest{ + ApiService: a, + ctx: ctx, + observableId: observableId, + } +} + +// Execute executes the request +// +// @return ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost +func (a *ObservablesAPIService) DeleteContextApiV2ObservablesObservableIdContextDeletePostExecute(r ApiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest) (*ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.DeleteContextApiV2ObservablesObservableIdContextDeletePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/{observable_id}/context/delete" + localVarPath = strings.Replace(localVarPath, "{"+"observable_id"+"}", url.PathEscape(parameterValueToString(r.observableId, "observableId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.deleteContextRequest == nil { + return localVarReturnValue, nil, reportError("deleteContextRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.deleteContextRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDetailsApiV2ObservablesObservableIdGetRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + observableId interface{} +} + +func (r ApiDetailsApiV2ObservablesObservableIdGetRequest) Execute() (*ResponseDetailsApiV2ObservablesObservableIdGet, *http.Response, error) { + return r.ApiService.DetailsApiV2ObservablesObservableIdGetExecute(r) +} + +/* +DetailsApiV2ObservablesObservableIdGet Details + +Returns details about an observable. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param observableId + @return ApiDetailsApiV2ObservablesObservableIdGetRequest +*/ +func (a *ObservablesAPIService) DetailsApiV2ObservablesObservableIdGet(ctx context.Context, observableId interface{}) ApiDetailsApiV2ObservablesObservableIdGetRequest { + return ApiDetailsApiV2ObservablesObservableIdGetRequest{ + ApiService: a, + ctx: ctx, + observableId: observableId, + } +} + +// Execute executes the request +// +// @return ResponseDetailsApiV2ObservablesObservableIdGet +func (a *ObservablesAPIService) DetailsApiV2ObservablesObservableIdGetExecute(r ApiDetailsApiV2ObservablesObservableIdGetRequest) (*ResponseDetailsApiV2ObservablesObservableIdGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDetailsApiV2ObservablesObservableIdGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.DetailsApiV2ObservablesObservableIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/{observable_id}" + localVarPath = strings.Replace(localVarPath, "{"+"observable_id"+"}", url.PathEscape(parameterValueToString(r.observableId, "observableId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiNewApiV2ObservablesPostRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + newObservableRequest *NewObservableRequest +} + +func (r ApiNewApiV2ObservablesPostRequest) NewObservableRequest(newObservableRequest NewObservableRequest) ApiNewApiV2ObservablesPostRequest { + r.newObservableRequest = &newObservableRequest + return r +} + +func (r ApiNewApiV2ObservablesPostRequest) Execute() (*ResponseNewApiV2ObservablesPost, *http.Response, error) { + return r.ApiService.NewApiV2ObservablesPostExecute(r) +} + +/* +NewApiV2ObservablesPost New + +Creates a new observable in the database. + +Raises: + + HTTPException(400) if observable already exists. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiNewApiV2ObservablesPostRequest +*/ +func (a *ObservablesAPIService) NewApiV2ObservablesPost(ctx context.Context) ApiNewApiV2ObservablesPostRequest { + return ApiNewApiV2ObservablesPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ResponseNewApiV2ObservablesPost +func (a *ObservablesAPIService) NewApiV2ObservablesPostExecute(r ApiNewApiV2ObservablesPostRequest) (*ResponseNewApiV2ObservablesPost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseNewApiV2ObservablesPost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.NewApiV2ObservablesPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newObservableRequest == nil { + return localVarReturnValue, nil, reportError("newObservableRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newObservableRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiNewExtendedApiV2ObservablesExtendedPostRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + newExtendedObservableRequest *NewExtendedObservableRequest +} + +func (r ApiNewExtendedApiV2ObservablesExtendedPostRequest) NewExtendedObservableRequest(newExtendedObservableRequest NewExtendedObservableRequest) ApiNewExtendedApiV2ObservablesExtendedPostRequest { + r.newExtendedObservableRequest = &newExtendedObservableRequest + return r +} + +func (r ApiNewExtendedApiV2ObservablesExtendedPostRequest) Execute() (*ResponseNewExtendedApiV2ObservablesExtendedPost, *http.Response, error) { + return r.ApiService.NewExtendedApiV2ObservablesExtendedPostExecute(r) +} + +/* +NewExtendedApiV2ObservablesExtendedPost New Extended + +Creates a new observable in the database with extended properties. + +Raises: + + HTTPException(400) if observable already exists. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiNewExtendedApiV2ObservablesExtendedPostRequest +*/ +func (a *ObservablesAPIService) NewExtendedApiV2ObservablesExtendedPost(ctx context.Context) ApiNewExtendedApiV2ObservablesExtendedPostRequest { + return ApiNewExtendedApiV2ObservablesExtendedPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ResponseNewExtendedApiV2ObservablesExtendedPost +func (a *ObservablesAPIService) NewExtendedApiV2ObservablesExtendedPostExecute(r ApiNewExtendedApiV2ObservablesExtendedPostRequest) (*ResponseNewExtendedApiV2ObservablesExtendedPost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseNewExtendedApiV2ObservablesExtendedPost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.NewExtendedApiV2ObservablesExtendedPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/extended" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newExtendedObservableRequest == nil { + return localVarReturnValue, nil, reportError("newExtendedObservableRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newExtendedObservableRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiObservablesRootApiV2ObservablesGetRequest struct { + ctx context.Context + ApiService *ObservablesAPIService +} + +func (r ApiObservablesRootApiV2ObservablesGetRequest) Execute() ([]Observable, *http.Response, error) { + return r.ApiService.ObservablesRootApiV2ObservablesGetExecute(r) +} + +/* +ObservablesRootApiV2ObservablesGet Observables Root + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiObservablesRootApiV2ObservablesGetRequest +*/ +func (a *ObservablesAPIService) ObservablesRootApiV2ObservablesGet(ctx context.Context) ApiObservablesRootApiV2ObservablesGetRequest { + return ApiObservablesRootApiV2ObservablesGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []Observable +func (a *ObservablesAPIService) ObservablesRootApiV2ObservablesGetExecute(r ApiObservablesRootApiV2ObservablesGetRequest) ([]Observable, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Observable + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.ObservablesRootApiV2ObservablesGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPatchApiV2ObservablesObservableIdPatchRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + observableId interface{} + patchObservableRequest *PatchObservableRequest +} + +func (r ApiPatchApiV2ObservablesObservableIdPatchRequest) PatchObservableRequest(patchObservableRequest PatchObservableRequest) ApiPatchApiV2ObservablesObservableIdPatchRequest { + r.patchObservableRequest = &patchObservableRequest + return r +} + +func (r ApiPatchApiV2ObservablesObservableIdPatchRequest) Execute() (*ResponsePatchApiV2ObservablesObservableIdPatch, *http.Response, error) { + return r.ApiService.PatchApiV2ObservablesObservableIdPatchExecute(r) +} + +/* +PatchApiV2ObservablesObservableIdPatch Patch + +Modifies observable in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param observableId + @return ApiPatchApiV2ObservablesObservableIdPatchRequest +*/ +func (a *ObservablesAPIService) PatchApiV2ObservablesObservableIdPatch(ctx context.Context, observableId interface{}) ApiPatchApiV2ObservablesObservableIdPatchRequest { + return ApiPatchApiV2ObservablesObservableIdPatchRequest{ + ApiService: a, + ctx: ctx, + observableId: observableId, + } +} + +// Execute executes the request +// +// @return ResponsePatchApiV2ObservablesObservableIdPatch +func (a *ObservablesAPIService) PatchApiV2ObservablesObservableIdPatchExecute(r ApiPatchApiV2ObservablesObservableIdPatchRequest) (*ResponsePatchApiV2ObservablesObservableIdPatch, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePatchApiV2ObservablesObservableIdPatch + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.PatchApiV2ObservablesObservableIdPatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/{observable_id}" + localVarPath = strings.Replace(localVarPath, "{"+"observable_id"+"}", url.PathEscape(parameterValueToString(r.observableId, "observableId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchObservableRequest == nil { + return localVarReturnValue, nil, reportError("patchObservableRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchObservableRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2ObservablesSearchPostRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + observableSearchRequest *ObservableSearchRequest +} + +func (r ApiSearchApiV2ObservablesSearchPostRequest) ObservableSearchRequest(observableSearchRequest ObservableSearchRequest) ApiSearchApiV2ObservablesSearchPostRequest { + r.observableSearchRequest = &observableSearchRequest + return r +} + +func (r ApiSearchApiV2ObservablesSearchPostRequest) Execute() (*ObservableSearchResponse, *http.Response, error) { + return r.ApiService.SearchApiV2ObservablesSearchPostExecute(r) +} + +/* +SearchApiV2ObservablesSearchPost Search + +Searches for observables. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2ObservablesSearchPostRequest +*/ +func (a *ObservablesAPIService) SearchApiV2ObservablesSearchPost(ctx context.Context) ApiSearchApiV2ObservablesSearchPostRequest { + return ApiSearchApiV2ObservablesSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ObservableSearchResponse +func (a *ObservablesAPIService) SearchApiV2ObservablesSearchPostExecute(r ApiSearchApiV2ObservablesSearchPostRequest) (*ObservableSearchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObservableSearchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.SearchApiV2ObservablesSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.observableSearchRequest == nil { + return localVarReturnValue, nil, reportError("observableSearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.observableSearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTagObservableApiV2ObservablesTagPostRequest struct { + ctx context.Context + ApiService *ObservablesAPIService + observableTagRequest *ObservableTagRequest +} + +func (r ApiTagObservableApiV2ObservablesTagPostRequest) ObservableTagRequest(observableTagRequest ObservableTagRequest) ApiTagObservableApiV2ObservablesTagPostRequest { + r.observableTagRequest = &observableTagRequest + return r +} + +func (r ApiTagObservableApiV2ObservablesTagPostRequest) Execute() (*ObservableTagResponse, *http.Response, error) { + return r.ApiService.TagObservableApiV2ObservablesTagPostExecute(r) +} + +/* +TagObservableApiV2ObservablesTagPost Tag Observable + +Tags a set of observables, individually or in bulk. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTagObservableApiV2ObservablesTagPostRequest +*/ +func (a *ObservablesAPIService) TagObservableApiV2ObservablesTagPost(ctx context.Context) ApiTagObservableApiV2ObservablesTagPostRequest { + return ApiTagObservableApiV2ObservablesTagPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ObservableTagResponse +func (a *ObservablesAPIService) TagObservableApiV2ObservablesTagPostExecute(r ApiTagObservableApiV2ObservablesTagPostRequest) (*ObservableTagResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObservableTagResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservablesAPIService.TagObservableApiV2ObservablesTagPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/observables/tag" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.observableTagRequest == nil { + return localVarReturnValue, nil, reportError("observableTagRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.observableTagRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_system.go b/api_system.go new file mode 100644 index 0000000..6548996 --- /dev/null +++ b/api_system.go @@ -0,0 +1,335 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SystemAPIService SystemAPI service +type SystemAPIService service + +type ApiGetConfigApiV2SystemConfigGetRequest struct { + ctx context.Context + ApiService *SystemAPIService +} + +func (r ApiGetConfigApiV2SystemConfigGetRequest) Execute() (*SystemConfigResponse, *http.Response, error) { + return r.ApiService.GetConfigApiV2SystemConfigGetExecute(r) +} + +/* +GetConfigApiV2SystemConfigGet Get Config + +Gets the system config. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetConfigApiV2SystemConfigGetRequest +*/ +func (a *SystemAPIService) GetConfigApiV2SystemConfigGet(ctx context.Context) ApiGetConfigApiV2SystemConfigGetRequest { + return ApiGetConfigApiV2SystemConfigGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SystemConfigResponse +func (a *SystemAPIService) GetConfigApiV2SystemConfigGetExecute(r ApiGetConfigApiV2SystemConfigGetRequest) (*SystemConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SystemConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemAPIService.GetConfigApiV2SystemConfigGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/system/config" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetWorkerStatusApiV2SystemWorkersGetRequest struct { + ctx context.Context + ApiService *SystemAPIService +} + +func (r ApiGetWorkerStatusApiV2SystemWorkersGetRequest) Execute() (*WorkerStatusResponse, *http.Response, error) { + return r.ApiService.GetWorkerStatusApiV2SystemWorkersGetExecute(r) +} + +/* +GetWorkerStatusApiV2SystemWorkersGet Get Worker Status + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetWorkerStatusApiV2SystemWorkersGetRequest +*/ +func (a *SystemAPIService) GetWorkerStatusApiV2SystemWorkersGet(ctx context.Context) ApiGetWorkerStatusApiV2SystemWorkersGetRequest { + return ApiGetWorkerStatusApiV2SystemWorkersGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return WorkerStatusResponse +func (a *SystemAPIService) GetWorkerStatusApiV2SystemWorkersGetExecute(r ApiGetWorkerStatusApiV2SystemWorkersGetRequest) (*WorkerStatusResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkerStatusResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemAPIService.GetWorkerStatusApiV2SystemWorkersGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/system/workers" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRestartWorkerApiV2SystemRestartworkerWorkerNamePostRequest struct { + ctx context.Context + ApiService *SystemAPIService + workerName string +} + +func (r ApiRestartWorkerApiV2SystemRestartworkerWorkerNamePostRequest) Execute() (*WorkerRestartResponse, *http.Response, error) { + return r.ApiService.RestartWorkerApiV2SystemRestartworkerWorkerNamePostExecute(r) +} + +/* +RestartWorkerApiV2SystemRestartworkerWorkerNamePost Restart Worker + +Restarts a single or all Celery workers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workerName + @return ApiRestartWorkerApiV2SystemRestartworkerWorkerNamePostRequest +*/ +func (a *SystemAPIService) RestartWorkerApiV2SystemRestartworkerWorkerNamePost(ctx context.Context, workerName string) ApiRestartWorkerApiV2SystemRestartworkerWorkerNamePostRequest { + return ApiRestartWorkerApiV2SystemRestartworkerWorkerNamePostRequest{ + ApiService: a, + ctx: ctx, + workerName: workerName, + } +} + +// Execute executes the request +// +// @return WorkerRestartResponse +func (a *SystemAPIService) RestartWorkerApiV2SystemRestartworkerWorkerNamePostExecute(r ApiRestartWorkerApiV2SystemRestartworkerWorkerNamePostRequest) (*WorkerRestartResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkerRestartResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemAPIService.RestartWorkerApiV2SystemRestartworkerWorkerNamePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/system/restartworker/{worker_name}" + localVarPath = strings.Replace(localVarPath, "{"+"worker_name"+"}", url.PathEscape(parameterValueToString(r.workerName, "workerName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_tags.go b/api_tags.go new file mode 100644 index 0000000..b84fc9f --- /dev/null +++ b/api_tags.go @@ -0,0 +1,737 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// TagsAPIService TagsAPI service +type TagsAPIService service + +type ApiDeleteApiV2TagsTagIdDeleteRequest struct { + ctx context.Context + ApiService *TagsAPIService + tagId string +} + +func (r ApiDeleteApiV2TagsTagIdDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.DeleteApiV2TagsTagIdDeleteExecute(r) +} + +/* +DeleteApiV2TagsTagIdDelete Delete + +Deletes a Tag. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tagId + @return ApiDeleteApiV2TagsTagIdDeleteRequest +*/ +func (a *TagsAPIService) DeleteApiV2TagsTagIdDelete(ctx context.Context, tagId string) ApiDeleteApiV2TagsTagIdDeleteRequest { + return ApiDeleteApiV2TagsTagIdDeleteRequest{ + ApiService: a, + ctx: ctx, + tagId: tagId, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *TagsAPIService) DeleteApiV2TagsTagIdDeleteExecute(r ApiDeleteApiV2TagsTagIdDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.DeleteApiV2TagsTagIdDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tags/{tag_id}" + localVarPath = strings.Replace(localVarPath, "{"+"tag_id"+"}", url.PathEscape(parameterValueToString(r.tagId, "tagId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDetailsApiV2TagsTagIdGetRequest struct { + ctx context.Context + ApiService *TagsAPIService + tagId string +} + +func (r ApiDetailsApiV2TagsTagIdGetRequest) Execute() (*Tag, *http.Response, error) { + return r.ApiService.DetailsApiV2TagsTagIdGetExecute(r) +} + +/* +DetailsApiV2TagsTagIdGet Details + +Returns details about a Tag. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tagId + @return ApiDetailsApiV2TagsTagIdGetRequest +*/ +func (a *TagsAPIService) DetailsApiV2TagsTagIdGet(ctx context.Context, tagId string) ApiDetailsApiV2TagsTagIdGetRequest { + return ApiDetailsApiV2TagsTagIdGetRequest{ + ApiService: a, + ctx: ctx, + tagId: tagId, + } +} + +// Execute executes the request +// +// @return Tag +func (a *TagsAPIService) DetailsApiV2TagsTagIdGetExecute(r ApiDetailsApiV2TagsTagIdGetRequest) (*Tag, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Tag + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.DetailsApiV2TagsTagIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tags/{tag_id}" + localVarPath = strings.Replace(localVarPath, "{"+"tag_id"+"}", url.PathEscape(parameterValueToString(r.tagId, "tagId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiMergeApiV2TagsMergePostRequest struct { + ctx context.Context + ApiService *TagsAPIService + mergeTagRequest *MergeTagRequest +} + +func (r ApiMergeApiV2TagsMergePostRequest) MergeTagRequest(mergeTagRequest MergeTagRequest) ApiMergeApiV2TagsMergePostRequest { + r.mergeTagRequest = &mergeTagRequest + return r +} + +func (r ApiMergeApiV2TagsMergePostRequest) Execute() (*MergeTagResult, *http.Response, error) { + return r.ApiService.MergeApiV2TagsMergePostExecute(r) +} + +/* +MergeApiV2TagsMergePost Merge + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiMergeApiV2TagsMergePostRequest +*/ +func (a *TagsAPIService) MergeApiV2TagsMergePost(ctx context.Context) ApiMergeApiV2TagsMergePostRequest { + return ApiMergeApiV2TagsMergePostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return MergeTagResult +func (a *TagsAPIService) MergeApiV2TagsMergePostExecute(r ApiMergeApiV2TagsMergePostRequest) (*MergeTagResult, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MergeTagResult + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.MergeApiV2TagsMergePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tags/merge" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mergeTagRequest == nil { + return localVarReturnValue, nil, reportError("mergeTagRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mergeTagRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiNewApiV2TagsPostRequest struct { + ctx context.Context + ApiService *TagsAPIService + newRequest *NewRequest +} + +func (r ApiNewApiV2TagsPostRequest) NewRequest(newRequest NewRequest) ApiNewApiV2TagsPostRequest { + r.newRequest = &newRequest + return r +} + +func (r ApiNewApiV2TagsPostRequest) Execute() (*Tag, *http.Response, error) { + return r.ApiService.NewApiV2TagsPostExecute(r) +} + +/* +NewApiV2TagsPost New + +Creates a new observable in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiNewApiV2TagsPostRequest +*/ +func (a *TagsAPIService) NewApiV2TagsPost(ctx context.Context) ApiNewApiV2TagsPostRequest { + return ApiNewApiV2TagsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Tag +func (a *TagsAPIService) NewApiV2TagsPostExecute(r ApiNewApiV2TagsPostRequest) (*Tag, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Tag + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.NewApiV2TagsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tags/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newRequest == nil { + return localVarReturnValue, nil, reportError("newRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2TagsSearchPostRequest struct { + ctx context.Context + ApiService *TagsAPIService + tagSearchRequest *TagSearchRequest +} + +func (r ApiSearchApiV2TagsSearchPostRequest) TagSearchRequest(tagSearchRequest TagSearchRequest) ApiSearchApiV2TagsSearchPostRequest { + r.tagSearchRequest = &tagSearchRequest + return r +} + +func (r ApiSearchApiV2TagsSearchPostRequest) Execute() (*TagSearchResponse, *http.Response, error) { + return r.ApiService.SearchApiV2TagsSearchPostExecute(r) +} + +/* +SearchApiV2TagsSearchPost Search + +Searches for Tags. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2TagsSearchPostRequest +*/ +func (a *TagsAPIService) SearchApiV2TagsSearchPost(ctx context.Context) ApiSearchApiV2TagsSearchPostRequest { + return ApiSearchApiV2TagsSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TagSearchResponse +func (a *TagsAPIService) SearchApiV2TagsSearchPostExecute(r ApiSearchApiV2TagsSearchPostRequest) (*TagSearchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TagSearchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.SearchApiV2TagsSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tags/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.tagSearchRequest == nil { + return localVarReturnValue, nil, reportError("tagSearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.tagSearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateApiV2TagsTagIdPutRequest struct { + ctx context.Context + ApiService *TagsAPIService + tagId string + updateRequest *UpdateRequest +} + +func (r ApiUpdateApiV2TagsTagIdPutRequest) UpdateRequest(updateRequest UpdateRequest) ApiUpdateApiV2TagsTagIdPutRequest { + r.updateRequest = &updateRequest + return r +} + +func (r ApiUpdateApiV2TagsTagIdPutRequest) Execute() (*Tag, *http.Response, error) { + return r.ApiService.UpdateApiV2TagsTagIdPutExecute(r) +} + +/* +UpdateApiV2TagsTagIdPut Update + +Updates an observable. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tagId + @return ApiUpdateApiV2TagsTagIdPutRequest +*/ +func (a *TagsAPIService) UpdateApiV2TagsTagIdPut(ctx context.Context, tagId string) ApiUpdateApiV2TagsTagIdPutRequest { + return ApiUpdateApiV2TagsTagIdPutRequest{ + ApiService: a, + ctx: ctx, + tagId: tagId, + } +} + +// Execute executes the request +// +// @return Tag +func (a *TagsAPIService) UpdateApiV2TagsTagIdPutExecute(r ApiUpdateApiV2TagsTagIdPutRequest) (*Tag, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Tag + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.UpdateApiV2TagsTagIdPut") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tags/{tag_id}" + localVarPath = strings.Replace(localVarPath, "{"+"tag_id"+"}", url.PathEscape(parameterValueToString(r.tagId, "tagId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateRequest == nil { + return localVarReturnValue, nil, reportError("updateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_tasks.go b/api_tasks.go new file mode 100644 index 0000000..0357c88 --- /dev/null +++ b/api_tasks.go @@ -0,0 +1,854 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// TasksAPIService TasksAPI service +type TasksAPIService service + +type ApiDeleteExportApiV2TasksExportExportNameDeleteRequest struct { + ctx context.Context + ApiService *TasksAPIService + exportName string +} + +func (r ApiDeleteExportApiV2TasksExportExportNameDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.DeleteExportApiV2TasksExportExportNameDeleteExecute(r) +} + +/* +DeleteExportApiV2TasksExportExportNameDelete Delete Export + +Deletes an ExportTask. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param exportName + @return ApiDeleteExportApiV2TasksExportExportNameDeleteRequest +*/ +func (a *TasksAPIService) DeleteExportApiV2TasksExportExportNameDelete(ctx context.Context, exportName string) ApiDeleteExportApiV2TasksExportExportNameDeleteRequest { + return ApiDeleteExportApiV2TasksExportExportNameDeleteRequest{ + ApiService: a, + ctx: ctx, + exportName: exportName, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *TasksAPIService) DeleteExportApiV2TasksExportExportNameDeleteExecute(r ApiDeleteExportApiV2TasksExportExportNameDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.DeleteExportApiV2TasksExportExportNameDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tasks/export/{export_name}" + localVarPath = strings.Replace(localVarPath, "{"+"export_name"+"}", url.PathEscape(parameterValueToString(r.exportName, "exportName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportContentApiV2TasksExportExportIdContentGetRequest struct { + ctx context.Context + ApiService *TasksAPIService + exportId string +} + +func (r ApiExportContentApiV2TasksExportExportIdContentGetRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.ExportContentApiV2TasksExportExportIdContentGetExecute(r) +} + +/* +ExportContentApiV2TasksExportExportIdContentGet Export Content + +Downloads the latest contents of a given ExportTask. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param exportId + @return ApiExportContentApiV2TasksExportExportIdContentGetRequest +*/ +func (a *TasksAPIService) ExportContentApiV2TasksExportExportIdContentGet(ctx context.Context, exportId string) ApiExportContentApiV2TasksExportExportIdContentGetRequest { + return ApiExportContentApiV2TasksExportExportIdContentGetRequest{ + ApiService: a, + ctx: ctx, + exportId: exportId, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *TasksAPIService) ExportContentApiV2TasksExportExportIdContentGetExecute(r ApiExportContentApiV2TasksExportExportIdContentGetRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.ExportContentApiV2TasksExportExportIdContentGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tasks/export/{export_id}/content" + localVarPath = strings.Replace(localVarPath, "{"+"export_id"+"}", url.PathEscape(parameterValueToString(r.exportId, "exportId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiNewExportApiV2TasksExportNewPostRequest struct { + ctx context.Context + ApiService *TasksAPIService + newExportRequest *NewExportRequest +} + +func (r ApiNewExportApiV2TasksExportNewPostRequest) NewExportRequest(newExportRequest NewExportRequest) ApiNewExportApiV2TasksExportNewPostRequest { + r.newExportRequest = &newExportRequest + return r +} + +func (r ApiNewExportApiV2TasksExportNewPostRequest) Execute() (*ExportTaskOutput, *http.Response, error) { + return r.ApiService.NewExportApiV2TasksExportNewPostExecute(r) +} + +/* +NewExportApiV2TasksExportNewPost New Export + +Creates a new ExportTask in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiNewExportApiV2TasksExportNewPostRequest +*/ +func (a *TasksAPIService) NewExportApiV2TasksExportNewPost(ctx context.Context) ApiNewExportApiV2TasksExportNewPostRequest { + return ApiNewExportApiV2TasksExportNewPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ExportTaskOutput +func (a *TasksAPIService) NewExportApiV2TasksExportNewPostExecute(r ApiNewExportApiV2TasksExportNewPostRequest) (*ExportTaskOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportTaskOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.NewExportApiV2TasksExportNewPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tasks/export/new" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newExportRequest == nil { + return localVarReturnValue, nil, reportError("newExportRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newExportRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPatchExportApiV2TasksExportExportNamePatchRequest struct { + ctx context.Context + ApiService *TasksAPIService + exportName string + patchExportRequest *PatchExportRequest +} + +func (r ApiPatchExportApiV2TasksExportExportNamePatchRequest) PatchExportRequest(patchExportRequest PatchExportRequest) ApiPatchExportApiV2TasksExportExportNamePatchRequest { + r.patchExportRequest = &patchExportRequest + return r +} + +func (r ApiPatchExportApiV2TasksExportExportNamePatchRequest) Execute() (*ExportTaskOutput, *http.Response, error) { + return r.ApiService.PatchExportApiV2TasksExportExportNamePatchExecute(r) +} + +/* +PatchExportApiV2TasksExportExportNamePatch Patch Export + +Pathes an existing ExportTask in the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param exportName + @return ApiPatchExportApiV2TasksExportExportNamePatchRequest +*/ +func (a *TasksAPIService) PatchExportApiV2TasksExportExportNamePatch(ctx context.Context, exportName string) ApiPatchExportApiV2TasksExportExportNamePatchRequest { + return ApiPatchExportApiV2TasksExportExportNamePatchRequest{ + ApiService: a, + ctx: ctx, + exportName: exportName, + } +} + +// Execute executes the request +// +// @return ExportTaskOutput +func (a *TasksAPIService) PatchExportApiV2TasksExportExportNamePatchExecute(r ApiPatchExportApiV2TasksExportExportNamePatchRequest) (*ExportTaskOutput, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportTaskOutput + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.PatchExportApiV2TasksExportExportNamePatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tasks/export/{export_name}" + localVarPath = strings.Replace(localVarPath, "{"+"export_name"+"}", url.PathEscape(parameterValueToString(r.exportName, "exportName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchExportRequest == nil { + return localVarReturnValue, nil, reportError("patchExportRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchExportRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRunApiV2TasksTaskNameRunPostRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskName interface{} + taskParams *TaskParams +} + +func (r ApiRunApiV2TasksTaskNameRunPostRequest) TaskParams(taskParams TaskParams) ApiRunApiV2TasksTaskNameRunPostRequest { + r.taskParams = &taskParams + return r +} + +func (r ApiRunApiV2TasksTaskNameRunPostRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.RunApiV2TasksTaskNameRunPostExecute(r) +} + +/* +RunApiV2TasksTaskNameRunPost Run + +Runs a task asynchronously. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskName + @return ApiRunApiV2TasksTaskNameRunPostRequest +*/ +func (a *TasksAPIService) RunApiV2TasksTaskNameRunPost(ctx context.Context, taskName interface{}) ApiRunApiV2TasksTaskNameRunPostRequest { + return ApiRunApiV2TasksTaskNameRunPostRequest{ + ApiService: a, + ctx: ctx, + taskName: taskName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *TasksAPIService) RunApiV2TasksTaskNameRunPostExecute(r ApiRunApiV2TasksTaskNameRunPostRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.RunApiV2TasksTaskNameRunPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tasks/{task_name}/run" + localVarPath = strings.Replace(localVarPath, "{"+"task_name"+"}", url.PathEscape(parameterValueToString(r.taskName, "taskName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.taskParams + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2TasksSearchPostRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskSearchRequest *TaskSearchRequest +} + +func (r ApiSearchApiV2TasksSearchPostRequest) TaskSearchRequest(taskSearchRequest TaskSearchRequest) ApiSearchApiV2TasksSearchPostRequest { + r.taskSearchRequest = &taskSearchRequest + return r +} + +func (r ApiSearchApiV2TasksSearchPostRequest) Execute() (*TaskSearchResponse, *http.Response, error) { + return r.ApiService.SearchApiV2TasksSearchPostExecute(r) +} + +/* +SearchApiV2TasksSearchPost Search + +Searches for tasks. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2TasksSearchPostRequest +*/ +func (a *TasksAPIService) SearchApiV2TasksSearchPost(ctx context.Context) ApiSearchApiV2TasksSearchPostRequest { + return ApiSearchApiV2TasksSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TaskSearchResponse +func (a *TasksAPIService) SearchApiV2TasksSearchPostExecute(r ApiSearchApiV2TasksSearchPostRequest) (*TaskSearchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskSearchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.SearchApiV2TasksSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tasks/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.taskSearchRequest == nil { + return localVarReturnValue, nil, reportError("taskSearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.taskSearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiToggleApiV2TasksTaskNameTogglePostRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskName interface{} +} + +func (r ApiToggleApiV2TasksTaskNameTogglePostRequest) Execute() (*ResponseToggleApiV2TasksTaskNameTogglePost, *http.Response, error) { + return r.ApiService.ToggleApiV2TasksTaskNameTogglePostExecute(r) +} + +/* +ToggleApiV2TasksTaskNameTogglePost Toggle + +Toggles the enabled status on a task. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskName + @return ApiToggleApiV2TasksTaskNameTogglePostRequest +*/ +func (a *TasksAPIService) ToggleApiV2TasksTaskNameTogglePost(ctx context.Context, taskName interface{}) ApiToggleApiV2TasksTaskNameTogglePostRequest { + return ApiToggleApiV2TasksTaskNameTogglePostRequest{ + ApiService: a, + ctx: ctx, + taskName: taskName, + } +} + +// Execute executes the request +// +// @return ResponseToggleApiV2TasksTaskNameTogglePost +func (a *TasksAPIService) ToggleApiV2TasksTaskNameTogglePostExecute(r ApiToggleApiV2TasksTaskNameTogglePostRequest) (*ResponseToggleApiV2TasksTaskNameTogglePost, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseToggleApiV2TasksTaskNameTogglePost + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.ToggleApiV2TasksTaskNameTogglePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/tasks/{task_name}/toggle" + localVarPath = strings.Replace(localVarPath, "{"+"task_name"+"}", url.PathEscape(parameterValueToString(r.taskName, "taskName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_templates.go b/api_templates.go new file mode 100644 index 0000000..81f209e --- /dev/null +++ b/api_templates.go @@ -0,0 +1,264 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + +// TemplatesAPIService TemplatesAPI service +type TemplatesAPIService service + +type ApiRenderApiV2TemplatesRenderPostRequest struct { + ctx context.Context + ApiService *TemplatesAPIService + renderTemplateRequest *RenderTemplateRequest +} + +func (r ApiRenderApiV2TemplatesRenderPostRequest) RenderTemplateRequest(renderTemplateRequest RenderTemplateRequest) ApiRenderApiV2TemplatesRenderPostRequest { + r.renderTemplateRequest = &renderTemplateRequest + return r +} + +func (r ApiRenderApiV2TemplatesRenderPostRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.RenderApiV2TemplatesRenderPostExecute(r) +} + +/* +RenderApiV2TemplatesRenderPost Render + +Renders a template. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRenderApiV2TemplatesRenderPostRequest +*/ +func (a *TemplatesAPIService) RenderApiV2TemplatesRenderPost(ctx context.Context) ApiRenderApiV2TemplatesRenderPostRequest { + return ApiRenderApiV2TemplatesRenderPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *TemplatesAPIService) RenderApiV2TemplatesRenderPostExecute(r ApiRenderApiV2TemplatesRenderPostRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplatesAPIService.RenderApiV2TemplatesRenderPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/templates/render" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.renderTemplateRequest == nil { + return localVarReturnValue, nil, reportError("renderTemplateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.renderTemplateRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2TemplatesSearchPostRequest struct { + ctx context.Context + ApiService *TemplatesAPIService + templateSearchRequest *TemplateSearchRequest +} + +func (r ApiSearchApiV2TemplatesSearchPostRequest) TemplateSearchRequest(templateSearchRequest TemplateSearchRequest) ApiSearchApiV2TemplatesSearchPostRequest { + r.templateSearchRequest = &templateSearchRequest + return r +} + +func (r ApiSearchApiV2TemplatesSearchPostRequest) Execute() (*TemplateSearchResponse, *http.Response, error) { + return r.ApiService.SearchApiV2TemplatesSearchPostExecute(r) +} + +/* +SearchApiV2TemplatesSearchPost Search + +Searches for observables. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2TemplatesSearchPostRequest +*/ +func (a *TemplatesAPIService) SearchApiV2TemplatesSearchPost(ctx context.Context) ApiSearchApiV2TemplatesSearchPostRequest { + return ApiSearchApiV2TemplatesSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TemplateSearchResponse +func (a *TemplatesAPIService) SearchApiV2TemplatesSearchPostExecute(r ApiSearchApiV2TemplatesSearchPostRequest) (*TemplateSearchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateSearchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplatesAPIService.SearchApiV2TemplatesSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/templates/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateSearchRequest == nil { + return localVarReturnValue, nil, reportError("templateSearchRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateSearchRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_users.go b/api_users.go new file mode 100644 index 0000000..f68c483 --- /dev/null +++ b/api_users.go @@ -0,0 +1,856 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// UsersAPIService UsersAPI service +type UsersAPIService service + +type ApiCreateApiV2UsersPostRequest struct { + ctx context.Context + ApiService *UsersAPIService + newUserRequest *NewUserRequest +} + +func (r ApiCreateApiV2UsersPostRequest) NewUserRequest(newUserRequest NewUserRequest) ApiCreateApiV2UsersPostRequest { + r.newUserRequest = &newUserRequest + return r +} + +func (r ApiCreateApiV2UsersPostRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.CreateApiV2UsersPostExecute(r) +} + +/* +CreateApiV2UsersPost Create + +Creates a new user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateApiV2UsersPostRequest +*/ +func (a *UsersAPIService) CreateApiV2UsersPost(ctx context.Context) ApiCreateApiV2UsersPostRequest { + return ApiCreateApiV2UsersPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return User +func (a *UsersAPIService) CreateApiV2UsersPostExecute(r ApiCreateApiV2UsersPostRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.CreateApiV2UsersPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/users/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.newUserRequest == nil { + return localVarReturnValue, nil, reportError("newUserRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newUserRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteApiV2UsersUserIdDeleteRequest struct { + ctx context.Context + ApiService *UsersAPIService + userId string +} + +func (r ApiDeleteApiV2UsersUserIdDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.DeleteApiV2UsersUserIdDeleteExecute(r) +} + +/* +DeleteApiV2UsersUserIdDelete Delete + +Deletes a user from the database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId + @return ApiDeleteApiV2UsersUserIdDeleteRequest +*/ +func (a *UsersAPIService) DeleteApiV2UsersUserIdDelete(ctx context.Context, userId string) ApiDeleteApiV2UsersUserIdDeleteRequest { + return ApiDeleteApiV2UsersUserIdDeleteRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *UsersAPIService) DeleteApiV2UsersUserIdDeleteExecute(r ApiDeleteApiV2UsersUserIdDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.DeleteApiV2UsersUserIdDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetApiV2UsersUserIdGetRequest struct { + ctx context.Context + ApiService *UsersAPIService + userId string +} + +func (r ApiGetApiV2UsersUserIdGetRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.GetApiV2UsersUserIdGetExecute(r) +} + +/* +GetApiV2UsersUserIdGet Get + +Gets a user by ID. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId + @return ApiGetApiV2UsersUserIdGetRequest +*/ +func (a *UsersAPIService) GetApiV2UsersUserIdGet(ctx context.Context, userId string) ApiGetApiV2UsersUserIdGetRequest { + return ApiGetApiV2UsersUserIdGetRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// +// @return User +func (a *UsersAPIService) GetApiV2UsersUserIdGetExecute(r ApiGetApiV2UsersUserIdGetRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.GetApiV2UsersUserIdGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiResetApiKeyApiV2UsersResetApiKeyPostRequest struct { + ctx context.Context + ApiService *UsersAPIService + resetApiKeyRequest *ResetApiKeyRequest +} + +func (r ApiResetApiKeyApiV2UsersResetApiKeyPostRequest) ResetApiKeyRequest(resetApiKeyRequest ResetApiKeyRequest) ApiResetApiKeyApiV2UsersResetApiKeyPostRequest { + r.resetApiKeyRequest = &resetApiKeyRequest + return r +} + +func (r ApiResetApiKeyApiV2UsersResetApiKeyPostRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ResetApiKeyApiV2UsersResetApiKeyPostExecute(r) +} + +/* +ResetApiKeyApiV2UsersResetApiKeyPost Reset Api Key + +Resets a user's API key. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiResetApiKeyApiV2UsersResetApiKeyPostRequest +*/ +func (a *UsersAPIService) ResetApiKeyApiV2UsersResetApiKeyPost(ctx context.Context) ApiResetApiKeyApiV2UsersResetApiKeyPostRequest { + return ApiResetApiKeyApiV2UsersResetApiKeyPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return User +func (a *UsersAPIService) ResetApiKeyApiV2UsersResetApiKeyPostExecute(r ApiResetApiKeyApiV2UsersResetApiKeyPostRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.ResetApiKeyApiV2UsersResetApiKeyPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/users/reset-api-key" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resetApiKeyRequest == nil { + return localVarReturnValue, nil, reportError("resetApiKeyRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resetApiKeyRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiResetPasswordApiV2UsersResetPasswordPostRequest struct { + ctx context.Context + ApiService *UsersAPIService + resetPasswordRequest *ResetPasswordRequest +} + +func (r ApiResetPasswordApiV2UsersResetPasswordPostRequest) ResetPasswordRequest(resetPasswordRequest ResetPasswordRequest) ApiResetPasswordApiV2UsersResetPasswordPostRequest { + r.resetPasswordRequest = &resetPasswordRequest + return r +} + +func (r ApiResetPasswordApiV2UsersResetPasswordPostRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ResetPasswordApiV2UsersResetPasswordPostExecute(r) +} + +/* +ResetPasswordApiV2UsersResetPasswordPost Reset Password + +Resets a user's password. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiResetPasswordApiV2UsersResetPasswordPostRequest +*/ +func (a *UsersAPIService) ResetPasswordApiV2UsersResetPasswordPost(ctx context.Context) ApiResetPasswordApiV2UsersResetPasswordPostRequest { + return ApiResetPasswordApiV2UsersResetPasswordPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return User +func (a *UsersAPIService) ResetPasswordApiV2UsersResetPasswordPostExecute(r ApiResetPasswordApiV2UsersResetPasswordPostRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.ResetPasswordApiV2UsersResetPasswordPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/users/reset-password" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resetPasswordRequest == nil { + return localVarReturnValue, nil, reportError("resetPasswordRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resetPasswordRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSearchApiV2UsersSearchPostRequest struct { + ctx context.Context + ApiService *UsersAPIService + searchUserRequest *SearchUserRequest +} + +func (r ApiSearchApiV2UsersSearchPostRequest) SearchUserRequest(searchUserRequest SearchUserRequest) ApiSearchApiV2UsersSearchPostRequest { + r.searchUserRequest = &searchUserRequest + return r +} + +func (r ApiSearchApiV2UsersSearchPostRequest) Execute() (*SearchUserResponse, *http.Response, error) { + return r.ApiService.SearchApiV2UsersSearchPostExecute(r) +} + +/* +SearchApiV2UsersSearchPost Search + +Searches for users. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchApiV2UsersSearchPostRequest +*/ +func (a *UsersAPIService) SearchApiV2UsersSearchPost(ctx context.Context) ApiSearchApiV2UsersSearchPostRequest { + return ApiSearchApiV2UsersSearchPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SearchUserResponse +func (a *UsersAPIService) SearchApiV2UsersSearchPostExecute(r ApiSearchApiV2UsersSearchPostRequest) (*SearchUserResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SearchUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.SearchApiV2UsersSearchPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/users/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.searchUserRequest == nil { + return localVarReturnValue, nil, reportError("searchUserRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.searchUserRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiToggleApiV2UsersTogglePostRequest struct { + ctx context.Context + ApiService *UsersAPIService + toggleUserRequest *ToggleUserRequest +} + +func (r ApiToggleApiV2UsersTogglePostRequest) ToggleUserRequest(toggleUserRequest ToggleUserRequest) ApiToggleApiV2UsersTogglePostRequest { + r.toggleUserRequest = &toggleUserRequest + return r +} + +func (r ApiToggleApiV2UsersTogglePostRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ToggleApiV2UsersTogglePostExecute(r) +} + +/* +ToggleApiV2UsersTogglePost Toggle + +Toggles a user's enabled or admin state. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiToggleApiV2UsersTogglePostRequest +*/ +func (a *UsersAPIService) ToggleApiV2UsersTogglePost(ctx context.Context) ApiToggleApiV2UsersTogglePostRequest { + return ApiToggleApiV2UsersTogglePostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return User +func (a *UsersAPIService) ToggleApiV2UsersTogglePostExecute(r ApiToggleApiV2UsersTogglePostRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.ToggleApiV2UsersTogglePost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/users/toggle" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.toggleUserRequest == nil { + return localVarReturnValue, nil, reportError("toggleUserRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.toggleUserRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/client.go b/client.go index 8619155..a855a2f 100644 --- a/client.go +++ b/client.go @@ -1,193 +1,700 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package goyeti import ( "bytes" - "crypto/tls" + "context" "encoding/json" + "encoding/xml" + "errors" "fmt" "io" + "log" + "mime/multipart" "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) - "github.com/mitchellh/mapstructure" - "github.com/yeti-platform/goyeti/models" +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -var _ models.ClientI = (*YetiClient)(nil) +// APIClient manages communication with the FastAPI API v0.1.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AuthAPI *AuthAPIService + + DfiqAPI *DfiqAPIService + + EntitiesAPI *EntitiesAPIService + + GraphAPI *GraphAPIService + + ImportDataAPI *ImportDataAPIService + + ImportMispJsonAPI *ImportMispJsonAPIService + + IndicatorsAPI *IndicatorsAPIService + + ObservablesAPI *ObservablesAPIService + + SystemAPI *SystemAPIService + + TagsAPI *TagsAPIService + + TasksAPI *TasksAPIService + + TemplatesAPI *TemplatesAPIService + + UsersAPI *UsersAPIService +} -type YetiClient struct { - models.ClientConfig - url string - client *http.Client - apikey string - token string - headers http.Header +type service struct { + client *APIClient } -func NewYetiClient(host string, port int, apikey string) *YetiClient { - return &YetiClient{ - ClientConfig: models.ClientConfig{ - Host: host, - Port: port, - Timeout: time.Second * 5, - Proto: "https", - }, - apikey: apikey, +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AuthAPI = (*AuthAPIService)(&c.common) + c.DfiqAPI = (*DfiqAPIService)(&c.common) + c.EntitiesAPI = (*EntitiesAPIService)(&c.common) + c.GraphAPI = (*GraphAPIService)(&c.common) + c.ImportDataAPI = (*ImportDataAPIService)(&c.common) + c.ImportMispJsonAPI = (*ImportMispJsonAPIService)(&c.common) + c.IndicatorsAPI = (*IndicatorsAPIService)(&c.common) + c.ObservablesAPI = (*ObservablesAPIService)(&c.common) + c.SystemAPI = (*SystemAPIService)(&c.common) + c.TagsAPI = (*TagsAPIService)(&c.common) + c.TasksAPI = (*TasksAPIService)(&c.common) + c.TemplatesAPI = (*TemplatesAPIService)(&c.common) + c.UsersAPI = (*UsersAPIService)(&c.common) + + return c } -func parseResponse(res *http.Response, receiver *map[string]interface{}) error { - resBody, err := io.ReadAll(res.Body) - if err != nil { - return fmt.Errorf("could not parse response body: %w", err) +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" } - err = json.Unmarshal(resBody, receiver) - if err != nil { - return fmt.Errorf("could not unmarshal response body: %w", err) + if contains(contentTypes, "application/json") { + return "application/json" } - return nil + return contentTypes[0] // use the first content type specified in 'consumes' } -func (c *YetiClient) doRequest(method string, endpoint string, header http.Header, data []byte) (*http.Response, error) { - var body io.Reader +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } - if data != nil { - body = bytes.NewBuffer(data) + if contains(accepts, "application/json") { + return "application/json" } - req, err := http.NewRequest(method, fmt.Sprintf("%s/%s", c.url, endpoint), body) - if err != nil { - return nil, fmt.Errorf("could not create request: %w", err) + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } } - for k, v := range header { - req.Header.Add(k, v[0]) + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil } - res, err := c.client.Do(req) - if err != nil { - return nil, fmt.Errorf("could not send request: %w", err) + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) } - if res.StatusCode != http.StatusOK { - return res, fmt.Errorf("received bad status: %s", res.Status) + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) } - return res, nil + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) } -func (c *YetiClient) getToken() (string, error) { - var authResponse models.ServerResponseAuth +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} - res, err := c.Query("api/v2/auth/api-token", http.MethodPost, nil) +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) if err != nil { return "", err } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } - err = mapstructure.Decode(res, &authResponse) + resp, err := c.cfg.HTTPClient.Do(request) if err != nil { - return "", err + return resp, err } - return authResponse.AccessToken, nil + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string } -func (c *YetiClient) checkAuth(token string) (bool, error) { - res, err := c.Query("api/v2/auth/me", http.MethodGet, nil) +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) if err != nil { - return false, err + return nil, err } - return len(res) != 0, nil -} -func (c *YetiClient) Init() error { - c.url = fmt.Sprintf("%s://%s:%d", c.Proto, c.Host, c.Port) - c.client = &http.Client{ - Transport: &http.Transport{ - MaxIdleConns: 10, - IdleConnTimeout: 30 * time.Second, - Proxy: http.ProxyFromEnvironment, - TLSClientConfig: &tls.Config{InsecureSkipVerify: false}, - }, - Timeout: c.Timeout, + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme } - return c.init() -} -func (c *YetiClient) init() error { - c.headers = http.Header{ - "Content-Type": []string{"application/json"}, - "x-yeti-apikey": []string{c.apikey}, + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) } - token, err := c.getToken() if err != nil { - return fmt.Errorf("could not authenticate: %w", err) + return nil, err } - c.token = token - c.headers.Add("authorization", fmt.Sprintf("Bearer %s", c.token)) - authed, err := c.checkAuth(c.token) - if err != nil || !authed { - return fmt.Errorf("could not authenticate: %w", err) + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers } - return nil + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil } -func (c *YetiClient) ObservablesSearch(query models.QuerySearch) (models.ServerResponseObservables, error) { - var result models.ServerResponseObservables - if query.Sorting == nil { - query.Sorting = []struct{}{} +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return } - for { - res, err := c.observablesSearch(query) + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) if err != nil { - return result, err + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err } - result.Observables = append(result.Observables, res.Observables...) - result.Total = res.Total - if len(result.Observables) >= res.Total { - break + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err } - query.Page++ + return nil } - return result, nil + return errors.New("undefined response type") } -func (c *YetiClient) observablesSearch(query models.QuerySearch) (models.ServerResponseObservables, error) { - var result models.ServerResponseObservables - body, err := json.Marshal(query) +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) if err != nil { - return result, err + return err } - res, err := c.Query("api/v2/observables/search", http.MethodPost, body) + err = file.Close() if err != nil { - return result, err + return err } - err = mapstructure.Decode(res, &result) + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) if err != nil { - return result, err + return err } - return result, nil + _, err = io.Copy(part, file) + + return err } -func (c *YetiClient) Query(endpoint string, method string, data []byte) (map[string]interface{}, error) { - var result map[string]interface{} +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } - res, err := c.doRequest(method, endpoint, c.headers, data) - if err != nil || res.StatusCode != http.StatusOK { - return result, err + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } } - err = parseResponse(res, &result) + if err != nil { - return result, err + return nil, err } - return result, nil + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil } -func (c *YetiClient) Close() error { - defer c.client.CloseIdleConnections() - res, err := c.doRequest(http.MethodPost, "api/v2/auth/logout", c.headers, nil) - if err != nil || res.StatusCode != http.StatusOK { - return fmt.Errorf("could not logout: %s %s", res.Status, err) +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } } - return nil + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) } diff --git a/client_test.go b/client_test.go deleted file mode 100644 index c61622d..0000000 --- a/client_test.go +++ /dev/null @@ -1,645 +0,0 @@ -package goyeti - -import ( - "bytes" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "reflect" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/yeti-platform/goyeti/models" -) - -func TestNewYetiClient(t *testing.T) { - type args struct { - host string - port int - apikey string - } - tests := []struct { - name string - args args - want *YetiClient - }{ - {"TestNewYetiClientSuccess", args{"127.0.0.1", 1234, "apikey"}, &YetiClient{ClientConfig: models.ClientConfig{Host: "127.0.0.1", Port: 1234, Timeout: time.Second * 5, Proto: "https"}, apikey: "apikey"}}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := NewYetiClient(tt.args.host, tt.args.port, tt.args.apikey); !reflect.DeepEqual(got, tt.want) { - t.Errorf("NewYetiClient() = %v, want %v", got, tt.want) - } - }) - } -} - -func Test_parseResponse(t *testing.T) { - type args struct { - res *http.Response - receiver map[string]interface{} - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - "TestParseResponseSuccess", - args{ - &http.Response{ - Body: io.NopCloser(bytes.NewBufferString("{\"access_token\":\"token\",\"token_type\":\"type\"}")), - }, - map[string]interface{}{ - "access_token": "token", - "token_type": "type", - }, - }, - false, - }, - { - "TestParseResponseError", - args{ - &http.Response{ - Body: io.NopCloser(bytes.NewBufferString(":\"type\"}")), - }, nil, - }, - true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if err := parseResponse(tt.args.res, &tt.args.receiver); (err != nil) != tt.wantErr { - t.Errorf("parseResponse() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -func TestYetiClient_doRequest(t *testing.T) { - type scenario struct { - expectedRespStatus int - expectedRespBody string - } - type args struct { - method string - endpoint string - header http.Header - data []byte - } - tests := []struct { - name string - args args - scenario scenario - want *http.Response - wantErr bool - }{ - { - "TestDoRequestSuccess", - args{ - http.MethodGet, - "api/v2/auth/me", - http.Header{}, - nil, - }, - scenario{ - http.StatusOK, - "body", - }, - &http.Response{ - Body: io.NopCloser(bytes.NewBufferString("body")), - Status: http.StatusText(http.StatusOK), - }, - false, - }, - { - "TestDoRequestError", - args{ - http.MethodGet, - "api/v2/auth/me", - http.Header{}, - nil, - }, - scenario{ - http.StatusInternalServerError, - "body", - }, - &http.Response{ - Body: io.NopCloser(bytes.NewBufferString("body")), - Status: http.StatusText(http.StatusInternalServerError), - }, - true, - }, - } - for _, tt := range tests { - testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - res.WriteHeader(tt.scenario.expectedRespStatus) - res.Write([]byte(tt.scenario.expectedRespBody)) - })) - defer func() { testServer.Close() }() - - t.Run(tt.name, func(t *testing.T) { - c := &YetiClient{ - url: testServer.URL, - client: testServer.Client(), - } - got, err := c.doRequest(tt.args.method, tt.args.endpoint, tt.args.header, tt.args.data) - if (err != nil) != tt.wantErr { - t.Errorf("YetiClient.doRequest() error = %v, wantErr %v", err, tt.wantErr) - return - } - assert.Equal(t, tt.scenario.expectedRespStatus, got.StatusCode, "status code should match the expected response") - }) - } -} - -func TestYetiClient_getToken(t *testing.T) { - type scenario struct { - expectedRespStatus int - expectedRespBody string - } - tests := []struct { - name string - scenario scenario - want string - wantErr bool - }{ - { - "TestGetTokenSuccess", - scenario{ - http.StatusOK, - "{\"access_token\":\"token\",\"token_type\":\"type\"}", - }, - "token", - false, - }, - { - "TestGetTokenError500", - scenario{ - http.StatusInternalServerError, - "error", - }, - "", - true, - }, - { - "TestGetTokenErrorMalformedResponse", - scenario{ - http.StatusOK, - "{", - }, - "", - true, - }, - } - for _, tt := range tests { - testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - res.WriteHeader(tt.scenario.expectedRespStatus) - res.Write([]byte(tt.scenario.expectedRespBody)) - })) - defer func() { testServer.Close() }() - - t.Run(tt.name, func(t *testing.T) { - c := &YetiClient{ - url: testServer.URL, - client: testServer.Client(), - } - got, err := c.getToken() - if (err != nil) != tt.wantErr { - t.Errorf("YetiClient.getToken() error = %v, wantErr %v", err, tt.wantErr) - return - } - if got != tt.want { - t.Errorf("YetiClient.getToken() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestYetiClient_checkAuth(t *testing.T) { - type scenario struct { - expectedRespStatus int - expectedRespBody string - } - type args struct { - token string - } - tests := []struct { - name string - scenario scenario - args args - want bool - wantErr bool - }{ - { - "TestCheckAuthSuccess", - scenario{ - http.StatusOK, - "{\"username\":\"test\"}", - }, - args{ - "token", - }, - true, - false, - }, - { - "TestCheckAuthError", - scenario{ - http.StatusUnauthorized, - "error", - }, - args{ - "token", - }, - false, - true, - }, - } - for _, tt := range tests { - testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - res.WriteHeader(tt.scenario.expectedRespStatus) - res.Write([]byte(tt.scenario.expectedRespBody)) - })) - defer func() { testServer.Close() }() - t.Run(tt.name, func(t *testing.T) { - c := &YetiClient{ - url: testServer.URL, - client: testServer.Client(), - } - got, err := c.checkAuth(tt.args.token) - if (err != nil) != tt.wantErr { - t.Errorf("YetiClient.checkAuth() error = %v, wantErr %v", err, tt.wantErr) - return - } - if got != tt.want { - t.Errorf("YetiClient.checkAuth() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestYetiClient_init(t *testing.T) { - type scenario struct { - expectedRespStatus int - expectedRespBody string - } - tests := []struct { - name string - scenario []scenario - wantErr bool - }{ - { - "TestInitSuccess", - []scenario{ - { - http.StatusOK, - "{\"access_token\":\"token\",\"token_type\":\"type\"}", - }, - { - http.StatusOK, - "{\"username\":\"test\"}", - }, - }, - false, - }, - { - "TestInitErrorFetchingToken", - []scenario{ - { - http.StatusInternalServerError, - "error", - }, - { - http.StatusOK, - "", - }, - }, - true, - }, - { - "TestInitErrorCheckingAuth", - []scenario{ - { - http.StatusOK, - "{\"access_token\":\"token\",\"token_type\":\"type\"}", - }, - { - http.StatusUnauthorized, - "error", - }, - }, - true, - }, - } - for _, tt := range tests { - testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - if req.URL.Path == "/api/v2/auth/api-token" { - res.WriteHeader(tt.scenario[0].expectedRespStatus) - res.Write([]byte(tt.scenario[0].expectedRespBody)) - } else { - res.WriteHeader(tt.scenario[1].expectedRespStatus) - res.Write([]byte(tt.scenario[1].expectedRespBody)) - } - })) - defer func() { testServer.Close() }() - t.Run(tt.name, func(t *testing.T) { - c := &YetiClient{ - url: testServer.URL, - client: testServer.Client(), - } - if err := c.init(); (err != nil) != tt.wantErr { - t.Errorf("YetiClient.init() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -func TestYetiClient_ObservablesSearch(t *testing.T) { - type scenario struct { - expectedRespStatus int - expectedRespBody string - } - type args struct { - search models.QuerySearch - } - tests := []struct { - name string - scenario []scenario - args args - want models.ServerResponseObservables - wantErr bool - }{ - { - "TestObservablesSearchSuccess", - []scenario{ - { - http.StatusOK, - "{\"observables\":[{\"id\":\"id\",\"type\":\"hostname\",\"value\":\"fake\"}],\"total\":1}", - }, - }, - args{ - models.QuerySearch{ - Query: map[string]interface{}{ - "value": "fake", - }, - Type: "hostname", - Count: 50, - Page: 1, - }, - }, - models.ServerResponseObservables{ - Observables: []models.Observable{ - { - ID: "id", - Type: "hostname", - Value: "fake", - }, - }, - Total: 1, - }, - false, - }, - { - "TestObservablesSearchSuccessMultiplePages", - []scenario{ - { - http.StatusOK, - "{\"observables\":[{\"id\":\"id1\",\"type\":\"hostname\",\"value\":\"fake1\"}],\"total\":2}", - }, - { - http.StatusOK, - "{\"observables\":[{\"id\":\"id2\",\"type\":\"hostname\",\"value\":\"fake2\"}],\"total\":2}", - }, - }, - args{ - models.QuerySearch{ - Query: map[string]interface{}{ - "value": "fake", - }, - Type: "hostname", - Sorting: []struct{}{}, - Count: 1, - Page: 1, - }, - }, - models.ServerResponseObservables{ - Observables: []models.Observable{ - { - ID: "id1", - Type: "hostname", - Value: "fake1", - }, - { - ID: "id2", - Type: "hostname", - Value: "fake2", - }, - }, - Total: 2, - }, - false, - }, - { - "TestObservablesSearchError", - []scenario{ - { - http.StatusInternalServerError, - "error", - }, - }, - args{ - models.QuerySearch{ - Query: map[string]interface{}{ - "value": "fake", - }, - Type: "hostname", - Sorting: []struct{}{}, - Count: 1, - Page: 1, - }, - }, - models.ServerResponseObservables{}, - true, - }, - { - "TestObservablesSearchErrorUnmarshal", - []scenario{ - { - http.StatusOK, - "{error", - }, - }, - args{ - models.QuerySearch{ - Query: map[string]interface{}{ - "value": "fake", - }, - Type: "hostname", - Sorting: []struct{}{}, - Count: 1, - Page: 1, - }, - }, - models.ServerResponseObservables{}, - true, - }, - } - for _, tt := range tests { - testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - body, err := io.ReadAll(req.Body) - if err != nil { - t.Errorf("error reading request body: %v", err) - } - parsedBody := models.QuerySearch{} - err = json.Unmarshal(body, &parsedBody) - if err != nil { - t.Errorf("error unmarshalling request body: %v", err) - } - page := parsedBody.Page - res.WriteHeader(tt.scenario[page-1].expectedRespStatus) - res.Write([]byte(tt.scenario[page-1].expectedRespBody)) - })) - defer func() { testServer.Close() }() - t.Run(tt.name, func(t *testing.T) { - c := &YetiClient{ - url: testServer.URL, - client: testServer.Client(), - } - got, err := c.ObservablesSearch(tt.args.search) - if (err != nil) != tt.wantErr { - t.Errorf("YetiClient.ObservablesSearch() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("YetiClient.ObservablesSearch() = %+v, want %+v", got, tt.want) - } - }) - } -} - -func TestYetiClient_Query(t *testing.T) { - type scenario struct { - expectedRespStatus int - expectedRespBody string - } - type args struct { - endpoint string - method string - data []byte - } - tests := []struct { - name string - args args - scenario []scenario - want map[string]interface{} - wantErr bool - }{ - { - "TestQuerySuccess", - args{ - "api/v2/auth/me", - http.MethodGet, - nil, - }, - []scenario{ - { - http.StatusOK, - "{\"username\":\"test\"}", - }, - }, - map[string]interface{}{ - "username": "test", - }, - false, - }, - { - "TestQueryError", - args{ - "api/v2/auth/me", - http.MethodGet, - nil, - }, - []scenario{ - { - http.StatusInternalServerError, - "error", - }, - }, - nil, - true, - }, - } - for _, tt := range tests { - testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - res.WriteHeader(tt.scenario[0].expectedRespStatus) - res.Write([]byte(tt.scenario[0].expectedRespBody)) - })) - defer func() { testServer.Close() }() - t.Run(tt.name, func(t *testing.T) { - c := &YetiClient{ - url: testServer.URL, - client: testServer.Client(), - } - got, err := c.Query(tt.args.endpoint, tt.args.method, tt.args.data) - if (err != nil) != tt.wantErr { - t.Errorf("YetiClient.Query() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("YetiClient.Query() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestYetiClient_Close(t *testing.T) { - type scenario struct { - expectedRespStatus int - expectedRespBody string - } - tests := []struct { - name string - scenario []scenario - wantErr bool - }{ - { - "TestCloseSuccess", - []scenario{ - { - http.StatusOK, - "body", - }, - }, - false, - }, - { - "TestCloseError", - []scenario{ - { - http.StatusInternalServerError, - "error", - }, - }, - true, - }, - } - for _, tt := range tests { - testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - res.WriteHeader(tt.scenario[0].expectedRespStatus) - res.Write([]byte(tt.scenario[0].expectedRespBody)) - })) - defer func() { testServer.Close() }() - t.Run(tt.name, func(t *testing.T) { - c := &YetiClient{ - url: testServer.URL, - client: testServer.Client(), - } - if err := c.Close(); (err != nil) != tt.wantErr { - t.Errorf("YetiClient.Close() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..ca03fce --- /dev/null +++ b/config.yaml @@ -0,0 +1,14 @@ +--- +packageName: goyeti +packageVersion: 1.0.0 +hideGenerationTimestamp: true +isGoSubmodule: false +withGoMod: true +gitUserId: yeti-platform +gitRepoId: goyeti +templateDir: /local/templates +appDescriptionWithNewLines: + [ + "Go client for the Yeti API generated using OpenAPI Generator.", + "```\nmake update_spec YETI_INSTANCE=yeti.yourdomain.com\n```", + ] diff --git a/configuration.go b/configuration.go new file mode 100644 index 0000000..ec7f1b9 --- /dev/null +++ b/configuration.go @@ -0,0 +1,220 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "", + Description: "No description provided", + }, + }, + OperationServers: map[string]ServerConfigurations{}, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/docs/ASNInput.md b/docs/ASNInput.md new file mode 100644 index 0000000..f988da2 --- /dev/null +++ b/docs/ASNInput.md @@ -0,0 +1,227 @@ +# ASNInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "asn"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Country** | Pointer to **NullableString** | | [optional] +**Description** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewASNInput + +`func NewASNInput(value string, ) *ASNInput` + +NewASNInput instantiates a new ASNInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewASNInputWithDefaults + +`func NewASNInputWithDefaults() *ASNInput` + +NewASNInputWithDefaults instantiates a new ASNInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ASNInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ASNInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ASNInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ASNInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ASNInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ASNInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ASNInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ASNInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ASNInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ASNInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ASNInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ASNInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ASNInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ASNInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ASNInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ASNInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ASNInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ASNInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ASNInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetCountry + +`func (o *ASNInput) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ASNInput) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ASNInput) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ASNInput) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### SetCountryNil + +`func (o *ASNInput) SetCountryNil(b bool)` + + SetCountryNil sets the value for Country to be an explicit nil + +### UnsetCountry +`func (o *ASNInput) UnsetCountry()` + +UnsetCountry ensures that no value is present for Country, not even an explicit nil +### GetDescription + +`func (o *ASNInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ASNInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ASNInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ASNInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *ASNInput) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *ASNInput) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ASNOutput.md b/docs/ASNOutput.md new file mode 100644 index 0000000..5ffa90a --- /dev/null +++ b/docs/ASNOutput.md @@ -0,0 +1,290 @@ +# ASNOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "asn"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Country** | Pointer to **NullableString** | | [optional] +**Description** | Pointer to **NullableString** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewASNOutput + +`func NewASNOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *ASNOutput` + +NewASNOutput instantiates a new ASNOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewASNOutputWithDefaults + +`func NewASNOutputWithDefaults() *ASNOutput` + +NewASNOutputWithDefaults instantiates a new ASNOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ASNOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ASNOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ASNOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ASNOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ASNOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ASNOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ASNOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ASNOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ASNOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ASNOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ASNOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ASNOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ASNOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ASNOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ASNOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ASNOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ASNOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ASNOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ASNOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetCountry + +`func (o *ASNOutput) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ASNOutput) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ASNOutput) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ASNOutput) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### SetCountryNil + +`func (o *ASNOutput) SetCountryNil(b bool)` + + SetCountryNil sets the value for Country to be an explicit nil + +### UnsetCountry +`func (o *ASNOutput) UnsetCountry()` + +UnsetCountry ensures that no value is present for Country, not even an explicit nil +### GetDescription + +`func (o *ASNOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ASNOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ASNOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ASNOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *ASNOutput) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *ASNOutput) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetId + +`func (o *ASNOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ASNOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ASNOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ASNOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ASNOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ASNOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ASNOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ASNOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ASNOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddContextRequest.md b/docs/AddContextRequest.md new file mode 100644 index 0000000..fd940ac --- /dev/null +++ b/docs/AddContextRequest.md @@ -0,0 +1,98 @@ +# AddContextRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | +**Context** | **map[string]interface{}** | | +**SkipCompare** | Pointer to **[]interface{}** | | [optional] [default to []] + +## Methods + +### NewAddContextRequest + +`func NewAddContextRequest(source string, context map[string]interface{}, ) *AddContextRequest` + +NewAddContextRequest instantiates a new AddContextRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddContextRequestWithDefaults + +`func NewAddContextRequestWithDefaults() *AddContextRequest` + +NewAddContextRequestWithDefaults instantiates a new AddContextRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSource + +`func (o *AddContextRequest) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *AddContextRequest) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *AddContextRequest) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetContext + +`func (o *AddContextRequest) GetContext() map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *AddContextRequest) GetContextOk() (*map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *AddContextRequest) SetContext(v map[string]interface{})` + +SetContext sets Context field to given value. + + +### GetSkipCompare + +`func (o *AddContextRequest) GetSkipCompare() []interface{}` + +GetSkipCompare returns the SkipCompare field if non-nil, zero value otherwise. + +### GetSkipCompareOk + +`func (o *AddContextRequest) GetSkipCompareOk() (*[]interface{}, bool)` + +GetSkipCompareOk returns a tuple with the SkipCompare field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSkipCompare + +`func (o *AddContextRequest) SetSkipCompare(v []interface{})` + +SetSkipCompare sets SkipCompare field to given value. + +### HasSkipCompare + +`func (o *AddContextRequest) HasSkipCompare() bool` + +HasSkipCompare returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddTextRequest.md b/docs/AddTextRequest.md new file mode 100644 index 0000000..b0c3d96 --- /dev/null +++ b/docs/AddTextRequest.md @@ -0,0 +1,77 @@ +# AddTextRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | Pointer to **[]string** | | [optional] [default to []] +**Text** | **string** | | + +## Methods + +### NewAddTextRequest + +`func NewAddTextRequest(text string, ) *AddTextRequest` + +NewAddTextRequest instantiates a new AddTextRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddTextRequestWithDefaults + +`func NewAddTextRequestWithDefaults() *AddTextRequest` + +NewAddTextRequestWithDefaults instantiates a new AddTextRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTags + +`func (o *AddTextRequest) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *AddTextRequest) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *AddTextRequest) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *AddTextRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetText + +`func (o *AddTextRequest) GetText() string` + +GetText returns the Text field if non-nil, zero value otherwise. + +### GetTextOk + +`func (o *AddTextRequest) GetTextOk() (*string, bool)` + +GetTextOk returns a tuple with the Text field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetText + +`func (o *AddTextRequest) SetText(v string)` + +SetText sets Text field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddedInner.md b/docs/AddedInner.md new file mode 100644 index 0000000..f689a49 --- /dev/null +++ b/docs/AddedInner.md @@ -0,0 +1,1191 @@ +# AddedInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "cidr"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewAddedInner + +`func NewAddedInner(value string, id string, tags map[string]TagRelationshipOutput, rootType string, key string, data *os.File, hive RegistryHive, ) *AddedInner` + +NewAddedInner instantiates a new AddedInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddedInnerWithDefaults + +`func NewAddedInnerWithDefaults() *AddedInner` + +NewAddedInnerWithDefaults instantiates a new AddedInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *AddedInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *AddedInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *AddedInner) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *AddedInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AddedInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AddedInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AddedInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *AddedInner) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *AddedInner) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *AddedInner) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *AddedInner) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *AddedInner) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *AddedInner) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *AddedInner) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *AddedInner) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *AddedInner) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *AddedInner) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *AddedInner) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *AddedInner) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *AddedInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AddedInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AddedInner) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *AddedInner) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *AddedInner) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *AddedInner) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *AddedInner) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *AddedInner) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *AddedInner) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetLastSeen + +`func (o *AddedInner) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *AddedInner) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *AddedInner) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *AddedInner) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *AddedInner) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *AddedInner) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *AddedInner) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *AddedInner) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *AddedInner) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *AddedInner) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *AddedInner) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *AddedInner) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *AddedInner) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *AddedInner) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *AddedInner) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *AddedInner) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *AddedInner) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *AddedInner) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *AddedInner) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *AddedInner) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *AddedInner) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *AddedInner) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *AddedInner) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *AddedInner) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *AddedInner) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *AddedInner) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *AddedInner) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *AddedInner) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *AddedInner) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *AddedInner) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *AddedInner) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *AddedInner) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetUserId + +`func (o *AddedInner) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *AddedInner) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *AddedInner) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *AddedInner) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *AddedInner) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *AddedInner) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *AddedInner) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *AddedInner) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *AddedInner) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *AddedInner) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *AddedInner) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *AddedInner) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *AddedInner) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *AddedInner) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *AddedInner) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *AddedInner) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *AddedInner) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *AddedInner) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *AddedInner) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *AddedInner) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *AddedInner) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *AddedInner) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *AddedInner) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *AddedInner) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *AddedInner) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *AddedInner) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *AddedInner) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *AddedInner) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *AddedInner) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *AddedInner) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *AddedInner) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *AddedInner) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *AddedInner) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *AddedInner) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *AddedInner) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *AddedInner) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *AddedInner) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *AddedInner) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *AddedInner) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *AddedInner) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *AddedInner) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *AddedInner) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *AddedInner) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *AddedInner) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *AddedInner) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *AddedInner) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *AddedInner) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *AddedInner) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *AddedInner) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *AddedInner) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *AddedInner) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *AddedInner) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *AddedInner) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *AddedInner) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *AddedInner) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *AddedInner) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetVersion + +`func (o *AddedInner) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *AddedInner) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *AddedInner) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *AddedInner) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *AddedInner) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *AddedInner) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *AddedInner) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *AddedInner) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *AddedInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AddedInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AddedInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AddedInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *AddedInner) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *AddedInner) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *AddedInner) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *AddedInner) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *AddedInner) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *AddedInner) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *AddedInner) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *AddedInner) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *AddedInner) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *AddedInner) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *AddedInner) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *AddedInner) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *AddedInner) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *AddedInner) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *AddedInner) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *AddedInner) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *AddedInner) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *AddedInner) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *AddedInner) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *AddedInner) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetKey + +`func (o *AddedInner) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *AddedInner) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *AddedInner) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *AddedInner) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AddedInner) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *AddedInner) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *AddedInner) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *AddedInner) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *AddedInner) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *AddedInner) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *AddedInner) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *AddedInner) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *AddedInner) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCoin + +`func (o *AddedInner) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *AddedInner) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *AddedInner) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *AddedInner) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *AddedInner) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *AddedInner) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *AddedInner) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *AddedInner) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + +### GetCountry + +`func (o *AddedInner) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *AddedInner) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *AddedInner) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *AddedInner) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *AddedInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *AddedInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *AddedInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *AddedInner) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalysisRequest.md b/docs/AnalysisRequest.md new file mode 100644 index 0000000..aa9d6f1 --- /dev/null +++ b/docs/AnalysisRequest.md @@ -0,0 +1,191 @@ +# AnalysisRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Observables** | **[]string** | | +**AddTags** | Pointer to **[]string** | | [optional] [default to []] +**RegexMatch** | Pointer to **bool** | | [optional] [default to false] +**AddType** | Pointer to [**NullableObservableTypeInput**](ObservableTypeInput.md) | | [optional] +**FetchNeighbors** | Pointer to **bool** | | [optional] [default to true] +**AddUnknown** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewAnalysisRequest + +`func NewAnalysisRequest(observables []string, ) *AnalysisRequest` + +NewAnalysisRequest instantiates a new AnalysisRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalysisRequestWithDefaults + +`func NewAnalysisRequestWithDefaults() *AnalysisRequest` + +NewAnalysisRequestWithDefaults instantiates a new AnalysisRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetObservables + +`func (o *AnalysisRequest) GetObservables() []string` + +GetObservables returns the Observables field if non-nil, zero value otherwise. + +### GetObservablesOk + +`func (o *AnalysisRequest) GetObservablesOk() (*[]string, bool)` + +GetObservablesOk returns a tuple with the Observables field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObservables + +`func (o *AnalysisRequest) SetObservables(v []string)` + +SetObservables sets Observables field to given value. + + +### GetAddTags + +`func (o *AnalysisRequest) GetAddTags() []string` + +GetAddTags returns the AddTags field if non-nil, zero value otherwise. + +### GetAddTagsOk + +`func (o *AnalysisRequest) GetAddTagsOk() (*[]string, bool)` + +GetAddTagsOk returns a tuple with the AddTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddTags + +`func (o *AnalysisRequest) SetAddTags(v []string)` + +SetAddTags sets AddTags field to given value. + +### HasAddTags + +`func (o *AnalysisRequest) HasAddTags() bool` + +HasAddTags returns a boolean if a field has been set. + +### GetRegexMatch + +`func (o *AnalysisRequest) GetRegexMatch() bool` + +GetRegexMatch returns the RegexMatch field if non-nil, zero value otherwise. + +### GetRegexMatchOk + +`func (o *AnalysisRequest) GetRegexMatchOk() (*bool, bool)` + +GetRegexMatchOk returns a tuple with the RegexMatch field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegexMatch + +`func (o *AnalysisRequest) SetRegexMatch(v bool)` + +SetRegexMatch sets RegexMatch field to given value. + +### HasRegexMatch + +`func (o *AnalysisRequest) HasRegexMatch() bool` + +HasRegexMatch returns a boolean if a field has been set. + +### GetAddType + +`func (o *AnalysisRequest) GetAddType() ObservableTypeInput` + +GetAddType returns the AddType field if non-nil, zero value otherwise. + +### GetAddTypeOk + +`func (o *AnalysisRequest) GetAddTypeOk() (*ObservableTypeInput, bool)` + +GetAddTypeOk returns a tuple with the AddType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddType + +`func (o *AnalysisRequest) SetAddType(v ObservableTypeInput)` + +SetAddType sets AddType field to given value. + +### HasAddType + +`func (o *AnalysisRequest) HasAddType() bool` + +HasAddType returns a boolean if a field has been set. + +### SetAddTypeNil + +`func (o *AnalysisRequest) SetAddTypeNil(b bool)` + + SetAddTypeNil sets the value for AddType to be an explicit nil + +### UnsetAddType +`func (o *AnalysisRequest) UnsetAddType()` + +UnsetAddType ensures that no value is present for AddType, not even an explicit nil +### GetFetchNeighbors + +`func (o *AnalysisRequest) GetFetchNeighbors() bool` + +GetFetchNeighbors returns the FetchNeighbors field if non-nil, zero value otherwise. + +### GetFetchNeighborsOk + +`func (o *AnalysisRequest) GetFetchNeighborsOk() (*bool, bool)` + +GetFetchNeighborsOk returns a tuple with the FetchNeighbors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFetchNeighbors + +`func (o *AnalysisRequest) SetFetchNeighbors(v bool)` + +SetFetchNeighbors sets FetchNeighbors field to given value. + +### HasFetchNeighbors + +`func (o *AnalysisRequest) HasFetchNeighbors() bool` + +HasFetchNeighbors returns a boolean if a field has been set. + +### GetAddUnknown + +`func (o *AnalysisRequest) GetAddUnknown() bool` + +GetAddUnknown returns the AddUnknown field if non-nil, zero value otherwise. + +### GetAddUnknownOk + +`func (o *AnalysisRequest) GetAddUnknownOk() (*bool, bool)` + +GetAddUnknownOk returns a tuple with the AddUnknown field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddUnknown + +`func (o *AnalysisRequest) SetAddUnknown(v bool)` + +SetAddUnknown sets AddUnknown field to given value. + +### HasAddUnknown + +`func (o *AnalysisRequest) HasAddUnknown() bool` + +HasAddUnknown returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalysisResponse.md b/docs/AnalysisResponse.md new file mode 100644 index 0000000..3f1cc44 --- /dev/null +++ b/docs/AnalysisResponse.md @@ -0,0 +1,135 @@ +# AnalysisResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entities** | **[][]interface{}** | | +**Observables** | **[][]interface{}** | | +**Known** | [**[]Observable**](Observable.md) | | +**Matches** | **[][]interface{}** | | +**Unknown** | **[]string** | | + +## Methods + +### NewAnalysisResponse + +`func NewAnalysisResponse(entities [][]interface{}, observables [][]interface{}, known []Observable, matches [][]interface{}, unknown []string, ) *AnalysisResponse` + +NewAnalysisResponse instantiates a new AnalysisResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalysisResponseWithDefaults + +`func NewAnalysisResponseWithDefaults() *AnalysisResponse` + +NewAnalysisResponseWithDefaults instantiates a new AnalysisResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEntities + +`func (o *AnalysisResponse) GetEntities() [][]interface{}` + +GetEntities returns the Entities field if non-nil, zero value otherwise. + +### GetEntitiesOk + +`func (o *AnalysisResponse) GetEntitiesOk() (*[][]interface{}, bool)` + +GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntities + +`func (o *AnalysisResponse) SetEntities(v [][]interface{})` + +SetEntities sets Entities field to given value. + + +### GetObservables + +`func (o *AnalysisResponse) GetObservables() [][]interface{}` + +GetObservables returns the Observables field if non-nil, zero value otherwise. + +### GetObservablesOk + +`func (o *AnalysisResponse) GetObservablesOk() (*[][]interface{}, bool)` + +GetObservablesOk returns a tuple with the Observables field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObservables + +`func (o *AnalysisResponse) SetObservables(v [][]interface{})` + +SetObservables sets Observables field to given value. + + +### GetKnown + +`func (o *AnalysisResponse) GetKnown() []Observable` + +GetKnown returns the Known field if non-nil, zero value otherwise. + +### GetKnownOk + +`func (o *AnalysisResponse) GetKnownOk() (*[]Observable, bool)` + +GetKnownOk returns a tuple with the Known field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKnown + +`func (o *AnalysisResponse) SetKnown(v []Observable)` + +SetKnown sets Known field to given value. + + +### GetMatches + +`func (o *AnalysisResponse) GetMatches() [][]interface{}` + +GetMatches returns the Matches field if non-nil, zero value otherwise. + +### GetMatchesOk + +`func (o *AnalysisResponse) GetMatchesOk() (*[][]interface{}, bool)` + +GetMatchesOk returns a tuple with the Matches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatches + +`func (o *AnalysisResponse) SetMatches(v [][]interface{})` + +SetMatches sets Matches field to given value. + + +### GetUnknown + +`func (o *AnalysisResponse) GetUnknown() []string` + +GetUnknown returns the Unknown field if non-nil, zero value otherwise. + +### GetUnknownOk + +`func (o *AnalysisResponse) GetUnknownOk() (*[]string, bool)` + +GetUnknownOk returns a tuple with the Unknown field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnknown + +`func (o *AnalysisResponse) SetUnknown(v []string)` + +SetUnknown sets Unknown field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsTask.md b/docs/AnalyticsTask.md new file mode 100644 index 0000000..738759b --- /dev/null +++ b/docs/AnalyticsTask.md @@ -0,0 +1,300 @@ +# AnalyticsTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Enabled** | Pointer to **bool** | | [optional] [default to false] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Status** | Pointer to [**TaskStatus**](TaskStatus.md) | | [optional] +**StatusMessage** | Pointer to **string** | | [optional] [default to ""] +**LastRun** | Pointer to **NullableTime** | | [optional] +**Frequency** | Pointer to **NullableString** | | [optional] +**ActsOn** | Pointer to **[]string** | | [optional] [default to []] +**Type** | Pointer to **string** | | [optional] [default to "analytics"] +**Id** | **string** | | [readonly] + +## Methods + +### NewAnalyticsTask + +`func NewAnalyticsTask(name string, id string, ) *AnalyticsTask` + +NewAnalyticsTask instantiates a new AnalyticsTask object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsTaskWithDefaults + +`func NewAnalyticsTaskWithDefaults() *AnalyticsTask` + +NewAnalyticsTaskWithDefaults instantiates a new AnalyticsTask object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *AnalyticsTask) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AnalyticsTask) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AnalyticsTask) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEnabled + +`func (o *AnalyticsTask) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *AnalyticsTask) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *AnalyticsTask) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *AnalyticsTask) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetDescription + +`func (o *AnalyticsTask) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *AnalyticsTask) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *AnalyticsTask) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *AnalyticsTask) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *AnalyticsTask) GetStatus() TaskStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AnalyticsTask) GetStatusOk() (*TaskStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *AnalyticsTask) SetStatus(v TaskStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *AnalyticsTask) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStatusMessage + +`func (o *AnalyticsTask) GetStatusMessage() string` + +GetStatusMessage returns the StatusMessage field if non-nil, zero value otherwise. + +### GetStatusMessageOk + +`func (o *AnalyticsTask) GetStatusMessageOk() (*string, bool)` + +GetStatusMessageOk returns a tuple with the StatusMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusMessage + +`func (o *AnalyticsTask) SetStatusMessage(v string)` + +SetStatusMessage sets StatusMessage field to given value. + +### HasStatusMessage + +`func (o *AnalyticsTask) HasStatusMessage() bool` + +HasStatusMessage returns a boolean if a field has been set. + +### GetLastRun + +`func (o *AnalyticsTask) GetLastRun() time.Time` + +GetLastRun returns the LastRun field if non-nil, zero value otherwise. + +### GetLastRunOk + +`func (o *AnalyticsTask) GetLastRunOk() (*time.Time, bool)` + +GetLastRunOk returns a tuple with the LastRun field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastRun + +`func (o *AnalyticsTask) SetLastRun(v time.Time)` + +SetLastRun sets LastRun field to given value. + +### HasLastRun + +`func (o *AnalyticsTask) HasLastRun() bool` + +HasLastRun returns a boolean if a field has been set. + +### SetLastRunNil + +`func (o *AnalyticsTask) SetLastRunNil(b bool)` + + SetLastRunNil sets the value for LastRun to be an explicit nil + +### UnsetLastRun +`func (o *AnalyticsTask) UnsetLastRun()` + +UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +### GetFrequency + +`func (o *AnalyticsTask) GetFrequency() string` + +GetFrequency returns the Frequency field if non-nil, zero value otherwise. + +### GetFrequencyOk + +`func (o *AnalyticsTask) GetFrequencyOk() (*string, bool)` + +GetFrequencyOk returns a tuple with the Frequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrequency + +`func (o *AnalyticsTask) SetFrequency(v string)` + +SetFrequency sets Frequency field to given value. + +### HasFrequency + +`func (o *AnalyticsTask) HasFrequency() bool` + +HasFrequency returns a boolean if a field has been set. + +### SetFrequencyNil + +`func (o *AnalyticsTask) SetFrequencyNil(b bool)` + + SetFrequencyNil sets the value for Frequency to be an explicit nil + +### UnsetFrequency +`func (o *AnalyticsTask) UnsetFrequency()` + +UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +### GetActsOn + +`func (o *AnalyticsTask) GetActsOn() []string` + +GetActsOn returns the ActsOn field if non-nil, zero value otherwise. + +### GetActsOnOk + +`func (o *AnalyticsTask) GetActsOnOk() (*[]string, bool)` + +GetActsOnOk returns a tuple with the ActsOn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActsOn + +`func (o *AnalyticsTask) SetActsOn(v []string)` + +SetActsOn sets ActsOn field to given value. + +### HasActsOn + +`func (o *AnalyticsTask) HasActsOn() bool` + +HasActsOn returns a boolean if a field has been set. + +### GetType + +`func (o *AnalyticsTask) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AnalyticsTask) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AnalyticsTask) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AnalyticsTask) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *AnalyticsTask) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AnalyticsTask) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AnalyticsTask) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AttackPatternInput.md b/docs/AttackPatternInput.md new file mode 100644 index 0000000..b042b72 --- /dev/null +++ b/docs/AttackPatternInput.md @@ -0,0 +1,233 @@ +# AttackPatternInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "attack-pattern"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewAttackPatternInput + +`func NewAttackPatternInput(name string, ) *AttackPatternInput` + +NewAttackPatternInput instantiates a new AttackPatternInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackPatternInputWithDefaults + +`func NewAttackPatternInputWithDefaults() *AttackPatternInput` + +NewAttackPatternInputWithDefaults instantiates a new AttackPatternInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *AttackPatternInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AttackPatternInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AttackPatternInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AttackPatternInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *AttackPatternInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AttackPatternInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AttackPatternInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *AttackPatternInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *AttackPatternInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *AttackPatternInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *AttackPatternInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *AttackPatternInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *AttackPatternInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *AttackPatternInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *AttackPatternInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *AttackPatternInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *AttackPatternInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *AttackPatternInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *AttackPatternInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *AttackPatternInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *AttackPatternInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *AttackPatternInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *AttackPatternInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *AttackPatternInput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *AttackPatternInput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *AttackPatternInput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *AttackPatternInput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *AttackPatternInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *AttackPatternInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *AttackPatternInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *AttackPatternInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AttackPatternOutput.md b/docs/AttackPatternOutput.md new file mode 100644 index 0000000..956c399 --- /dev/null +++ b/docs/AttackPatternOutput.md @@ -0,0 +1,317 @@ +# AttackPatternOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "attack-pattern"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewAttackPatternOutput + +`func NewAttackPatternOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *AttackPatternOutput` + +NewAttackPatternOutput instantiates a new AttackPatternOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackPatternOutputWithDefaults + +`func NewAttackPatternOutputWithDefaults() *AttackPatternOutput` + +NewAttackPatternOutputWithDefaults instantiates a new AttackPatternOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *AttackPatternOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AttackPatternOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AttackPatternOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AttackPatternOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *AttackPatternOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AttackPatternOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AttackPatternOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *AttackPatternOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *AttackPatternOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *AttackPatternOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *AttackPatternOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *AttackPatternOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *AttackPatternOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *AttackPatternOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *AttackPatternOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *AttackPatternOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *AttackPatternOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *AttackPatternOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *AttackPatternOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *AttackPatternOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *AttackPatternOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *AttackPatternOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *AttackPatternOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *AttackPatternOutput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *AttackPatternOutput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *AttackPatternOutput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *AttackPatternOutput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *AttackPatternOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *AttackPatternOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *AttackPatternOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *AttackPatternOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetId + +`func (o *AttackPatternOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AttackPatternOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AttackPatternOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *AttackPatternOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *AttackPatternOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *AttackPatternOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *AttackPatternOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *AttackPatternOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *AttackPatternOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *AttackPatternOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *AttackPatternOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *AttackPatternOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthAPI.md b/docs/AuthAPI.md new file mode 100644 index 0000000..6d5dbc9 --- /dev/null +++ b/docs/AuthAPI.md @@ -0,0 +1,263 @@ +# \AuthAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**LoginApiApiV2AuthApiTokenPost**](AuthAPI.md#LoginApiApiV2AuthApiTokenPost) | **Post** /api/v2/auth/api-token | Login Api +[**LoginApiV2AuthTokenPost**](AuthAPI.md#LoginApiV2AuthTokenPost) | **Post** /api/v2/auth/token | Login +[**LogoutApiV2AuthLogoutPost**](AuthAPI.md#LogoutApiV2AuthLogoutPost) | **Post** /api/v2/auth/logout | Logout +[**MeApiV2AuthMeGet**](AuthAPI.md#MeApiV2AuthMeGet) | **Get** /api/v2/auth/me | Me + + + +## LoginApiApiV2AuthApiTokenPost + +> interface{} LoginApiApiV2AuthApiTokenPost(ctx).Execute() + +Login Api + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthAPI.LoginApiApiV2AuthApiTokenPost(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.LoginApiApiV2AuthApiTokenPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoginApiApiV2AuthApiTokenPost`: interface{} + fmt.Fprintf(os.Stdout, "Response from `AuthAPI.LoginApiApiV2AuthApiTokenPost`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoginApiApiV2AuthApiTokenPostRequest struct via the builder pattern + + +### Return type + +**interface{}** + +### Authorization + +[APIKeyHeader](../README.md#APIKeyHeader) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LoginApiV2AuthTokenPost + +> interface{} LoginApiV2AuthTokenPost(ctx).Username(username).Password(password).GrantType(grantType).Scope(scope).ClientId(clientId).ClientSecret(clientSecret).Execute() + +Login + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + username := "username_example" // string | + password := "password_example" // string | + grantType := "grantType_example" // string | (optional) + scope := "scope_example" // string | (optional) (default to "") + clientId := "clientId_example" // string | (optional) + clientSecret := "clientSecret_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthAPI.LoginApiV2AuthTokenPost(context.Background()).Username(username).Password(password).GrantType(grantType).Scope(scope).ClientId(clientId).ClientSecret(clientSecret).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.LoginApiV2AuthTokenPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoginApiV2AuthTokenPost`: interface{} + fmt.Fprintf(os.Stdout, "Response from `AuthAPI.LoginApiV2AuthTokenPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoginApiV2AuthTokenPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **string** | | + **password** | **string** | | + **grantType** | **string** | | + **scope** | **string** | | [default to ""] + **clientId** | **string** | | + **clientSecret** | **string** | | + +### Return type + +**interface{}** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LogoutApiV2AuthLogoutPost + +> interface{} LogoutApiV2AuthLogoutPost(ctx).Execute() + +Logout + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthAPI.LogoutApiV2AuthLogoutPost(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.LogoutApiV2AuthLogoutPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LogoutApiV2AuthLogoutPost`: interface{} + fmt.Fprintf(os.Stdout, "Response from `AuthAPI.LogoutApiV2AuthLogoutPost`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiLogoutApiV2AuthLogoutPostRequest struct via the builder pattern + + +### Return type + +**interface{}** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## MeApiV2AuthMeGet + +> User MeApiV2AuthMeGet(ctx).Execute() + +Me + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthAPI.MeApiV2AuthMeGet(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.MeApiV2AuthMeGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `MeApiV2AuthMeGet`: User + fmt.Fprintf(os.Stdout, "Response from `AuthAPI.MeApiV2AuthMeGet`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiMeApiV2AuthMeGetRequest struct via the builder pattern + + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/BICInput.md b/docs/BICInput.md new file mode 100644 index 0000000..65cb124 --- /dev/null +++ b/docs/BICInput.md @@ -0,0 +1,155 @@ +# BICInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "bic"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewBICInput + +`func NewBICInput(value string, ) *BICInput` + +NewBICInput instantiates a new BICInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBICInputWithDefaults + +`func NewBICInputWithDefaults() *BICInput` + +NewBICInputWithDefaults instantiates a new BICInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *BICInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *BICInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *BICInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *BICInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BICInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BICInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *BICInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *BICInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *BICInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *BICInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *BICInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *BICInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *BICInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *BICInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *BICInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *BICInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *BICInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *BICInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *BICInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BICOutput.md b/docs/BICOutput.md new file mode 100644 index 0000000..83fbcf2 --- /dev/null +++ b/docs/BICOutput.md @@ -0,0 +1,218 @@ +# BICOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "bic"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewBICOutput + +`func NewBICOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *BICOutput` + +NewBICOutput instantiates a new BICOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBICOutputWithDefaults + +`func NewBICOutputWithDefaults() *BICOutput` + +NewBICOutputWithDefaults instantiates a new BICOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *BICOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *BICOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *BICOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *BICOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BICOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BICOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *BICOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *BICOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *BICOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *BICOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *BICOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *BICOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *BICOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *BICOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *BICOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *BICOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *BICOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *BICOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *BICOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *BICOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BICOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *BICOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *BICOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *BICOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *BICOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *BICOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *BICOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *BICOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkObservableAddResponse.md b/docs/BulkObservableAddResponse.md new file mode 100644 index 0000000..4c91630 --- /dev/null +++ b/docs/BulkObservableAddResponse.md @@ -0,0 +1,82 @@ +# BulkObservableAddResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Added** | Pointer to [**[]AddedInner**](AddedInner.md) | | [optional] [default to []] +**Failed** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewBulkObservableAddResponse + +`func NewBulkObservableAddResponse() *BulkObservableAddResponse` + +NewBulkObservableAddResponse instantiates a new BulkObservableAddResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkObservableAddResponseWithDefaults + +`func NewBulkObservableAddResponseWithDefaults() *BulkObservableAddResponse` + +NewBulkObservableAddResponseWithDefaults instantiates a new BulkObservableAddResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAdded + +`func (o *BulkObservableAddResponse) GetAdded() []AddedInner` + +GetAdded returns the Added field if non-nil, zero value otherwise. + +### GetAddedOk + +`func (o *BulkObservableAddResponse) GetAddedOk() (*[]AddedInner, bool)` + +GetAddedOk returns a tuple with the Added field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdded + +`func (o *BulkObservableAddResponse) SetAdded(v []AddedInner)` + +SetAdded sets Added field to given value. + +### HasAdded + +`func (o *BulkObservableAddResponse) HasAdded() bool` + +HasAdded returns a boolean if a field has been set. + +### GetFailed + +`func (o *BulkObservableAddResponse) GetFailed() []string` + +GetFailed returns the Failed field if non-nil, zero value otherwise. + +### GetFailedOk + +`func (o *BulkObservableAddResponse) GetFailedOk() (*[]string, bool)` + +GetFailedOk returns a tuple with the Failed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFailed + +`func (o *BulkObservableAddResponse) SetFailed(v []string)` + +SetFailed sets Failed field to given value. + +### HasFailed + +`func (o *BulkObservableAddResponse) HasFailed() bool` + +HasFailed returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CIDRInput.md b/docs/CIDRInput.md new file mode 100644 index 0000000..16bff2b --- /dev/null +++ b/docs/CIDRInput.md @@ -0,0 +1,155 @@ +# CIDRInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "cidr"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewCIDRInput + +`func NewCIDRInput(value string, ) *CIDRInput` + +NewCIDRInput instantiates a new CIDRInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCIDRInputWithDefaults + +`func NewCIDRInputWithDefaults() *CIDRInput` + +NewCIDRInputWithDefaults instantiates a new CIDRInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *CIDRInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CIDRInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *CIDRInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *CIDRInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CIDRInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CIDRInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CIDRInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *CIDRInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CIDRInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CIDRInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CIDRInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *CIDRInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CIDRInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CIDRInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CIDRInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *CIDRInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *CIDRInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *CIDRInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *CIDRInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CIDROutput.md b/docs/CIDROutput.md new file mode 100644 index 0000000..c109fc4 --- /dev/null +++ b/docs/CIDROutput.md @@ -0,0 +1,218 @@ +# CIDROutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "cidr"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewCIDROutput + +`func NewCIDROutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *CIDROutput` + +NewCIDROutput instantiates a new CIDROutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCIDROutputWithDefaults + +`func NewCIDROutputWithDefaults() *CIDROutput` + +NewCIDROutputWithDefaults instantiates a new CIDROutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *CIDROutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CIDROutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *CIDROutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *CIDROutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CIDROutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CIDROutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CIDROutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *CIDROutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CIDROutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CIDROutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CIDROutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *CIDROutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CIDROutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CIDROutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CIDROutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *CIDROutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *CIDROutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *CIDROutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *CIDROutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *CIDROutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CIDROutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CIDROutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *CIDROutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *CIDROutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *CIDROutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *CIDROutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *CIDROutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *CIDROutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignInput.md b/docs/CampaignInput.md new file mode 100644 index 0000000..21f84d3 --- /dev/null +++ b/docs/CampaignInput.md @@ -0,0 +1,259 @@ +# CampaignInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "campaign"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewCampaignInput + +`func NewCampaignInput(name string, ) *CampaignInput` + +NewCampaignInput instantiates a new CampaignInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCampaignInputWithDefaults + +`func NewCampaignInputWithDefaults() *CampaignInput` + +NewCampaignInputWithDefaults instantiates a new CampaignInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *CampaignInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CampaignInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CampaignInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CampaignInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *CampaignInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CampaignInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CampaignInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CampaignInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CampaignInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CampaignInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CampaignInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *CampaignInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CampaignInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CampaignInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CampaignInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *CampaignInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CampaignInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CampaignInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CampaignInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *CampaignInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *CampaignInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *CampaignInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *CampaignInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *CampaignInput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *CampaignInput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *CampaignInput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *CampaignInput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *CampaignInput) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *CampaignInput) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *CampaignInput) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *CampaignInput) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *CampaignInput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *CampaignInput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *CampaignInput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *CampaignInput) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignOutput.md b/docs/CampaignOutput.md new file mode 100644 index 0000000..aa2386c --- /dev/null +++ b/docs/CampaignOutput.md @@ -0,0 +1,343 @@ +# CampaignOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "campaign"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewCampaignOutput + +`func NewCampaignOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *CampaignOutput` + +NewCampaignOutput instantiates a new CampaignOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCampaignOutputWithDefaults + +`func NewCampaignOutputWithDefaults() *CampaignOutput` + +NewCampaignOutputWithDefaults instantiates a new CampaignOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *CampaignOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CampaignOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CampaignOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CampaignOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *CampaignOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CampaignOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CampaignOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CampaignOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CampaignOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CampaignOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CampaignOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *CampaignOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CampaignOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CampaignOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CampaignOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *CampaignOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CampaignOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CampaignOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CampaignOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *CampaignOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *CampaignOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *CampaignOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *CampaignOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *CampaignOutput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *CampaignOutput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *CampaignOutput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *CampaignOutput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *CampaignOutput) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *CampaignOutput) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *CampaignOutput) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *CampaignOutput) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *CampaignOutput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *CampaignOutput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *CampaignOutput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *CampaignOutput) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetId + +`func (o *CampaignOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CampaignOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CampaignOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *CampaignOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *CampaignOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *CampaignOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *CampaignOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *CampaignOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *CampaignOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *CampaignOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *CampaignOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *CampaignOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CertificateInput.md b/docs/CertificateInput.md new file mode 100644 index 0000000..82e4f0e --- /dev/null +++ b/docs/CertificateInput.md @@ -0,0 +1,423 @@ +# CertificateInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "certificate"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **NullableString** | | [optional] +**Subject** | Pointer to **NullableString** | | [optional] +**SerialNumber** | Pointer to **NullableString** | | [optional] +**After** | Pointer to **NullableTime** | | [optional] +**Before** | Pointer to **NullableTime** | | [optional] +**Fingerprint** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewCertificateInput + +`func NewCertificateInput(value string, ) *CertificateInput` + +NewCertificateInput instantiates a new CertificateInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateInputWithDefaults + +`func NewCertificateInputWithDefaults() *CertificateInput` + +NewCertificateInputWithDefaults instantiates a new CertificateInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *CertificateInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CertificateInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *CertificateInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *CertificateInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CertificateInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CertificateInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CertificateInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *CertificateInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CertificateInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CertificateInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CertificateInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *CertificateInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CertificateInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CertificateInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CertificateInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *CertificateInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *CertificateInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *CertificateInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *CertificateInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *CertificateInput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *CertificateInput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *CertificateInput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *CertificateInput) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *CertificateInput) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *CertificateInput) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *CertificateInput) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *CertificateInput) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *CertificateInput) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *CertificateInput) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *CertificateInput) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *CertificateInput) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### SetIssuerNil + +`func (o *CertificateInput) SetIssuerNil(b bool)` + + SetIssuerNil sets the value for Issuer to be an explicit nil + +### UnsetIssuer +`func (o *CertificateInput) UnsetIssuer()` + +UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +### GetSubject + +`func (o *CertificateInput) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *CertificateInput) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *CertificateInput) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *CertificateInput) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### SetSubjectNil + +`func (o *CertificateInput) SetSubjectNil(b bool)` + + SetSubjectNil sets the value for Subject to be an explicit nil + +### UnsetSubject +`func (o *CertificateInput) UnsetSubject()` + +UnsetSubject ensures that no value is present for Subject, not even an explicit nil +### GetSerialNumber + +`func (o *CertificateInput) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *CertificateInput) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *CertificateInput) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *CertificateInput) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### SetSerialNumberNil + +`func (o *CertificateInput) SetSerialNumberNil(b bool)` + + SetSerialNumberNil sets the value for SerialNumber to be an explicit nil + +### UnsetSerialNumber +`func (o *CertificateInput) UnsetSerialNumber()` + +UnsetSerialNumber ensures that no value is present for SerialNumber, not even an explicit nil +### GetAfter + +`func (o *CertificateInput) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *CertificateInput) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *CertificateInput) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *CertificateInput) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### SetAfterNil + +`func (o *CertificateInput) SetAfterNil(b bool)` + + SetAfterNil sets the value for After to be an explicit nil + +### UnsetAfter +`func (o *CertificateInput) UnsetAfter()` + +UnsetAfter ensures that no value is present for After, not even an explicit nil +### GetBefore + +`func (o *CertificateInput) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *CertificateInput) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *CertificateInput) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *CertificateInput) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### SetBeforeNil + +`func (o *CertificateInput) SetBeforeNil(b bool)` + + SetBeforeNil sets the value for Before to be an explicit nil + +### UnsetBefore +`func (o *CertificateInput) UnsetBefore()` + +UnsetBefore ensures that no value is present for Before, not even an explicit nil +### GetFingerprint + +`func (o *CertificateInput) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *CertificateInput) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *CertificateInput) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *CertificateInput) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### SetFingerprintNil + +`func (o *CertificateInput) SetFingerprintNil(b bool)` + + SetFingerprintNil sets the value for Fingerprint to be an explicit nil + +### UnsetFingerprint +`func (o *CertificateInput) UnsetFingerprint()` + +UnsetFingerprint ensures that no value is present for Fingerprint, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CertificateOutput.md b/docs/CertificateOutput.md new file mode 100644 index 0000000..5b8c84e --- /dev/null +++ b/docs/CertificateOutput.md @@ -0,0 +1,486 @@ +# CertificateOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "certificate"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **NullableString** | | [optional] +**Subject** | Pointer to **NullableString** | | [optional] +**SerialNumber** | Pointer to **NullableString** | | [optional] +**After** | Pointer to **NullableTime** | | [optional] +**Before** | Pointer to **NullableTime** | | [optional] +**Fingerprint** | Pointer to **NullableString** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewCertificateOutput + +`func NewCertificateOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *CertificateOutput` + +NewCertificateOutput instantiates a new CertificateOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateOutputWithDefaults + +`func NewCertificateOutputWithDefaults() *CertificateOutput` + +NewCertificateOutputWithDefaults instantiates a new CertificateOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *CertificateOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CertificateOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *CertificateOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *CertificateOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CertificateOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CertificateOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CertificateOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *CertificateOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CertificateOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CertificateOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CertificateOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *CertificateOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CertificateOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CertificateOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CertificateOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *CertificateOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *CertificateOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *CertificateOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *CertificateOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *CertificateOutput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *CertificateOutput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *CertificateOutput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *CertificateOutput) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *CertificateOutput) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *CertificateOutput) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *CertificateOutput) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *CertificateOutput) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *CertificateOutput) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *CertificateOutput) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *CertificateOutput) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *CertificateOutput) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### SetIssuerNil + +`func (o *CertificateOutput) SetIssuerNil(b bool)` + + SetIssuerNil sets the value for Issuer to be an explicit nil + +### UnsetIssuer +`func (o *CertificateOutput) UnsetIssuer()` + +UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +### GetSubject + +`func (o *CertificateOutput) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *CertificateOutput) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *CertificateOutput) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *CertificateOutput) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### SetSubjectNil + +`func (o *CertificateOutput) SetSubjectNil(b bool)` + + SetSubjectNil sets the value for Subject to be an explicit nil + +### UnsetSubject +`func (o *CertificateOutput) UnsetSubject()` + +UnsetSubject ensures that no value is present for Subject, not even an explicit nil +### GetSerialNumber + +`func (o *CertificateOutput) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *CertificateOutput) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *CertificateOutput) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *CertificateOutput) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### SetSerialNumberNil + +`func (o *CertificateOutput) SetSerialNumberNil(b bool)` + + SetSerialNumberNil sets the value for SerialNumber to be an explicit nil + +### UnsetSerialNumber +`func (o *CertificateOutput) UnsetSerialNumber()` + +UnsetSerialNumber ensures that no value is present for SerialNumber, not even an explicit nil +### GetAfter + +`func (o *CertificateOutput) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *CertificateOutput) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *CertificateOutput) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *CertificateOutput) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### SetAfterNil + +`func (o *CertificateOutput) SetAfterNil(b bool)` + + SetAfterNil sets the value for After to be an explicit nil + +### UnsetAfter +`func (o *CertificateOutput) UnsetAfter()` + +UnsetAfter ensures that no value is present for After, not even an explicit nil +### GetBefore + +`func (o *CertificateOutput) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *CertificateOutput) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *CertificateOutput) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *CertificateOutput) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### SetBeforeNil + +`func (o *CertificateOutput) SetBeforeNil(b bool)` + + SetBeforeNil sets the value for Before to be an explicit nil + +### UnsetBefore +`func (o *CertificateOutput) UnsetBefore()` + +UnsetBefore ensures that no value is present for Before, not even an explicit nil +### GetFingerprint + +`func (o *CertificateOutput) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *CertificateOutput) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *CertificateOutput) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *CertificateOutput) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### SetFingerprintNil + +`func (o *CertificateOutput) SetFingerprintNil(b bool)` + + SetFingerprintNil sets the value for Fingerprint to be an explicit nil + +### UnsetFingerprint +`func (o *CertificateOutput) UnsetFingerprint()` + +UnsetFingerprint ensures that no value is present for Fingerprint, not even an explicit nil +### GetId + +`func (o *CertificateOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CertificateOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CertificateOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *CertificateOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *CertificateOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *CertificateOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *CertificateOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *CertificateOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *CertificateOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CommandLineInput.md b/docs/CommandLineInput.md new file mode 100644 index 0000000..0c7fefe --- /dev/null +++ b/docs/CommandLineInput.md @@ -0,0 +1,155 @@ +# CommandLineInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "command_line"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewCommandLineInput + +`func NewCommandLineInput(value string, ) *CommandLineInput` + +NewCommandLineInput instantiates a new CommandLineInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCommandLineInputWithDefaults + +`func NewCommandLineInputWithDefaults() *CommandLineInput` + +NewCommandLineInputWithDefaults instantiates a new CommandLineInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *CommandLineInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CommandLineInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *CommandLineInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *CommandLineInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CommandLineInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CommandLineInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CommandLineInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *CommandLineInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CommandLineInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CommandLineInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CommandLineInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *CommandLineInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CommandLineInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CommandLineInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CommandLineInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *CommandLineInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *CommandLineInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *CommandLineInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *CommandLineInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CommandLineOutput.md b/docs/CommandLineOutput.md new file mode 100644 index 0000000..19d4b43 --- /dev/null +++ b/docs/CommandLineOutput.md @@ -0,0 +1,218 @@ +# CommandLineOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "command_line"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewCommandLineOutput + +`func NewCommandLineOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *CommandLineOutput` + +NewCommandLineOutput instantiates a new CommandLineOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCommandLineOutputWithDefaults + +`func NewCommandLineOutputWithDefaults() *CommandLineOutput` + +NewCommandLineOutputWithDefaults instantiates a new CommandLineOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *CommandLineOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CommandLineOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *CommandLineOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *CommandLineOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CommandLineOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CommandLineOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CommandLineOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *CommandLineOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CommandLineOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CommandLineOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CommandLineOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *CommandLineOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CommandLineOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CommandLineOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CommandLineOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *CommandLineOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *CommandLineOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *CommandLineOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *CommandLineOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *CommandLineOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CommandLineOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CommandLineOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *CommandLineOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *CommandLineOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *CommandLineOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *CommandLineOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *CommandLineOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *CommandLineOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CompanyInput.md b/docs/CompanyInput.md new file mode 100644 index 0000000..8c806d0 --- /dev/null +++ b/docs/CompanyInput.md @@ -0,0 +1,181 @@ +# CompanyInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "company"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewCompanyInput + +`func NewCompanyInput(name string, ) *CompanyInput` + +NewCompanyInput instantiates a new CompanyInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCompanyInputWithDefaults + +`func NewCompanyInputWithDefaults() *CompanyInput` + +NewCompanyInputWithDefaults instantiates a new CompanyInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *CompanyInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CompanyInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CompanyInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CompanyInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *CompanyInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CompanyInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CompanyInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CompanyInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CompanyInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CompanyInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CompanyInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *CompanyInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CompanyInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CompanyInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CompanyInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *CompanyInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CompanyInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CompanyInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CompanyInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *CompanyInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *CompanyInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *CompanyInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *CompanyInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CompanyOutput.md b/docs/CompanyOutput.md new file mode 100644 index 0000000..2c9bd00 --- /dev/null +++ b/docs/CompanyOutput.md @@ -0,0 +1,265 @@ +# CompanyOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "company"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewCompanyOutput + +`func NewCompanyOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *CompanyOutput` + +NewCompanyOutput instantiates a new CompanyOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCompanyOutputWithDefaults + +`func NewCompanyOutputWithDefaults() *CompanyOutput` + +NewCompanyOutputWithDefaults instantiates a new CompanyOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *CompanyOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CompanyOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CompanyOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CompanyOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *CompanyOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CompanyOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CompanyOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CompanyOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CompanyOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CompanyOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CompanyOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *CompanyOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CompanyOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CompanyOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CompanyOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *CompanyOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CompanyOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CompanyOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CompanyOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *CompanyOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *CompanyOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *CompanyOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *CompanyOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetId + +`func (o *CompanyOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CompanyOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CompanyOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *CompanyOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *CompanyOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *CompanyOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *CompanyOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *CompanyOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *CompanyOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *CompanyOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *CompanyOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *CompanyOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CourseOfActionInput.md b/docs/CourseOfActionInput.md new file mode 100644 index 0000000..a8a7faa --- /dev/null +++ b/docs/CourseOfActionInput.md @@ -0,0 +1,181 @@ +# CourseOfActionInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "course-of-action"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewCourseOfActionInput + +`func NewCourseOfActionInput(name string, ) *CourseOfActionInput` + +NewCourseOfActionInput instantiates a new CourseOfActionInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCourseOfActionInputWithDefaults + +`func NewCourseOfActionInputWithDefaults() *CourseOfActionInput` + +NewCourseOfActionInputWithDefaults instantiates a new CourseOfActionInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *CourseOfActionInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CourseOfActionInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CourseOfActionInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CourseOfActionInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *CourseOfActionInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CourseOfActionInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CourseOfActionInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CourseOfActionInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CourseOfActionInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CourseOfActionInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CourseOfActionInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *CourseOfActionInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CourseOfActionInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CourseOfActionInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CourseOfActionInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *CourseOfActionInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CourseOfActionInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CourseOfActionInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CourseOfActionInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *CourseOfActionInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *CourseOfActionInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *CourseOfActionInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *CourseOfActionInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CourseOfActionOutput.md b/docs/CourseOfActionOutput.md new file mode 100644 index 0000000..44c12f7 --- /dev/null +++ b/docs/CourseOfActionOutput.md @@ -0,0 +1,265 @@ +# CourseOfActionOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "course-of-action"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewCourseOfActionOutput + +`func NewCourseOfActionOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *CourseOfActionOutput` + +NewCourseOfActionOutput instantiates a new CourseOfActionOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCourseOfActionOutputWithDefaults + +`func NewCourseOfActionOutputWithDefaults() *CourseOfActionOutput` + +NewCourseOfActionOutputWithDefaults instantiates a new CourseOfActionOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *CourseOfActionOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CourseOfActionOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CourseOfActionOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CourseOfActionOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *CourseOfActionOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CourseOfActionOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CourseOfActionOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CourseOfActionOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CourseOfActionOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CourseOfActionOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CourseOfActionOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *CourseOfActionOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CourseOfActionOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CourseOfActionOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CourseOfActionOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *CourseOfActionOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *CourseOfActionOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *CourseOfActionOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *CourseOfActionOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *CourseOfActionOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *CourseOfActionOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *CourseOfActionOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *CourseOfActionOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetId + +`func (o *CourseOfActionOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CourseOfActionOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CourseOfActionOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *CourseOfActionOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *CourseOfActionOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *CourseOfActionOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *CourseOfActionOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *CourseOfActionOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *CourseOfActionOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *CourseOfActionOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *CourseOfActionOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *CourseOfActionOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQApproach.md b/docs/DFIQApproach.md new file mode 100644 index 0000000..2160c27 --- /dev/null +++ b/docs/DFIQApproach.md @@ -0,0 +1,186 @@ +# DFIQApproach + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | **string** | | +**Tags** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] +**Notes** | Pointer to [**NullableDFIQApproachNotes**](DFIQApproachNotes.md) | | [optional] +**Steps** | Pointer to [**[]DFIQApproachStep**](DFIQApproachStep.md) | | [optional] [default to []] + +## Methods + +### NewDFIQApproach + +`func NewDFIQApproach(name string, description string, ) *DFIQApproach` + +NewDFIQApproach instantiates a new DFIQApproach object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQApproachWithDefaults + +`func NewDFIQApproachWithDefaults() *DFIQApproach` + +NewDFIQApproachWithDefaults instantiates a new DFIQApproach object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DFIQApproach) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DFIQApproach) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DFIQApproach) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DFIQApproach) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DFIQApproach) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DFIQApproach) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetTags + +`func (o *DFIQApproach) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *DFIQApproach) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *DFIQApproach) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *DFIQApproach) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetReferences + +`func (o *DFIQApproach) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *DFIQApproach) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *DFIQApproach) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *DFIQApproach) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + +### GetNotes + +`func (o *DFIQApproach) GetNotes() DFIQApproachNotes` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *DFIQApproach) GetNotesOk() (*DFIQApproachNotes, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *DFIQApproach) SetNotes(v DFIQApproachNotes)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *DFIQApproach) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### SetNotesNil + +`func (o *DFIQApproach) SetNotesNil(b bool)` + + SetNotesNil sets the value for Notes to be an explicit nil + +### UnsetNotes +`func (o *DFIQApproach) UnsetNotes()` + +UnsetNotes ensures that no value is present for Notes, not even an explicit nil +### GetSteps + +`func (o *DFIQApproach) GetSteps() []DFIQApproachStep` + +GetSteps returns the Steps field if non-nil, zero value otherwise. + +### GetStepsOk + +`func (o *DFIQApproach) GetStepsOk() (*[]DFIQApproachStep, bool)` + +GetStepsOk returns a tuple with the Steps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSteps + +`func (o *DFIQApproach) SetSteps(v []DFIQApproachStep)` + +SetSteps sets Steps field to given value. + +### HasSteps + +`func (o *DFIQApproach) HasSteps() bool` + +HasSteps returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQApproachNotes.md b/docs/DFIQApproachNotes.md new file mode 100644 index 0000000..76a664b --- /dev/null +++ b/docs/DFIQApproachNotes.md @@ -0,0 +1,82 @@ +# DFIQApproachNotes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Covered** | Pointer to **[]string** | | [optional] [default to []] +**NotCovered** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewDFIQApproachNotes + +`func NewDFIQApproachNotes() *DFIQApproachNotes` + +NewDFIQApproachNotes instantiates a new DFIQApproachNotes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQApproachNotesWithDefaults + +`func NewDFIQApproachNotesWithDefaults() *DFIQApproachNotes` + +NewDFIQApproachNotesWithDefaults instantiates a new DFIQApproachNotes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCovered + +`func (o *DFIQApproachNotes) GetCovered() []string` + +GetCovered returns the Covered field if non-nil, zero value otherwise. + +### GetCoveredOk + +`func (o *DFIQApproachNotes) GetCoveredOk() (*[]string, bool)` + +GetCoveredOk returns a tuple with the Covered field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCovered + +`func (o *DFIQApproachNotes) SetCovered(v []string)` + +SetCovered sets Covered field to given value. + +### HasCovered + +`func (o *DFIQApproachNotes) HasCovered() bool` + +HasCovered returns a boolean if a field has been set. + +### GetNotCovered + +`func (o *DFIQApproachNotes) GetNotCovered() []string` + +GetNotCovered returns the NotCovered field if non-nil, zero value otherwise. + +### GetNotCoveredOk + +`func (o *DFIQApproachNotes) GetNotCoveredOk() (*[]string, bool)` + +GetNotCoveredOk returns a tuple with the NotCovered field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotCovered + +`func (o *DFIQApproachNotes) SetNotCovered(v []string)` + +SetNotCovered sets NotCovered field to given value. + +### HasNotCovered + +`func (o *DFIQApproachNotes) HasNotCovered() bool` + +HasNotCovered returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQApproachStep.md b/docs/DFIQApproachStep.md new file mode 100644 index 0000000..18ff699 --- /dev/null +++ b/docs/DFIQApproachStep.md @@ -0,0 +1,180 @@ +# DFIQApproachStep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | Pointer to **NullableString** | | [optional] +**Stage** | **string** | | +**Type** | Pointer to **NullableString** | | [optional] +**Value** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDFIQApproachStep + +`func NewDFIQApproachStep(name string, stage string, ) *DFIQApproachStep` + +NewDFIQApproachStep instantiates a new DFIQApproachStep object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQApproachStepWithDefaults + +`func NewDFIQApproachStepWithDefaults() *DFIQApproachStep` + +NewDFIQApproachStepWithDefaults instantiates a new DFIQApproachStep object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DFIQApproachStep) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DFIQApproachStep) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DFIQApproachStep) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DFIQApproachStep) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DFIQApproachStep) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DFIQApproachStep) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *DFIQApproachStep) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *DFIQApproachStep) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *DFIQApproachStep) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetStage + +`func (o *DFIQApproachStep) GetStage() string` + +GetStage returns the Stage field if non-nil, zero value otherwise. + +### GetStageOk + +`func (o *DFIQApproachStep) GetStageOk() (*string, bool)` + +GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStage + +`func (o *DFIQApproachStep) SetStage(v string)` + +SetStage sets Stage field to given value. + + +### GetType + +`func (o *DFIQApproachStep) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DFIQApproachStep) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DFIQApproachStep) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DFIQApproachStep) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetTypeNil + +`func (o *DFIQApproachStep) SetTypeNil(b bool)` + + SetTypeNil sets the value for Type to be an explicit nil + +### UnsetType +`func (o *DFIQApproachStep) UnsetType()` + +UnsetType ensures that no value is present for Type, not even an explicit nil +### GetValue + +`func (o *DFIQApproachStep) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DFIQApproachStep) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *DFIQApproachStep) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *DFIQApproachStep) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### SetValueNil + +`func (o *DFIQApproachStep) SetValueNil(b bool)` + + SetValueNil sets the value for Value to be an explicit nil + +### UnsetValue +`func (o *DFIQApproachStep) UnsetValue()` + +UnsetValue ensures that no value is present for Value, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQConfigResponse.md b/docs/DFIQConfigResponse.md new file mode 100644 index 0000000..f1a033d --- /dev/null +++ b/docs/DFIQConfigResponse.md @@ -0,0 +1,72 @@ +# DFIQConfigResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StageTypes** | **[]string** | | +**StepTypes** | **[]string** | | + +## Methods + +### NewDFIQConfigResponse + +`func NewDFIQConfigResponse(stageTypes []string, stepTypes []string, ) *DFIQConfigResponse` + +NewDFIQConfigResponse instantiates a new DFIQConfigResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQConfigResponseWithDefaults + +`func NewDFIQConfigResponseWithDefaults() *DFIQConfigResponse` + +NewDFIQConfigResponseWithDefaults instantiates a new DFIQConfigResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStageTypes + +`func (o *DFIQConfigResponse) GetStageTypes() []string` + +GetStageTypes returns the StageTypes field if non-nil, zero value otherwise. + +### GetStageTypesOk + +`func (o *DFIQConfigResponse) GetStageTypesOk() (*[]string, bool)` + +GetStageTypesOk returns a tuple with the StageTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStageTypes + +`func (o *DFIQConfigResponse) SetStageTypes(v []string)` + +SetStageTypes sets StageTypes field to given value. + + +### GetStepTypes + +`func (o *DFIQConfigResponse) GetStepTypes() []string` + +GetStepTypes returns the StepTypes field if non-nil, zero value otherwise. + +### GetStepTypesOk + +`func (o *DFIQConfigResponse) GetStepTypesOk() (*[]string, bool)` + +GetStepTypesOk returns a tuple with the StepTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStepTypes + +`func (o *DFIQConfigResponse) SetStepTypes(v []string)` + +SetStepTypes sets StepTypes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQFacet.md b/docs/DFIQFacet.md new file mode 100644 index 0000000..04678bb --- /dev/null +++ b/docs/DFIQFacet.md @@ -0,0 +1,409 @@ +# DFIQFacet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Uuid** | Pointer to **NullableString** | | [optional] +**DfiqId** | Pointer to **NullableString** | | [optional] +**DfiqVersion** | **string** | | +**DfiqTags** | Pointer to **[]string** | | [optional] +**Contributors** | Pointer to **[]string** | | [optional] +**DfiqYaml** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Description** | **NullableString** | | +**ParentIds** | **[]string** | | +**Type** | Pointer to **string** | | [optional] [default to "facet"] +**Id** | **string** | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewDFIQFacet + +`func NewDFIQFacet(name string, dfiqVersion string, dfiqYaml string, description NullableString, parentIds []string, id string, rootType string, ) *DFIQFacet` + +NewDFIQFacet instantiates a new DFIQFacet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQFacetWithDefaults + +`func NewDFIQFacetWithDefaults() *DFIQFacet` + +NewDFIQFacetWithDefaults instantiates a new DFIQFacet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DFIQFacet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DFIQFacet) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DFIQFacet) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUuid + +`func (o *DFIQFacet) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *DFIQFacet) GetUuidOk() (*string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUuid + +`func (o *DFIQFacet) SetUuid(v string)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *DFIQFacet) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuidNil + +`func (o *DFIQFacet) SetUuidNil(b bool)` + + SetUuidNil sets the value for Uuid to be an explicit nil + +### UnsetUuid +`func (o *DFIQFacet) UnsetUuid()` + +UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +### GetDfiqId + +`func (o *DFIQFacet) GetDfiqId() string` + +GetDfiqId returns the DfiqId field if non-nil, zero value otherwise. + +### GetDfiqIdOk + +`func (o *DFIQFacet) GetDfiqIdOk() (*string, bool)` + +GetDfiqIdOk returns a tuple with the DfiqId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqId + +`func (o *DFIQFacet) SetDfiqId(v string)` + +SetDfiqId sets DfiqId field to given value. + +### HasDfiqId + +`func (o *DFIQFacet) HasDfiqId() bool` + +HasDfiqId returns a boolean if a field has been set. + +### SetDfiqIdNil + +`func (o *DFIQFacet) SetDfiqIdNil(b bool)` + + SetDfiqIdNil sets the value for DfiqId to be an explicit nil + +### UnsetDfiqId +`func (o *DFIQFacet) UnsetDfiqId()` + +UnsetDfiqId ensures that no value is present for DfiqId, not even an explicit nil +### GetDfiqVersion + +`func (o *DFIQFacet) GetDfiqVersion() string` + +GetDfiqVersion returns the DfiqVersion field if non-nil, zero value otherwise. + +### GetDfiqVersionOk + +`func (o *DFIQFacet) GetDfiqVersionOk() (*string, bool)` + +GetDfiqVersionOk returns a tuple with the DfiqVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqVersion + +`func (o *DFIQFacet) SetDfiqVersion(v string)` + +SetDfiqVersion sets DfiqVersion field to given value. + + +### GetDfiqTags + +`func (o *DFIQFacet) GetDfiqTags() []string` + +GetDfiqTags returns the DfiqTags field if non-nil, zero value otherwise. + +### GetDfiqTagsOk + +`func (o *DFIQFacet) GetDfiqTagsOk() (*[]string, bool)` + +GetDfiqTagsOk returns a tuple with the DfiqTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqTags + +`func (o *DFIQFacet) SetDfiqTags(v []string)` + +SetDfiqTags sets DfiqTags field to given value. + +### HasDfiqTags + +`func (o *DFIQFacet) HasDfiqTags() bool` + +HasDfiqTags returns a boolean if a field has been set. + +### SetDfiqTagsNil + +`func (o *DFIQFacet) SetDfiqTagsNil(b bool)` + + SetDfiqTagsNil sets the value for DfiqTags to be an explicit nil + +### UnsetDfiqTags +`func (o *DFIQFacet) UnsetDfiqTags()` + +UnsetDfiqTags ensures that no value is present for DfiqTags, not even an explicit nil +### GetContributors + +`func (o *DFIQFacet) GetContributors() []string` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *DFIQFacet) GetContributorsOk() (*[]string, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *DFIQFacet) SetContributors(v []string)` + +SetContributors sets Contributors field to given value. + +### HasContributors + +`func (o *DFIQFacet) HasContributors() bool` + +HasContributors returns a boolean if a field has been set. + +### SetContributorsNil + +`func (o *DFIQFacet) SetContributorsNil(b bool)` + + SetContributorsNil sets the value for Contributors to be an explicit nil + +### UnsetContributors +`func (o *DFIQFacet) UnsetContributors()` + +UnsetContributors ensures that no value is present for Contributors, not even an explicit nil +### GetDfiqYaml + +`func (o *DFIQFacet) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *DFIQFacet) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *DFIQFacet) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetCreated + +`func (o *DFIQFacet) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *DFIQFacet) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *DFIQFacet) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *DFIQFacet) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *DFIQFacet) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *DFIQFacet) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *DFIQFacet) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *DFIQFacet) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetDescription + +`func (o *DFIQFacet) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DFIQFacet) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DFIQFacet) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### SetDescriptionNil + +`func (o *DFIQFacet) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *DFIQFacet) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetParentIds + +`func (o *DFIQFacet) GetParentIds() []string` + +GetParentIds returns the ParentIds field if non-nil, zero value otherwise. + +### GetParentIdsOk + +`func (o *DFIQFacet) GetParentIdsOk() (*[]string, bool)` + +GetParentIdsOk returns a tuple with the ParentIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentIds + +`func (o *DFIQFacet) SetParentIds(v []string)` + +SetParentIds sets ParentIds field to given value. + + +### GetType + +`func (o *DFIQFacet) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DFIQFacet) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DFIQFacet) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DFIQFacet) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *DFIQFacet) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DFIQFacet) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DFIQFacet) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRootType + +`func (o *DFIQFacet) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *DFIQFacet) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *DFIQFacet) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQQuestion.md b/docs/DFIQQuestion.md new file mode 100644 index 0000000..516b934 --- /dev/null +++ b/docs/DFIQQuestion.md @@ -0,0 +1,435 @@ +# DFIQQuestion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Uuid** | Pointer to **NullableString** | | [optional] +**DfiqId** | Pointer to **NullableString** | | [optional] +**DfiqVersion** | **string** | | +**DfiqTags** | Pointer to **[]string** | | [optional] +**Contributors** | Pointer to **[]string** | | [optional] +**DfiqYaml** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Description** | **NullableString** | | +**ParentIds** | **[]string** | | +**Type** | Pointer to **string** | | [optional] [default to "question"] +**Approaches** | Pointer to [**[]DFIQApproach**](DFIQApproach.md) | | [optional] [default to []] +**Id** | **string** | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewDFIQQuestion + +`func NewDFIQQuestion(name string, dfiqVersion string, dfiqYaml string, description NullableString, parentIds []string, id string, rootType string, ) *DFIQQuestion` + +NewDFIQQuestion instantiates a new DFIQQuestion object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQQuestionWithDefaults + +`func NewDFIQQuestionWithDefaults() *DFIQQuestion` + +NewDFIQQuestionWithDefaults instantiates a new DFIQQuestion object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DFIQQuestion) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DFIQQuestion) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DFIQQuestion) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUuid + +`func (o *DFIQQuestion) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *DFIQQuestion) GetUuidOk() (*string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUuid + +`func (o *DFIQQuestion) SetUuid(v string)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *DFIQQuestion) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuidNil + +`func (o *DFIQQuestion) SetUuidNil(b bool)` + + SetUuidNil sets the value for Uuid to be an explicit nil + +### UnsetUuid +`func (o *DFIQQuestion) UnsetUuid()` + +UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +### GetDfiqId + +`func (o *DFIQQuestion) GetDfiqId() string` + +GetDfiqId returns the DfiqId field if non-nil, zero value otherwise. + +### GetDfiqIdOk + +`func (o *DFIQQuestion) GetDfiqIdOk() (*string, bool)` + +GetDfiqIdOk returns a tuple with the DfiqId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqId + +`func (o *DFIQQuestion) SetDfiqId(v string)` + +SetDfiqId sets DfiqId field to given value. + +### HasDfiqId + +`func (o *DFIQQuestion) HasDfiqId() bool` + +HasDfiqId returns a boolean if a field has been set. + +### SetDfiqIdNil + +`func (o *DFIQQuestion) SetDfiqIdNil(b bool)` + + SetDfiqIdNil sets the value for DfiqId to be an explicit nil + +### UnsetDfiqId +`func (o *DFIQQuestion) UnsetDfiqId()` + +UnsetDfiqId ensures that no value is present for DfiqId, not even an explicit nil +### GetDfiqVersion + +`func (o *DFIQQuestion) GetDfiqVersion() string` + +GetDfiqVersion returns the DfiqVersion field if non-nil, zero value otherwise. + +### GetDfiqVersionOk + +`func (o *DFIQQuestion) GetDfiqVersionOk() (*string, bool)` + +GetDfiqVersionOk returns a tuple with the DfiqVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqVersion + +`func (o *DFIQQuestion) SetDfiqVersion(v string)` + +SetDfiqVersion sets DfiqVersion field to given value. + + +### GetDfiqTags + +`func (o *DFIQQuestion) GetDfiqTags() []string` + +GetDfiqTags returns the DfiqTags field if non-nil, zero value otherwise. + +### GetDfiqTagsOk + +`func (o *DFIQQuestion) GetDfiqTagsOk() (*[]string, bool)` + +GetDfiqTagsOk returns a tuple with the DfiqTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqTags + +`func (o *DFIQQuestion) SetDfiqTags(v []string)` + +SetDfiqTags sets DfiqTags field to given value. + +### HasDfiqTags + +`func (o *DFIQQuestion) HasDfiqTags() bool` + +HasDfiqTags returns a boolean if a field has been set. + +### SetDfiqTagsNil + +`func (o *DFIQQuestion) SetDfiqTagsNil(b bool)` + + SetDfiqTagsNil sets the value for DfiqTags to be an explicit nil + +### UnsetDfiqTags +`func (o *DFIQQuestion) UnsetDfiqTags()` + +UnsetDfiqTags ensures that no value is present for DfiqTags, not even an explicit nil +### GetContributors + +`func (o *DFIQQuestion) GetContributors() []string` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *DFIQQuestion) GetContributorsOk() (*[]string, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *DFIQQuestion) SetContributors(v []string)` + +SetContributors sets Contributors field to given value. + +### HasContributors + +`func (o *DFIQQuestion) HasContributors() bool` + +HasContributors returns a boolean if a field has been set. + +### SetContributorsNil + +`func (o *DFIQQuestion) SetContributorsNil(b bool)` + + SetContributorsNil sets the value for Contributors to be an explicit nil + +### UnsetContributors +`func (o *DFIQQuestion) UnsetContributors()` + +UnsetContributors ensures that no value is present for Contributors, not even an explicit nil +### GetDfiqYaml + +`func (o *DFIQQuestion) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *DFIQQuestion) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *DFIQQuestion) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetCreated + +`func (o *DFIQQuestion) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *DFIQQuestion) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *DFIQQuestion) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *DFIQQuestion) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *DFIQQuestion) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *DFIQQuestion) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *DFIQQuestion) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *DFIQQuestion) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetDescription + +`func (o *DFIQQuestion) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DFIQQuestion) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DFIQQuestion) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### SetDescriptionNil + +`func (o *DFIQQuestion) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *DFIQQuestion) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetParentIds + +`func (o *DFIQQuestion) GetParentIds() []string` + +GetParentIds returns the ParentIds field if non-nil, zero value otherwise. + +### GetParentIdsOk + +`func (o *DFIQQuestion) GetParentIdsOk() (*[]string, bool)` + +GetParentIdsOk returns a tuple with the ParentIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentIds + +`func (o *DFIQQuestion) SetParentIds(v []string)` + +SetParentIds sets ParentIds field to given value. + + +### GetType + +`func (o *DFIQQuestion) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DFIQQuestion) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DFIQQuestion) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DFIQQuestion) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetApproaches + +`func (o *DFIQQuestion) GetApproaches() []DFIQApproach` + +GetApproaches returns the Approaches field if non-nil, zero value otherwise. + +### GetApproachesOk + +`func (o *DFIQQuestion) GetApproachesOk() (*[]DFIQApproach, bool)` + +GetApproachesOk returns a tuple with the Approaches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApproaches + +`func (o *DFIQQuestion) SetApproaches(v []DFIQApproach)` + +SetApproaches sets Approaches field to given value. + +### HasApproaches + +`func (o *DFIQQuestion) HasApproaches() bool` + +HasApproaches returns a boolean if a field has been set. + +### GetId + +`func (o *DFIQQuestion) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DFIQQuestion) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DFIQQuestion) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRootType + +`func (o *DFIQQuestion) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *DFIQQuestion) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *DFIQQuestion) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQScenario.md b/docs/DFIQScenario.md new file mode 100644 index 0000000..e9cd0c6 --- /dev/null +++ b/docs/DFIQScenario.md @@ -0,0 +1,378 @@ +# DFIQScenario + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Uuid** | Pointer to **NullableString** | | [optional] +**DfiqId** | Pointer to **NullableString** | | [optional] +**DfiqVersion** | **string** | | +**DfiqTags** | Pointer to **[]string** | | [optional] +**Contributors** | Pointer to **[]string** | | [optional] +**DfiqYaml** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Description** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "scenario"] +**Id** | **string** | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewDFIQScenario + +`func NewDFIQScenario(name string, dfiqVersion string, dfiqYaml string, description string, id string, rootType string, ) *DFIQScenario` + +NewDFIQScenario instantiates a new DFIQScenario object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQScenarioWithDefaults + +`func NewDFIQScenarioWithDefaults() *DFIQScenario` + +NewDFIQScenarioWithDefaults instantiates a new DFIQScenario object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DFIQScenario) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DFIQScenario) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DFIQScenario) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUuid + +`func (o *DFIQScenario) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *DFIQScenario) GetUuidOk() (*string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUuid + +`func (o *DFIQScenario) SetUuid(v string)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *DFIQScenario) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuidNil + +`func (o *DFIQScenario) SetUuidNil(b bool)` + + SetUuidNil sets the value for Uuid to be an explicit nil + +### UnsetUuid +`func (o *DFIQScenario) UnsetUuid()` + +UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +### GetDfiqId + +`func (o *DFIQScenario) GetDfiqId() string` + +GetDfiqId returns the DfiqId field if non-nil, zero value otherwise. + +### GetDfiqIdOk + +`func (o *DFIQScenario) GetDfiqIdOk() (*string, bool)` + +GetDfiqIdOk returns a tuple with the DfiqId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqId + +`func (o *DFIQScenario) SetDfiqId(v string)` + +SetDfiqId sets DfiqId field to given value. + +### HasDfiqId + +`func (o *DFIQScenario) HasDfiqId() bool` + +HasDfiqId returns a boolean if a field has been set. + +### SetDfiqIdNil + +`func (o *DFIQScenario) SetDfiqIdNil(b bool)` + + SetDfiqIdNil sets the value for DfiqId to be an explicit nil + +### UnsetDfiqId +`func (o *DFIQScenario) UnsetDfiqId()` + +UnsetDfiqId ensures that no value is present for DfiqId, not even an explicit nil +### GetDfiqVersion + +`func (o *DFIQScenario) GetDfiqVersion() string` + +GetDfiqVersion returns the DfiqVersion field if non-nil, zero value otherwise. + +### GetDfiqVersionOk + +`func (o *DFIQScenario) GetDfiqVersionOk() (*string, bool)` + +GetDfiqVersionOk returns a tuple with the DfiqVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqVersion + +`func (o *DFIQScenario) SetDfiqVersion(v string)` + +SetDfiqVersion sets DfiqVersion field to given value. + + +### GetDfiqTags + +`func (o *DFIQScenario) GetDfiqTags() []string` + +GetDfiqTags returns the DfiqTags field if non-nil, zero value otherwise. + +### GetDfiqTagsOk + +`func (o *DFIQScenario) GetDfiqTagsOk() (*[]string, bool)` + +GetDfiqTagsOk returns a tuple with the DfiqTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqTags + +`func (o *DFIQScenario) SetDfiqTags(v []string)` + +SetDfiqTags sets DfiqTags field to given value. + +### HasDfiqTags + +`func (o *DFIQScenario) HasDfiqTags() bool` + +HasDfiqTags returns a boolean if a field has been set. + +### SetDfiqTagsNil + +`func (o *DFIQScenario) SetDfiqTagsNil(b bool)` + + SetDfiqTagsNil sets the value for DfiqTags to be an explicit nil + +### UnsetDfiqTags +`func (o *DFIQScenario) UnsetDfiqTags()` + +UnsetDfiqTags ensures that no value is present for DfiqTags, not even an explicit nil +### GetContributors + +`func (o *DFIQScenario) GetContributors() []string` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *DFIQScenario) GetContributorsOk() (*[]string, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *DFIQScenario) SetContributors(v []string)` + +SetContributors sets Contributors field to given value. + +### HasContributors + +`func (o *DFIQScenario) HasContributors() bool` + +HasContributors returns a boolean if a field has been set. + +### SetContributorsNil + +`func (o *DFIQScenario) SetContributorsNil(b bool)` + + SetContributorsNil sets the value for Contributors to be an explicit nil + +### UnsetContributors +`func (o *DFIQScenario) UnsetContributors()` + +UnsetContributors ensures that no value is present for Contributors, not even an explicit nil +### GetDfiqYaml + +`func (o *DFIQScenario) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *DFIQScenario) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *DFIQScenario) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetCreated + +`func (o *DFIQScenario) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *DFIQScenario) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *DFIQScenario) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *DFIQScenario) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *DFIQScenario) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *DFIQScenario) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *DFIQScenario) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *DFIQScenario) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetDescription + +`func (o *DFIQScenario) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DFIQScenario) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DFIQScenario) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *DFIQScenario) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DFIQScenario) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DFIQScenario) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DFIQScenario) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *DFIQScenario) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DFIQScenario) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DFIQScenario) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRootType + +`func (o *DFIQScenario) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *DFIQScenario) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *DFIQScenario) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQSearchRequest.md b/docs/DFIQSearchRequest.md new file mode 100644 index 0000000..24ca112 --- /dev/null +++ b/docs/DFIQSearchRequest.md @@ -0,0 +1,186 @@ +# DFIQSearchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | Pointer to [**map[string]QueryValue**](QueryValue.md) | | [optional] [default to {}] +**Type** | Pointer to [**DFIQSearchRequestType**](DFIQSearchRequestType.md) | | [optional] +**Sorting** | Pointer to **[][]interface{}** | | [optional] [default to []] +**FilterAliases** | Pointer to **[][]interface{}** | | [optional] [default to []] +**Count** | Pointer to **int32** | | [optional] [default to 50] +**Page** | Pointer to **int32** | | [optional] [default to 0] + +## Methods + +### NewDFIQSearchRequest + +`func NewDFIQSearchRequest() *DFIQSearchRequest` + +NewDFIQSearchRequest instantiates a new DFIQSearchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQSearchRequestWithDefaults + +`func NewDFIQSearchRequestWithDefaults() *DFIQSearchRequest` + +NewDFIQSearchRequestWithDefaults instantiates a new DFIQSearchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *DFIQSearchRequest) GetQuery() map[string]QueryValue` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *DFIQSearchRequest) GetQueryOk() (*map[string]QueryValue, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *DFIQSearchRequest) SetQuery(v map[string]QueryValue)` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *DFIQSearchRequest) HasQuery() bool` + +HasQuery returns a boolean if a field has been set. + +### GetType + +`func (o *DFIQSearchRequest) GetType() DFIQSearchRequestType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DFIQSearchRequest) GetTypeOk() (*DFIQSearchRequestType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DFIQSearchRequest) SetType(v DFIQSearchRequestType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DFIQSearchRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSorting + +`func (o *DFIQSearchRequest) GetSorting() [][]interface{}` + +GetSorting returns the Sorting field if non-nil, zero value otherwise. + +### GetSortingOk + +`func (o *DFIQSearchRequest) GetSortingOk() (*[][]interface{}, bool)` + +GetSortingOk returns a tuple with the Sorting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSorting + +`func (o *DFIQSearchRequest) SetSorting(v [][]interface{})` + +SetSorting sets Sorting field to given value. + +### HasSorting + +`func (o *DFIQSearchRequest) HasSorting() bool` + +HasSorting returns a boolean if a field has been set. + +### GetFilterAliases + +`func (o *DFIQSearchRequest) GetFilterAliases() [][]interface{}` + +GetFilterAliases returns the FilterAliases field if non-nil, zero value otherwise. + +### GetFilterAliasesOk + +`func (o *DFIQSearchRequest) GetFilterAliasesOk() (*[][]interface{}, bool)` + +GetFilterAliasesOk returns a tuple with the FilterAliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilterAliases + +`func (o *DFIQSearchRequest) SetFilterAliases(v [][]interface{})` + +SetFilterAliases sets FilterAliases field to given value. + +### HasFilterAliases + +`func (o *DFIQSearchRequest) HasFilterAliases() bool` + +HasFilterAliases returns a boolean if a field has been set. + +### GetCount + +`func (o *DFIQSearchRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *DFIQSearchRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *DFIQSearchRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *DFIQSearchRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetPage + +`func (o *DFIQSearchRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *DFIQSearchRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *DFIQSearchRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *DFIQSearchRequest) HasPage() bool` + +HasPage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQSearchRequestType.md b/docs/DFIQSearchRequestType.md new file mode 100644 index 0000000..f58e833 --- /dev/null +++ b/docs/DFIQSearchRequestType.md @@ -0,0 +1,30 @@ +# DFIQSearchRequestType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewDFIQSearchRequestType + +`func NewDFIQSearchRequestType() *DFIQSearchRequestType` + +NewDFIQSearchRequestType instantiates a new DFIQSearchRequestType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQSearchRequestTypeWithDefaults + +`func NewDFIQSearchRequestTypeWithDefaults() *DFIQSearchRequestType` + +NewDFIQSearchRequestTypeWithDefaults instantiates a new DFIQSearchRequestType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQSearchResponse.md b/docs/DFIQSearchResponse.md new file mode 100644 index 0000000..526a6c5 --- /dev/null +++ b/docs/DFIQSearchResponse.md @@ -0,0 +1,72 @@ +# DFIQSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Dfiq** | [**[]DfiqInner**](DfiqInner.md) | | +**Total** | **int32** | | + +## Methods + +### NewDFIQSearchResponse + +`func NewDFIQSearchResponse(dfiq []DfiqInner, total int32, ) *DFIQSearchResponse` + +NewDFIQSearchResponse instantiates a new DFIQSearchResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQSearchResponseWithDefaults + +`func NewDFIQSearchResponseWithDefaults() *DFIQSearchResponse` + +NewDFIQSearchResponseWithDefaults instantiates a new DFIQSearchResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDfiq + +`func (o *DFIQSearchResponse) GetDfiq() []DfiqInner` + +GetDfiq returns the Dfiq field if non-nil, zero value otherwise. + +### GetDfiqOk + +`func (o *DFIQSearchResponse) GetDfiqOk() (*[]DfiqInner, bool)` + +GetDfiqOk returns a tuple with the Dfiq field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiq + +`func (o *DFIQSearchResponse) SetDfiq(v []DfiqInner)` + +SetDfiq sets Dfiq field to given value. + + +### GetTotal + +`func (o *DFIQSearchResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *DFIQSearchResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *DFIQSearchResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQType.md b/docs/DFIQType.md new file mode 100644 index 0000000..78b7c13 --- /dev/null +++ b/docs/DFIQType.md @@ -0,0 +1,15 @@ +# DFIQType + +## Enum + + +* `SCENARIO` (value: `"scenario"`) + +* `FACET` (value: `"facet"`) + +* `QUESTION` (value: `"question"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQValidateRequest.md b/docs/DFIQValidateRequest.md new file mode 100644 index 0000000..1c0bb24 --- /dev/null +++ b/docs/DFIQValidateRequest.md @@ -0,0 +1,124 @@ +# DFIQValidateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DfiqYaml** | **string** | | +**DfiqType** | [**DFIQType**](DFIQType.md) | | +**UpdateIndicators** | Pointer to **bool** | | [optional] [default to false] +**CheckId** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewDFIQValidateRequest + +`func NewDFIQValidateRequest(dfiqYaml string, dfiqType DFIQType, ) *DFIQValidateRequest` + +NewDFIQValidateRequest instantiates a new DFIQValidateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQValidateRequestWithDefaults + +`func NewDFIQValidateRequestWithDefaults() *DFIQValidateRequest` + +NewDFIQValidateRequestWithDefaults instantiates a new DFIQValidateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDfiqYaml + +`func (o *DFIQValidateRequest) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *DFIQValidateRequest) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *DFIQValidateRequest) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetDfiqType + +`func (o *DFIQValidateRequest) GetDfiqType() DFIQType` + +GetDfiqType returns the DfiqType field if non-nil, zero value otherwise. + +### GetDfiqTypeOk + +`func (o *DFIQValidateRequest) GetDfiqTypeOk() (*DFIQType, bool)` + +GetDfiqTypeOk returns a tuple with the DfiqType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqType + +`func (o *DFIQValidateRequest) SetDfiqType(v DFIQType)` + +SetDfiqType sets DfiqType field to given value. + + +### GetUpdateIndicators + +`func (o *DFIQValidateRequest) GetUpdateIndicators() bool` + +GetUpdateIndicators returns the UpdateIndicators field if non-nil, zero value otherwise. + +### GetUpdateIndicatorsOk + +`func (o *DFIQValidateRequest) GetUpdateIndicatorsOk() (*bool, bool)` + +GetUpdateIndicatorsOk returns a tuple with the UpdateIndicators field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdateIndicators + +`func (o *DFIQValidateRequest) SetUpdateIndicators(v bool)` + +SetUpdateIndicators sets UpdateIndicators field to given value. + +### HasUpdateIndicators + +`func (o *DFIQValidateRequest) HasUpdateIndicators() bool` + +HasUpdateIndicators returns a boolean if a field has been set. + +### GetCheckId + +`func (o *DFIQValidateRequest) GetCheckId() bool` + +GetCheckId returns the CheckId field if non-nil, zero value otherwise. + +### GetCheckIdOk + +`func (o *DFIQValidateRequest) GetCheckIdOk() (*bool, bool)` + +GetCheckIdOk returns a tuple with the CheckId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCheckId + +`func (o *DFIQValidateRequest) SetCheckId(v bool)` + +SetCheckId sets CheckId field to given value. + +### HasCheckId + +`func (o *DFIQValidateRequest) HasCheckId() bool` + +HasCheckId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DFIQValidateResponse.md b/docs/DFIQValidateResponse.md new file mode 100644 index 0000000..33fad49 --- /dev/null +++ b/docs/DFIQValidateResponse.md @@ -0,0 +1,103 @@ +# DFIQValidateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | | +**Error** | Pointer to [**Error**](Error.md) | | [optional] [default to ] +**ErrorType** | Pointer to **string** | | [optional] [default to "message"] + +## Methods + +### NewDFIQValidateResponse + +`func NewDFIQValidateResponse(valid bool, ) *DFIQValidateResponse` + +NewDFIQValidateResponse instantiates a new DFIQValidateResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDFIQValidateResponseWithDefaults + +`func NewDFIQValidateResponseWithDefaults() *DFIQValidateResponse` + +NewDFIQValidateResponseWithDefaults instantiates a new DFIQValidateResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValid + +`func (o *DFIQValidateResponse) GetValid() bool` + +GetValid returns the Valid field if non-nil, zero value otherwise. + +### GetValidOk + +`func (o *DFIQValidateResponse) GetValidOk() (*bool, bool)` + +GetValidOk returns a tuple with the Valid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValid + +`func (o *DFIQValidateResponse) SetValid(v bool)` + +SetValid sets Valid field to given value. + + +### GetError + +`func (o *DFIQValidateResponse) GetError() Error` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *DFIQValidateResponse) GetErrorOk() (*Error, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *DFIQValidateResponse) SetError(v Error)` + +SetError sets Error field to given value. + +### HasError + +`func (o *DFIQValidateResponse) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetErrorType + +`func (o *DFIQValidateResponse) GetErrorType() string` + +GetErrorType returns the ErrorType field if non-nil, zero value otherwise. + +### GetErrorTypeOk + +`func (o *DFIQValidateResponse) GetErrorTypeOk() (*string, bool)` + +GetErrorTypeOk returns a tuple with the ErrorType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorType + +`func (o *DFIQValidateResponse) SetErrorType(v string)` + +SetErrorType sets ErrorType field to given value. + +### HasErrorType + +`func (o *DFIQValidateResponse) HasErrorType() bool` + +HasErrorType returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteContextRequest.md b/docs/DeleteContextRequest.md new file mode 100644 index 0000000..b49e1c5 --- /dev/null +++ b/docs/DeleteContextRequest.md @@ -0,0 +1,98 @@ +# DeleteContextRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | +**Context** | **map[string]interface{}** | | +**SkipCompare** | Pointer to **[]interface{}** | | [optional] [default to []] + +## Methods + +### NewDeleteContextRequest + +`func NewDeleteContextRequest(source string, context map[string]interface{}, ) *DeleteContextRequest` + +NewDeleteContextRequest instantiates a new DeleteContextRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeleteContextRequestWithDefaults + +`func NewDeleteContextRequestWithDefaults() *DeleteContextRequest` + +NewDeleteContextRequestWithDefaults instantiates a new DeleteContextRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSource + +`func (o *DeleteContextRequest) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *DeleteContextRequest) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *DeleteContextRequest) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetContext + +`func (o *DeleteContextRequest) GetContext() map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *DeleteContextRequest) GetContextOk() (*map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *DeleteContextRequest) SetContext(v map[string]interface{})` + +SetContext sets Context field to given value. + + +### GetSkipCompare + +`func (o *DeleteContextRequest) GetSkipCompare() []interface{}` + +GetSkipCompare returns the SkipCompare field if non-nil, zero value otherwise. + +### GetSkipCompareOk + +`func (o *DeleteContextRequest) GetSkipCompareOk() (*[]interface{}, bool)` + +GetSkipCompareOk returns a tuple with the SkipCompare field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSkipCompare + +`func (o *DeleteContextRequest) SetSkipCompare(v []interface{})` + +SetSkipCompare sets SkipCompare field to given value. + +### HasSkipCompare + +`func (o *DeleteContextRequest) HasSkipCompare() bool` + +HasSkipCompare returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DfiqAPI.md b/docs/DfiqAPI.md new file mode 100644 index 0000000..e7885fd --- /dev/null +++ b/docs/DfiqAPI.md @@ -0,0 +1,618 @@ +# \DfiqAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ConfigApiV2DfiqConfigGet**](DfiqAPI.md#ConfigApiV2DfiqConfigGet) | **Get** /api/v2/dfiq/config | Config +[**DeleteApiV2DfiqDfiqIdDelete**](DfiqAPI.md#DeleteApiV2DfiqDfiqIdDelete) | **Delete** /api/v2/dfiq/{dfiq_id} | Delete +[**DetailsApiV2DfiqDfiqIdGet**](DfiqAPI.md#DetailsApiV2DfiqDfiqIdGet) | **Get** /api/v2/dfiq/{dfiq_id} | Details +[**FromArchiveApiV2DfiqFromArchivePost**](DfiqAPI.md#FromArchiveApiV2DfiqFromArchivePost) | **Post** /api/v2/dfiq/from_archive | From Archive +[**NewFromYamlApiV2DfiqFromYamlPost**](DfiqAPI.md#NewFromYamlApiV2DfiqFromYamlPost) | **Post** /api/v2/dfiq/from_yaml | New From Yaml +[**PatchApiV2DfiqDfiqIdPatch**](DfiqAPI.md#PatchApiV2DfiqDfiqIdPatch) | **Patch** /api/v2/dfiq/{dfiq_id} | Patch +[**SearchApiV2DfiqSearchPost**](DfiqAPI.md#SearchApiV2DfiqSearchPost) | **Post** /api/v2/dfiq/search | Search +[**ToArchiveApiV2DfiqToArchivePost**](DfiqAPI.md#ToArchiveApiV2DfiqToArchivePost) | **Post** /api/v2/dfiq/to_archive | To Archive +[**ValidateDfiqYamlApiV2DfiqValidatePost**](DfiqAPI.md#ValidateDfiqYamlApiV2DfiqValidatePost) | **Post** /api/v2/dfiq/validate | Validate Dfiq Yaml + + + +## ConfigApiV2DfiqConfigGet + +> DFIQConfigResponse ConfigApiV2DfiqConfigGet(ctx).Execute() + +Config + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.ConfigApiV2DfiqConfigGet(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.ConfigApiV2DfiqConfigGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ConfigApiV2DfiqConfigGet`: DFIQConfigResponse + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.ConfigApiV2DfiqConfigGet`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiConfigApiV2DfiqConfigGetRequest struct via the builder pattern + + +### Return type + +[**DFIQConfigResponse**](DFIQConfigResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApiV2DfiqDfiqIdDelete + +> interface{} DeleteApiV2DfiqDfiqIdDelete(ctx, dfiqId).Execute() + +Delete + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + dfiqId := "dfiqId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.DeleteApiV2DfiqDfiqIdDelete(context.Background(), dfiqId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.DeleteApiV2DfiqDfiqIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApiV2DfiqDfiqIdDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.DeleteApiV2DfiqDfiqIdDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dfiqId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApiV2DfiqDfiqIdDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DetailsApiV2DfiqDfiqIdGet + +> ResponseDetailsApiV2DfiqDfiqIdGet DetailsApiV2DfiqDfiqIdGet(ctx, dfiqId).Execute() + +Details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + dfiqId := TODO // interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.DetailsApiV2DfiqDfiqIdGet(context.Background(), dfiqId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.DetailsApiV2DfiqDfiqIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailsApiV2DfiqDfiqIdGet`: ResponseDetailsApiV2DfiqDfiqIdGet + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.DetailsApiV2DfiqDfiqIdGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dfiqId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDetailsApiV2DfiqDfiqIdGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDetailsApiV2DfiqDfiqIdGet**](ResponseDetailsApiV2DfiqDfiqIdGet.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FromArchiveApiV2DfiqFromArchivePost + +> map[string]int32 FromArchiveApiV2DfiqFromArchivePost(ctx).Archive(archive).Execute() + +From Archive + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + archive := os.NewFile(1234, "some_file") // *os.File | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.FromArchiveApiV2DfiqFromArchivePost(context.Background()).Archive(archive).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.FromArchiveApiV2DfiqFromArchivePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FromArchiveApiV2DfiqFromArchivePost`: map[string]int32 + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.FromArchiveApiV2DfiqFromArchivePost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFromArchiveApiV2DfiqFromArchivePostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **archive** | ***os.File** | | + +### Return type + +**map[string]int32** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## NewFromYamlApiV2DfiqFromYamlPost + +> ResponseNewFromYamlApiV2DfiqFromYamlPost NewFromYamlApiV2DfiqFromYamlPost(ctx).NewDFIQRequest(newDFIQRequest).Execute() + +New From Yaml + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newDFIQRequest := *openapiclient.NewNewDFIQRequest("DfiqYaml_example", openapiclient.DFIQType("scenario")) // NewDFIQRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.NewFromYamlApiV2DfiqFromYamlPost(context.Background()).NewDFIQRequest(newDFIQRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.NewFromYamlApiV2DfiqFromYamlPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `NewFromYamlApiV2DfiqFromYamlPost`: ResponseNewFromYamlApiV2DfiqFromYamlPost + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.NewFromYamlApiV2DfiqFromYamlPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiNewFromYamlApiV2DfiqFromYamlPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newDFIQRequest** | [**NewDFIQRequest**](NewDFIQRequest.md) | | + +### Return type + +[**ResponseNewFromYamlApiV2DfiqFromYamlPost**](ResponseNewFromYamlApiV2DfiqFromYamlPost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchApiV2DfiqDfiqIdPatch + +> ResponsePatchApiV2DfiqDfiqIdPatch PatchApiV2DfiqDfiqIdPatch(ctx, dfiqId).PatchDFIQRequest(patchDFIQRequest).Execute() + +Patch + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + dfiqId := TODO // interface{} | + patchDFIQRequest := *openapiclient.NewPatchDFIQRequest("DfiqYaml_example", openapiclient.DFIQType("scenario")) // PatchDFIQRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.PatchApiV2DfiqDfiqIdPatch(context.Background(), dfiqId).PatchDFIQRequest(patchDFIQRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.PatchApiV2DfiqDfiqIdPatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchApiV2DfiqDfiqIdPatch`: ResponsePatchApiV2DfiqDfiqIdPatch + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.PatchApiV2DfiqDfiqIdPatch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dfiqId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchApiV2DfiqDfiqIdPatchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchDFIQRequest** | [**PatchDFIQRequest**](PatchDFIQRequest.md) | | + +### Return type + +[**ResponsePatchApiV2DfiqDfiqIdPatch**](ResponsePatchApiV2DfiqDfiqIdPatch.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2DfiqSearchPost + +> DFIQSearchResponse SearchApiV2DfiqSearchPost(ctx).DFIQSearchRequest(dFIQSearchRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + dFIQSearchRequest := *openapiclient.NewDFIQSearchRequest() // DFIQSearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.SearchApiV2DfiqSearchPost(context.Background()).DFIQSearchRequest(dFIQSearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.SearchApiV2DfiqSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2DfiqSearchPost`: DFIQSearchResponse + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.SearchApiV2DfiqSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2DfiqSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dFIQSearchRequest** | [**DFIQSearchRequest**](DFIQSearchRequest.md) | | + +### Return type + +[**DFIQSearchResponse**](DFIQSearchResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ToArchiveApiV2DfiqToArchivePost + +> interface{} ToArchiveApiV2DfiqToArchivePost(ctx).DFIQSearchRequest(dFIQSearchRequest).Execute() + +To Archive + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + dFIQSearchRequest := *openapiclient.NewDFIQSearchRequest() // DFIQSearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.ToArchiveApiV2DfiqToArchivePost(context.Background()).DFIQSearchRequest(dFIQSearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.ToArchiveApiV2DfiqToArchivePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ToArchiveApiV2DfiqToArchivePost`: interface{} + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.ToArchiveApiV2DfiqToArchivePost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiToArchiveApiV2DfiqToArchivePostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dFIQSearchRequest** | [**DFIQSearchRequest**](DFIQSearchRequest.md) | | + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ValidateDfiqYamlApiV2DfiqValidatePost + +> DFIQValidateResponse ValidateDfiqYamlApiV2DfiqValidatePost(ctx).DFIQValidateRequest(dFIQValidateRequest).Execute() + +Validate Dfiq Yaml + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + dFIQValidateRequest := *openapiclient.NewDFIQValidateRequest("DfiqYaml_example", openapiclient.DFIQType("scenario")) // DFIQValidateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DfiqAPI.ValidateDfiqYamlApiV2DfiqValidatePost(context.Background()).DFIQValidateRequest(dFIQValidateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DfiqAPI.ValidateDfiqYamlApiV2DfiqValidatePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ValidateDfiqYamlApiV2DfiqValidatePost`: DFIQValidateResponse + fmt.Fprintf(os.Stdout, "Response from `DfiqAPI.ValidateDfiqYamlApiV2DfiqValidatePost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiValidateDfiqYamlApiV2DfiqValidatePostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dFIQValidateRequest** | [**DFIQValidateRequest**](DFIQValidateRequest.md) | | + +### Return type + +[**DFIQValidateResponse**](DFIQValidateResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/DfiqInner.md b/docs/DfiqInner.md new file mode 100644 index 0000000..16bf707 --- /dev/null +++ b/docs/DfiqInner.md @@ -0,0 +1,385 @@ +# DfiqInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Uuid** | Pointer to **string** | | [optional] +**DfiqId** | Pointer to **string** | | [optional] +**DfiqVersion** | **string** | | +**DfiqTags** | Pointer to **[]string** | | [optional] +**Contributors** | Pointer to **[]string** | | [optional] +**DfiqYaml** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Description** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "scenario"] +**Id** | **string** | | [readonly] +**RootType** | **string** | | [readonly] +**ParentIds** | **[]string** | | +**Approaches** | Pointer to [**[]DFIQApproach**](DFIQApproach.md) | | [optional] [default to []] + +## Methods + +### NewDfiqInner + +`func NewDfiqInner(name string, dfiqVersion string, dfiqYaml string, description string, id string, rootType string, parentIds []string, ) *DfiqInner` + +NewDfiqInner instantiates a new DfiqInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDfiqInnerWithDefaults + +`func NewDfiqInnerWithDefaults() *DfiqInner` + +NewDfiqInnerWithDefaults instantiates a new DfiqInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DfiqInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DfiqInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DfiqInner) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUuid + +`func (o *DfiqInner) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *DfiqInner) GetUuidOk() (*string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUuid + +`func (o *DfiqInner) SetUuid(v string)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *DfiqInner) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### GetDfiqId + +`func (o *DfiqInner) GetDfiqId() string` + +GetDfiqId returns the DfiqId field if non-nil, zero value otherwise. + +### GetDfiqIdOk + +`func (o *DfiqInner) GetDfiqIdOk() (*string, bool)` + +GetDfiqIdOk returns a tuple with the DfiqId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqId + +`func (o *DfiqInner) SetDfiqId(v string)` + +SetDfiqId sets DfiqId field to given value. + +### HasDfiqId + +`func (o *DfiqInner) HasDfiqId() bool` + +HasDfiqId returns a boolean if a field has been set. + +### GetDfiqVersion + +`func (o *DfiqInner) GetDfiqVersion() string` + +GetDfiqVersion returns the DfiqVersion field if non-nil, zero value otherwise. + +### GetDfiqVersionOk + +`func (o *DfiqInner) GetDfiqVersionOk() (*string, bool)` + +GetDfiqVersionOk returns a tuple with the DfiqVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqVersion + +`func (o *DfiqInner) SetDfiqVersion(v string)` + +SetDfiqVersion sets DfiqVersion field to given value. + + +### GetDfiqTags + +`func (o *DfiqInner) GetDfiqTags() []string` + +GetDfiqTags returns the DfiqTags field if non-nil, zero value otherwise. + +### GetDfiqTagsOk + +`func (o *DfiqInner) GetDfiqTagsOk() (*[]string, bool)` + +GetDfiqTagsOk returns a tuple with the DfiqTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqTags + +`func (o *DfiqInner) SetDfiqTags(v []string)` + +SetDfiqTags sets DfiqTags field to given value. + +### HasDfiqTags + +`func (o *DfiqInner) HasDfiqTags() bool` + +HasDfiqTags returns a boolean if a field has been set. + +### GetContributors + +`func (o *DfiqInner) GetContributors() []string` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *DfiqInner) GetContributorsOk() (*[]string, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *DfiqInner) SetContributors(v []string)` + +SetContributors sets Contributors field to given value. + +### HasContributors + +`func (o *DfiqInner) HasContributors() bool` + +HasContributors returns a boolean if a field has been set. + +### GetDfiqYaml + +`func (o *DfiqInner) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *DfiqInner) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *DfiqInner) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetCreated + +`func (o *DfiqInner) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *DfiqInner) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *DfiqInner) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *DfiqInner) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *DfiqInner) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *DfiqInner) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *DfiqInner) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *DfiqInner) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetDescription + +`func (o *DfiqInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DfiqInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DfiqInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *DfiqInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DfiqInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DfiqInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DfiqInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *DfiqInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DfiqInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DfiqInner) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRootType + +`func (o *DfiqInner) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *DfiqInner) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *DfiqInner) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetParentIds + +`func (o *DfiqInner) GetParentIds() []string` + +GetParentIds returns the ParentIds field if non-nil, zero value otherwise. + +### GetParentIdsOk + +`func (o *DfiqInner) GetParentIdsOk() (*[]string, bool)` + +GetParentIdsOk returns a tuple with the ParentIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentIds + +`func (o *DfiqInner) SetParentIds(v []string)` + +SetParentIds sets ParentIds field to given value. + + +### GetApproaches + +`func (o *DfiqInner) GetApproaches() []DFIQApproach` + +GetApproaches returns the Approaches field if non-nil, zero value otherwise. + +### GetApproachesOk + +`func (o *DfiqInner) GetApproachesOk() (*[]DFIQApproach, bool)` + +GetApproachesOk returns a tuple with the Approaches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApproaches + +`func (o *DfiqInner) SetApproaches(v []DFIQApproach)` + +SetApproaches sets Approaches field to given value. + +### HasApproaches + +`func (o *DfiqInner) HasApproaches() bool` + +HasApproaches returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DiamondModel.md b/docs/DiamondModel.md new file mode 100644 index 0000000..f5c9666 --- /dev/null +++ b/docs/DiamondModel.md @@ -0,0 +1,17 @@ +# DiamondModel + +## Enum + + +* `ADVERSARY` (value: `"adversary"`) + +* `CAPABILITY` (value: `"capability"`) + +* `INFRASTRUCTURE` (value: `"infrastructure"`) + +* `VICTIM` (value: `"victim"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DockerImageInput.md b/docs/DockerImageInput.md new file mode 100644 index 0000000..9184d2b --- /dev/null +++ b/docs/DockerImageInput.md @@ -0,0 +1,155 @@ +# DockerImageInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "docker_image"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewDockerImageInput + +`func NewDockerImageInput(value string, ) *DockerImageInput` + +NewDockerImageInput instantiates a new DockerImageInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDockerImageInputWithDefaults + +`func NewDockerImageInputWithDefaults() *DockerImageInput` + +NewDockerImageInputWithDefaults instantiates a new DockerImageInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *DockerImageInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DockerImageInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *DockerImageInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *DockerImageInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DockerImageInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DockerImageInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DockerImageInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *DockerImageInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *DockerImageInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *DockerImageInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *DockerImageInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *DockerImageInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *DockerImageInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *DockerImageInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *DockerImageInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *DockerImageInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *DockerImageInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *DockerImageInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *DockerImageInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DockerImageOutput.md b/docs/DockerImageOutput.md new file mode 100644 index 0000000..992c9c5 --- /dev/null +++ b/docs/DockerImageOutput.md @@ -0,0 +1,218 @@ +# DockerImageOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "docker_image"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewDockerImageOutput + +`func NewDockerImageOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *DockerImageOutput` + +NewDockerImageOutput instantiates a new DockerImageOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDockerImageOutputWithDefaults + +`func NewDockerImageOutputWithDefaults() *DockerImageOutput` + +NewDockerImageOutputWithDefaults instantiates a new DockerImageOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *DockerImageOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DockerImageOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *DockerImageOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *DockerImageOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DockerImageOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DockerImageOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DockerImageOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *DockerImageOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *DockerImageOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *DockerImageOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *DockerImageOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *DockerImageOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *DockerImageOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *DockerImageOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *DockerImageOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *DockerImageOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *DockerImageOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *DockerImageOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *DockerImageOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *DockerImageOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DockerImageOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DockerImageOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *DockerImageOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *DockerImageOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *DockerImageOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *DockerImageOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *DockerImageOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *DockerImageOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EmailInput.md b/docs/EmailInput.md new file mode 100644 index 0000000..a21d382 --- /dev/null +++ b/docs/EmailInput.md @@ -0,0 +1,155 @@ +# EmailInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "email"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewEmailInput + +`func NewEmailInput(value string, ) *EmailInput` + +NewEmailInput instantiates a new EmailInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailInputWithDefaults + +`func NewEmailInputWithDefaults() *EmailInput` + +NewEmailInputWithDefaults instantiates a new EmailInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *EmailInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *EmailInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *EmailInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *EmailInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *EmailInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *EmailInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *EmailInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *EmailInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *EmailInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *EmailInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *EmailInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *EmailInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *EmailInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *EmailInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *EmailInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *EmailInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *EmailInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *EmailInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *EmailInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EmailOutput.md b/docs/EmailOutput.md new file mode 100644 index 0000000..0d4ebdd --- /dev/null +++ b/docs/EmailOutput.md @@ -0,0 +1,218 @@ +# EmailOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "email"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewEmailOutput + +`func NewEmailOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *EmailOutput` + +NewEmailOutput instantiates a new EmailOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailOutputWithDefaults + +`func NewEmailOutputWithDefaults() *EmailOutput` + +NewEmailOutputWithDefaults instantiates a new EmailOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *EmailOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *EmailOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *EmailOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *EmailOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *EmailOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *EmailOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *EmailOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *EmailOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *EmailOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *EmailOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *EmailOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *EmailOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *EmailOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *EmailOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *EmailOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *EmailOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *EmailOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *EmailOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *EmailOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *EmailOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *EmailOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *EmailOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *EmailOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *EmailOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *EmailOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *EmailOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *EmailOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *EmailOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntitiesAPI.md b/docs/EntitiesAPI.md new file mode 100644 index 0000000..907563c --- /dev/null +++ b/docs/EntitiesAPI.md @@ -0,0 +1,424 @@ +# \EntitiesAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteApiV2EntitiesEntityIdDelete**](EntitiesAPI.md#DeleteApiV2EntitiesEntityIdDelete) | **Delete** /api/v2/entities/{entity_id} | Delete +[**DetailsApiV2EntitiesEntityIdGet**](EntitiesAPI.md#DetailsApiV2EntitiesEntityIdGet) | **Get** /api/v2/entities/{entity_id} | Details +[**NewApiV2EntitiesPost**](EntitiesAPI.md#NewApiV2EntitiesPost) | **Post** /api/v2/entities/ | New +[**PatchApiV2EntitiesEntityIdPatch**](EntitiesAPI.md#PatchApiV2EntitiesEntityIdPatch) | **Patch** /api/v2/entities/{entity_id} | Patch +[**SearchApiV2EntitiesSearchPost**](EntitiesAPI.md#SearchApiV2EntitiesSearchPost) | **Post** /api/v2/entities/search | Search +[**TagApiV2EntitiesTagPost**](EntitiesAPI.md#TagApiV2EntitiesTagPost) | **Post** /api/v2/entities/tag | Tag + + + +## DeleteApiV2EntitiesEntityIdDelete + +> interface{} DeleteApiV2EntitiesEntityIdDelete(ctx, entityId).Execute() + +Delete + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + entityId := "entityId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EntitiesAPI.DeleteApiV2EntitiesEntityIdDelete(context.Background(), entityId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EntitiesAPI.DeleteApiV2EntitiesEntityIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApiV2EntitiesEntityIdDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `EntitiesAPI.DeleteApiV2EntitiesEntityIdDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**entityId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApiV2EntitiesEntityIdDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DetailsApiV2EntitiesEntityIdGet + +> ResponseDetailsApiV2EntitiesEntityIdGet DetailsApiV2EntitiesEntityIdGet(ctx, entityId).Execute() + +Details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + entityId := TODO // interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EntitiesAPI.DetailsApiV2EntitiesEntityIdGet(context.Background(), entityId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EntitiesAPI.DetailsApiV2EntitiesEntityIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailsApiV2EntitiesEntityIdGet`: ResponseDetailsApiV2EntitiesEntityIdGet + fmt.Fprintf(os.Stdout, "Response from `EntitiesAPI.DetailsApiV2EntitiesEntityIdGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**entityId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDetailsApiV2EntitiesEntityIdGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDetailsApiV2EntitiesEntityIdGet**](ResponseDetailsApiV2EntitiesEntityIdGet.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## NewApiV2EntitiesPost + +> ResponseNewApiV2EntitiesPost NewApiV2EntitiesPost(ctx).NewEntityRequest(newEntityRequest).Execute() + +New + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newEntityRequest := *openapiclient.NewNewEntityRequest(openapiclient.Entity_1{AttackPatternInput: openapiclient.NewAttackPatternInput("Name_example")}) // NewEntityRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EntitiesAPI.NewApiV2EntitiesPost(context.Background()).NewEntityRequest(newEntityRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EntitiesAPI.NewApiV2EntitiesPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `NewApiV2EntitiesPost`: ResponseNewApiV2EntitiesPost + fmt.Fprintf(os.Stdout, "Response from `EntitiesAPI.NewApiV2EntitiesPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiNewApiV2EntitiesPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newEntityRequest** | [**NewEntityRequest**](NewEntityRequest.md) | | + +### Return type + +[**ResponseNewApiV2EntitiesPost**](ResponseNewApiV2EntitiesPost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchApiV2EntitiesEntityIdPatch + +> ResponsePatchApiV2EntitiesEntityIdPatch PatchApiV2EntitiesEntityIdPatch(ctx, entityId).PatchEntityRequest(patchEntityRequest).Execute() + +Patch + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + entityId := TODO // interface{} | + patchEntityRequest := *openapiclient.NewPatchEntityRequest(openapiclient.Entity_1{AttackPatternInput: openapiclient.NewAttackPatternInput("Name_example")}) // PatchEntityRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EntitiesAPI.PatchApiV2EntitiesEntityIdPatch(context.Background(), entityId).PatchEntityRequest(patchEntityRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EntitiesAPI.PatchApiV2EntitiesEntityIdPatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchApiV2EntitiesEntityIdPatch`: ResponsePatchApiV2EntitiesEntityIdPatch + fmt.Fprintf(os.Stdout, "Response from `EntitiesAPI.PatchApiV2EntitiesEntityIdPatch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**entityId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchApiV2EntitiesEntityIdPatchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchEntityRequest** | [**PatchEntityRequest**](PatchEntityRequest.md) | | + +### Return type + +[**ResponsePatchApiV2EntitiesEntityIdPatch**](ResponsePatchApiV2EntitiesEntityIdPatch.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2EntitiesSearchPost + +> EntitySearchResponse SearchApiV2EntitiesSearchPost(ctx).EntitySearchRequest(entitySearchRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + entitySearchRequest := *openapiclient.NewEntitySearchRequest() // EntitySearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EntitiesAPI.SearchApiV2EntitiesSearchPost(context.Background()).EntitySearchRequest(entitySearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EntitiesAPI.SearchApiV2EntitiesSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2EntitiesSearchPost`: EntitySearchResponse + fmt.Fprintf(os.Stdout, "Response from `EntitiesAPI.SearchApiV2EntitiesSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2EntitiesSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entitySearchRequest** | [**EntitySearchRequest**](EntitySearchRequest.md) | | + +### Return type + +[**EntitySearchResponse**](EntitySearchResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TagApiV2EntitiesTagPost + +> EntityTagResponse TagApiV2EntitiesTagPost(ctx).EntityTagRequest(entityTagRequest).Execute() + +Tag + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + entityTagRequest := *openapiclient.NewEntityTagRequest([]string{"Ids_example"}) // EntityTagRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EntitiesAPI.TagApiV2EntitiesTagPost(context.Background()).EntityTagRequest(entityTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EntitiesAPI.TagApiV2EntitiesTagPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TagApiV2EntitiesTagPost`: EntityTagResponse + fmt.Fprintf(os.Stdout, "Response from `EntitiesAPI.TagApiV2EntitiesTagPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTagApiV2EntitiesTagPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entityTagRequest** | [**EntityTagRequest**](EntityTagRequest.md) | | + +### Return type + +[**EntityTagResponse**](EntityTagResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/EntitiesInner.md b/docs/EntitiesInner.md new file mode 100644 index 0000000..87fd12b --- /dev/null +++ b/docs/EntitiesInner.md @@ -0,0 +1,629 @@ +# EntitiesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "investigation"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] +**IdentityClass** | Pointer to **string** | | [optional] [default to ""] +**Sectors** | Pointer to **[]string** | | [optional] [default to []] +**ContactInformation** | Pointer to **string** | | [optional] [default to ""] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**ToolVersion** | Pointer to **string** | | [optional] [default to ""] +**ThreatActorTypes** | Pointer to **[]string** | | [optional] [default to []] +**Family** | Pointer to **string** | | [optional] [default to ""] +**Title** | Pointer to **string** | | [optional] [default to ""] +**BaseScore** | Pointer to **float32** | | [optional] [default to 0.0] +**Severity** | Pointer to [**SeverityType**](SeverityType.md) | | [optional] + +## Methods + +### NewEntitiesInner + +`func NewEntitiesInner(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *EntitiesInner` + +NewEntitiesInner instantiates a new EntitiesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntitiesInnerWithDefaults + +`func NewEntitiesInnerWithDefaults() *EntitiesInner` + +NewEntitiesInnerWithDefaults instantiates a new EntitiesInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *EntitiesInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *EntitiesInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *EntitiesInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *EntitiesInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *EntitiesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *EntitiesInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *EntitiesInner) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *EntitiesInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *EntitiesInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *EntitiesInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *EntitiesInner) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *EntitiesInner) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *EntitiesInner) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *EntitiesInner) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *EntitiesInner) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *EntitiesInner) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *EntitiesInner) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *EntitiesInner) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *EntitiesInner) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *EntitiesInner) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *EntitiesInner) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *EntitiesInner) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *EntitiesInner) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetReference + +`func (o *EntitiesInner) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *EntitiesInner) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *EntitiesInner) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *EntitiesInner) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetId + +`func (o *EntitiesInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *EntitiesInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *EntitiesInner) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *EntitiesInner) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *EntitiesInner) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *EntitiesInner) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *EntitiesInner) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *EntitiesInner) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *EntitiesInner) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *EntitiesInner) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *EntitiesInner) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *EntitiesInner) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + +### GetIdentityClass + +`func (o *EntitiesInner) GetIdentityClass() string` + +GetIdentityClass returns the IdentityClass field if non-nil, zero value otherwise. + +### GetIdentityClassOk + +`func (o *EntitiesInner) GetIdentityClassOk() (*string, bool)` + +GetIdentityClassOk returns a tuple with the IdentityClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityClass + +`func (o *EntitiesInner) SetIdentityClass(v string)` + +SetIdentityClass sets IdentityClass field to given value. + +### HasIdentityClass + +`func (o *EntitiesInner) HasIdentityClass() bool` + +HasIdentityClass returns a boolean if a field has been set. + +### GetSectors + +`func (o *EntitiesInner) GetSectors() []string` + +GetSectors returns the Sectors field if non-nil, zero value otherwise. + +### GetSectorsOk + +`func (o *EntitiesInner) GetSectorsOk() (*[]string, bool)` + +GetSectorsOk returns a tuple with the Sectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSectors + +`func (o *EntitiesInner) SetSectors(v []string)` + +SetSectors sets Sectors field to given value. + +### HasSectors + +`func (o *EntitiesInner) HasSectors() bool` + +HasSectors returns a boolean if a field has been set. + +### GetContactInformation + +`func (o *EntitiesInner) GetContactInformation() string` + +GetContactInformation returns the ContactInformation field if non-nil, zero value otherwise. + +### GetContactInformationOk + +`func (o *EntitiesInner) GetContactInformationOk() (*string, bool)` + +GetContactInformationOk returns a tuple with the ContactInformation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContactInformation + +`func (o *EntitiesInner) SetContactInformation(v string)` + +SetContactInformation sets ContactInformation field to given value. + +### HasContactInformation + +`func (o *EntitiesInner) HasContactInformation() bool` + +HasContactInformation returns a boolean if a field has been set. + +### GetAliases + +`func (o *EntitiesInner) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *EntitiesInner) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *EntitiesInner) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *EntitiesInner) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *EntitiesInner) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *EntitiesInner) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *EntitiesInner) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *EntitiesInner) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *EntitiesInner) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *EntitiesInner) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *EntitiesInner) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *EntitiesInner) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *EntitiesInner) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *EntitiesInner) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *EntitiesInner) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *EntitiesInner) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetToolVersion + +`func (o *EntitiesInner) GetToolVersion() string` + +GetToolVersion returns the ToolVersion field if non-nil, zero value otherwise. + +### GetToolVersionOk + +`func (o *EntitiesInner) GetToolVersionOk() (*string, bool)` + +GetToolVersionOk returns a tuple with the ToolVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolVersion + +`func (o *EntitiesInner) SetToolVersion(v string)` + +SetToolVersion sets ToolVersion field to given value. + +### HasToolVersion + +`func (o *EntitiesInner) HasToolVersion() bool` + +HasToolVersion returns a boolean if a field has been set. + +### GetThreatActorTypes + +`func (o *EntitiesInner) GetThreatActorTypes() []string` + +GetThreatActorTypes returns the ThreatActorTypes field if non-nil, zero value otherwise. + +### GetThreatActorTypesOk + +`func (o *EntitiesInner) GetThreatActorTypesOk() (*[]string, bool)` + +GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreatActorTypes + +`func (o *EntitiesInner) SetThreatActorTypes(v []string)` + +SetThreatActorTypes sets ThreatActorTypes field to given value. + +### HasThreatActorTypes + +`func (o *EntitiesInner) HasThreatActorTypes() bool` + +HasThreatActorTypes returns a boolean if a field has been set. + +### GetFamily + +`func (o *EntitiesInner) GetFamily() string` + +GetFamily returns the Family field if non-nil, zero value otherwise. + +### GetFamilyOk + +`func (o *EntitiesInner) GetFamilyOk() (*string, bool)` + +GetFamilyOk returns a tuple with the Family field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFamily + +`func (o *EntitiesInner) SetFamily(v string)` + +SetFamily sets Family field to given value. + +### HasFamily + +`func (o *EntitiesInner) HasFamily() bool` + +HasFamily returns a boolean if a field has been set. + +### GetTitle + +`func (o *EntitiesInner) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *EntitiesInner) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *EntitiesInner) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *EntitiesInner) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetBaseScore + +`func (o *EntitiesInner) GetBaseScore() float32` + +GetBaseScore returns the BaseScore field if non-nil, zero value otherwise. + +### GetBaseScoreOk + +`func (o *EntitiesInner) GetBaseScoreOk() (*float32, bool)` + +GetBaseScoreOk returns a tuple with the BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseScore + +`func (o *EntitiesInner) SetBaseScore(v float32)` + +SetBaseScore sets BaseScore field to given value. + +### HasBaseScore + +`func (o *EntitiesInner) HasBaseScore() bool` + +HasBaseScore returns a boolean if a field has been set. + +### GetSeverity + +`func (o *EntitiesInner) GetSeverity() SeverityType` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *EntitiesInner) GetSeverityOk() (*SeverityType, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *EntitiesInner) SetSeverity(v SeverityType)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *EntitiesInner) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Entity.md b/docs/Entity.md new file mode 100644 index 0000000..ddd6751 --- /dev/null +++ b/docs/Entity.md @@ -0,0 +1,260 @@ +# Entity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewEntity + +`func NewEntity(type_ string, name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *Entity` + +NewEntity instantiates a new Entity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntityWithDefaults + +`func NewEntityWithDefaults() *Entity` + +NewEntityWithDefaults instantiates a new Entity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *Entity) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Entity) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Entity) SetType(v string)` + +SetType sets Type field to given value. + + +### GetName + +`func (o *Entity) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Entity) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Entity) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *Entity) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Entity) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Entity) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Entity) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *Entity) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *Entity) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *Entity) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *Entity) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *Entity) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Entity) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Entity) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Entity) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *Entity) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *Entity) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *Entity) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *Entity) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetId + +`func (o *Entity) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Entity) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Entity) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *Entity) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Entity) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *Entity) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *Entity) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *Entity) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *Entity) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *Entity) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *Entity) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *Entity) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Entity1.md b/docs/Entity1.md new file mode 100644 index 0000000..44c002b --- /dev/null +++ b/docs/Entity1.md @@ -0,0 +1,545 @@ +# Entity1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "investigation"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] +**IdentityClass** | Pointer to **string** | | [optional] [default to ""] +**Sectors** | Pointer to **[]string** | | [optional] [default to []] +**ContactInformation** | Pointer to **string** | | [optional] [default to ""] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**ToolVersion** | Pointer to **string** | | [optional] [default to ""] +**ThreatActorTypes** | Pointer to **[]string** | | [optional] [default to []] +**Family** | Pointer to **string** | | [optional] [default to ""] +**Title** | Pointer to **string** | | [optional] [default to ""] +**BaseScore** | Pointer to **float32** | | [optional] [default to 0.0] +**Severity** | Pointer to [**SeverityType**](SeverityType.md) | | [optional] + +## Methods + +### NewEntity1 + +`func NewEntity1(name string, ) *Entity1` + +NewEntity1 instantiates a new Entity1 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntity1WithDefaults + +`func NewEntity1WithDefaults() *Entity1` + +NewEntity1WithDefaults instantiates a new Entity1 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *Entity1) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Entity1) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Entity1) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Entity1) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *Entity1) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Entity1) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Entity1) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *Entity1) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Entity1) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Entity1) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Entity1) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *Entity1) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *Entity1) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *Entity1) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *Entity1) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *Entity1) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Entity1) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Entity1) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Entity1) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *Entity1) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *Entity1) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *Entity1) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *Entity1) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetReference + +`func (o *Entity1) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *Entity1) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *Entity1) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *Entity1) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetIdentityClass + +`func (o *Entity1) GetIdentityClass() string` + +GetIdentityClass returns the IdentityClass field if non-nil, zero value otherwise. + +### GetIdentityClassOk + +`func (o *Entity1) GetIdentityClassOk() (*string, bool)` + +GetIdentityClassOk returns a tuple with the IdentityClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityClass + +`func (o *Entity1) SetIdentityClass(v string)` + +SetIdentityClass sets IdentityClass field to given value. + +### HasIdentityClass + +`func (o *Entity1) HasIdentityClass() bool` + +HasIdentityClass returns a boolean if a field has been set. + +### GetSectors + +`func (o *Entity1) GetSectors() []string` + +GetSectors returns the Sectors field if non-nil, zero value otherwise. + +### GetSectorsOk + +`func (o *Entity1) GetSectorsOk() (*[]string, bool)` + +GetSectorsOk returns a tuple with the Sectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSectors + +`func (o *Entity1) SetSectors(v []string)` + +SetSectors sets Sectors field to given value. + +### HasSectors + +`func (o *Entity1) HasSectors() bool` + +HasSectors returns a boolean if a field has been set. + +### GetContactInformation + +`func (o *Entity1) GetContactInformation() string` + +GetContactInformation returns the ContactInformation field if non-nil, zero value otherwise. + +### GetContactInformationOk + +`func (o *Entity1) GetContactInformationOk() (*string, bool)` + +GetContactInformationOk returns a tuple with the ContactInformation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContactInformation + +`func (o *Entity1) SetContactInformation(v string)` + +SetContactInformation sets ContactInformation field to given value. + +### HasContactInformation + +`func (o *Entity1) HasContactInformation() bool` + +HasContactInformation returns a boolean if a field has been set. + +### GetAliases + +`func (o *Entity1) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *Entity1) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *Entity1) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *Entity1) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *Entity1) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *Entity1) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *Entity1) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *Entity1) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *Entity1) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *Entity1) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *Entity1) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *Entity1) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *Entity1) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *Entity1) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *Entity1) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *Entity1) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetToolVersion + +`func (o *Entity1) GetToolVersion() string` + +GetToolVersion returns the ToolVersion field if non-nil, zero value otherwise. + +### GetToolVersionOk + +`func (o *Entity1) GetToolVersionOk() (*string, bool)` + +GetToolVersionOk returns a tuple with the ToolVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolVersion + +`func (o *Entity1) SetToolVersion(v string)` + +SetToolVersion sets ToolVersion field to given value. + +### HasToolVersion + +`func (o *Entity1) HasToolVersion() bool` + +HasToolVersion returns a boolean if a field has been set. + +### GetThreatActorTypes + +`func (o *Entity1) GetThreatActorTypes() []string` + +GetThreatActorTypes returns the ThreatActorTypes field if non-nil, zero value otherwise. + +### GetThreatActorTypesOk + +`func (o *Entity1) GetThreatActorTypesOk() (*[]string, bool)` + +GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreatActorTypes + +`func (o *Entity1) SetThreatActorTypes(v []string)` + +SetThreatActorTypes sets ThreatActorTypes field to given value. + +### HasThreatActorTypes + +`func (o *Entity1) HasThreatActorTypes() bool` + +HasThreatActorTypes returns a boolean if a field has been set. + +### GetFamily + +`func (o *Entity1) GetFamily() string` + +GetFamily returns the Family field if non-nil, zero value otherwise. + +### GetFamilyOk + +`func (o *Entity1) GetFamilyOk() (*string, bool)` + +GetFamilyOk returns a tuple with the Family field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFamily + +`func (o *Entity1) SetFamily(v string)` + +SetFamily sets Family field to given value. + +### HasFamily + +`func (o *Entity1) HasFamily() bool` + +HasFamily returns a boolean if a field has been set. + +### GetTitle + +`func (o *Entity1) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *Entity1) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *Entity1) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *Entity1) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetBaseScore + +`func (o *Entity1) GetBaseScore() float32` + +GetBaseScore returns the BaseScore field if non-nil, zero value otherwise. + +### GetBaseScoreOk + +`func (o *Entity1) GetBaseScoreOk() (*float32, bool)` + +GetBaseScoreOk returns a tuple with the BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseScore + +`func (o *Entity1) SetBaseScore(v float32)` + +SetBaseScore sets BaseScore field to given value. + +### HasBaseScore + +`func (o *Entity1) HasBaseScore() bool` + +HasBaseScore returns a boolean if a field has been set. + +### GetSeverity + +`func (o *Entity1) GetSeverity() SeverityType` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *Entity1) GetSeverityOk() (*SeverityType, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *Entity1) SetSeverity(v SeverityType)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *Entity1) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntitySearchRequest.md b/docs/EntitySearchRequest.md new file mode 100644 index 0000000..b73cc8e --- /dev/null +++ b/docs/EntitySearchRequest.md @@ -0,0 +1,186 @@ +# EntitySearchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | Pointer to [**map[string]QueryValue**](QueryValue.md) | | [optional] [default to {}] +**Type** | Pointer to [**EntitySearchRequestType**](EntitySearchRequestType.md) | | [optional] +**Sorting** | Pointer to **[][]interface{}** | | [optional] [default to []] +**FilterAliases** | Pointer to **[][]interface{}** | | [optional] [default to []] +**Count** | Pointer to **int32** | | [optional] [default to 50] +**Page** | Pointer to **int32** | | [optional] [default to 0] + +## Methods + +### NewEntitySearchRequest + +`func NewEntitySearchRequest() *EntitySearchRequest` + +NewEntitySearchRequest instantiates a new EntitySearchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntitySearchRequestWithDefaults + +`func NewEntitySearchRequestWithDefaults() *EntitySearchRequest` + +NewEntitySearchRequestWithDefaults instantiates a new EntitySearchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *EntitySearchRequest) GetQuery() map[string]QueryValue` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *EntitySearchRequest) GetQueryOk() (*map[string]QueryValue, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *EntitySearchRequest) SetQuery(v map[string]QueryValue)` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *EntitySearchRequest) HasQuery() bool` + +HasQuery returns a boolean if a field has been set. + +### GetType + +`func (o *EntitySearchRequest) GetType() EntitySearchRequestType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *EntitySearchRequest) GetTypeOk() (*EntitySearchRequestType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *EntitySearchRequest) SetType(v EntitySearchRequestType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *EntitySearchRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSorting + +`func (o *EntitySearchRequest) GetSorting() [][]interface{}` + +GetSorting returns the Sorting field if non-nil, zero value otherwise. + +### GetSortingOk + +`func (o *EntitySearchRequest) GetSortingOk() (*[][]interface{}, bool)` + +GetSortingOk returns a tuple with the Sorting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSorting + +`func (o *EntitySearchRequest) SetSorting(v [][]interface{})` + +SetSorting sets Sorting field to given value. + +### HasSorting + +`func (o *EntitySearchRequest) HasSorting() bool` + +HasSorting returns a boolean if a field has been set. + +### GetFilterAliases + +`func (o *EntitySearchRequest) GetFilterAliases() [][]interface{}` + +GetFilterAliases returns the FilterAliases field if non-nil, zero value otherwise. + +### GetFilterAliasesOk + +`func (o *EntitySearchRequest) GetFilterAliasesOk() (*[][]interface{}, bool)` + +GetFilterAliasesOk returns a tuple with the FilterAliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilterAliases + +`func (o *EntitySearchRequest) SetFilterAliases(v [][]interface{})` + +SetFilterAliases sets FilterAliases field to given value. + +### HasFilterAliases + +`func (o *EntitySearchRequest) HasFilterAliases() bool` + +HasFilterAliases returns a boolean if a field has been set. + +### GetCount + +`func (o *EntitySearchRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *EntitySearchRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *EntitySearchRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *EntitySearchRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetPage + +`func (o *EntitySearchRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *EntitySearchRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *EntitySearchRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *EntitySearchRequest) HasPage() bool` + +HasPage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntitySearchRequestType.md b/docs/EntitySearchRequestType.md new file mode 100644 index 0000000..dd4c56e --- /dev/null +++ b/docs/EntitySearchRequestType.md @@ -0,0 +1,30 @@ +# EntitySearchRequestType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewEntitySearchRequestType + +`func NewEntitySearchRequestType() *EntitySearchRequestType` + +NewEntitySearchRequestType instantiates a new EntitySearchRequestType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntitySearchRequestTypeWithDefaults + +`func NewEntitySearchRequestTypeWithDefaults() *EntitySearchRequestType` + +NewEntitySearchRequestTypeWithDefaults instantiates a new EntitySearchRequestType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntitySearchResponse.md b/docs/EntitySearchResponse.md new file mode 100644 index 0000000..2e6f3ac --- /dev/null +++ b/docs/EntitySearchResponse.md @@ -0,0 +1,72 @@ +# EntitySearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entities** | [**[]EntitiesInner**](EntitiesInner.md) | | +**Total** | **int32** | | + +## Methods + +### NewEntitySearchResponse + +`func NewEntitySearchResponse(entities []EntitiesInner, total int32, ) *EntitySearchResponse` + +NewEntitySearchResponse instantiates a new EntitySearchResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntitySearchResponseWithDefaults + +`func NewEntitySearchResponseWithDefaults() *EntitySearchResponse` + +NewEntitySearchResponseWithDefaults instantiates a new EntitySearchResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEntities + +`func (o *EntitySearchResponse) GetEntities() []EntitiesInner` + +GetEntities returns the Entities field if non-nil, zero value otherwise. + +### GetEntitiesOk + +`func (o *EntitySearchResponse) GetEntitiesOk() (*[]EntitiesInner, bool)` + +GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntities + +`func (o *EntitySearchResponse) SetEntities(v []EntitiesInner)` + +SetEntities sets Entities field to given value. + + +### GetTotal + +`func (o *EntitySearchResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *EntitySearchResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *EntitySearchResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntityTagRequest.md b/docs/EntityTagRequest.md new file mode 100644 index 0000000..b370c7e --- /dev/null +++ b/docs/EntityTagRequest.md @@ -0,0 +1,103 @@ +# EntityTagRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ids** | **[]string** | | +**Tags** | Pointer to **[]string** | | [optional] [default to []] +**Strict** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewEntityTagRequest + +`func NewEntityTagRequest(ids []string, ) *EntityTagRequest` + +NewEntityTagRequest instantiates a new EntityTagRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntityTagRequestWithDefaults + +`func NewEntityTagRequestWithDefaults() *EntityTagRequest` + +NewEntityTagRequestWithDefaults instantiates a new EntityTagRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIds + +`func (o *EntityTagRequest) GetIds() []string` + +GetIds returns the Ids field if non-nil, zero value otherwise. + +### GetIdsOk + +`func (o *EntityTagRequest) GetIdsOk() (*[]string, bool)` + +GetIdsOk returns a tuple with the Ids field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIds + +`func (o *EntityTagRequest) SetIds(v []string)` + +SetIds sets Ids field to given value. + + +### GetTags + +`func (o *EntityTagRequest) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *EntityTagRequest) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *EntityTagRequest) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *EntityTagRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetStrict + +`func (o *EntityTagRequest) GetStrict() bool` + +GetStrict returns the Strict field if non-nil, zero value otherwise. + +### GetStrictOk + +`func (o *EntityTagRequest) GetStrictOk() (*bool, bool)` + +GetStrictOk returns a tuple with the Strict field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStrict + +`func (o *EntityTagRequest) SetStrict(v bool)` + +SetStrict sets Strict field to given value. + +### HasStrict + +`func (o *EntityTagRequest) HasStrict() bool` + +HasStrict returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntityTagResponse.md b/docs/EntityTagResponse.md new file mode 100644 index 0000000..1eea1c9 --- /dev/null +++ b/docs/EntityTagResponse.md @@ -0,0 +1,72 @@ +# EntityTagResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tagged** | **int32** | | +**Tags** | [**map[string]map[string]TagRelationshipOutput**](map.md) | | + +## Methods + +### NewEntityTagResponse + +`func NewEntityTagResponse(tagged int32, tags map[string]map[string]TagRelationshipOutput, ) *EntityTagResponse` + +NewEntityTagResponse instantiates a new EntityTagResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntityTagResponseWithDefaults + +`func NewEntityTagResponseWithDefaults() *EntityTagResponse` + +NewEntityTagResponseWithDefaults instantiates a new EntityTagResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTagged + +`func (o *EntityTagResponse) GetTagged() int32` + +GetTagged returns the Tagged field if non-nil, zero value otherwise. + +### GetTaggedOk + +`func (o *EntityTagResponse) GetTaggedOk() (*int32, bool)` + +GetTaggedOk returns a tuple with the Tagged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTagged + +`func (o *EntityTagResponse) SetTagged(v int32)` + +SetTagged sets Tagged field to given value. + + +### GetTags + +`func (o *EntityTagResponse) GetTags() map[string]map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *EntityTagResponse) GetTagsOk() (*map[string]map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *EntityTagResponse) SetTags(v map[string]map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntityType.md b/docs/EntityType.md new file mode 100644 index 0000000..79918dc --- /dev/null +++ b/docs/EntityType.md @@ -0,0 +1,39 @@ +# EntityType + +## Enum + + +* `INVESTIGATION` (value: `"investigation"`) + +* `COURSE_OF_ACTION` (value: `"course-of-action"`) + +* `IDENTITY` (value: `"identity"`) + +* `INTRUSION_SET` (value: `"intrusion-set"`) + +* `TOOL` (value: `"tool"`) + +* `THREAT_ACTOR` (value: `"threat-actor"`) + +* `CAMPAIGN` (value: `"campaign"`) + +* `COMPANY` (value: `"company"`) + +* `MALWARE` (value: `"malware"`) + +* `PHONE` (value: `"phone"`) + +* `NOTE` (value: `"note"`) + +* `ATTACK_PATTERN` (value: `"attack-pattern"`) + +* `VULNERABILITY` (value: `"vulnerability"`) + +* `HONEYPOT` (value: `"honeypot"`) + +* `THREAT_FINDING` (value: `"threat-finding"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Error.md b/docs/Error.md new file mode 100644 index 0000000..06aa463 --- /dev/null +++ b/docs/Error.md @@ -0,0 +1,30 @@ +# Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewError + +`func NewError() *Error` + +NewError instantiates a new Error object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorWithDefaults + +`func NewErrorWithDefaults() *Error` + +NewErrorWithDefaults instantiates a new Error object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportTaskInput.md b/docs/ExportTaskInput.md new file mode 100644 index 0000000..10cfbdc --- /dev/null +++ b/docs/ExportTaskInput.md @@ -0,0 +1,440 @@ +# ExportTaskInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Enabled** | Pointer to **bool** | | [optional] [default to false] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Status** | Pointer to [**TaskStatus**](TaskStatus.md) | | [optional] +**StatusMessage** | Pointer to **string** | | [optional] [default to ""] +**LastRun** | Pointer to **NullableTime** | | [optional] +**Frequency** | Pointer to **NullableString** | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "export"] +**IncludeTags** | Pointer to **[]string** | | [optional] [default to []] +**ExcludeTags** | Pointer to **[]string** | | [optional] [default to []] +**IgnoreTags** | Pointer to **[]string** | | [optional] [default to []] +**FreshTags** | Pointer to **bool** | | [optional] [default to true] +**ActsOn** | Pointer to [**[]ObservableTypeInput**](ObservableTypeInput.md) | | [optional] [default to []] +**TemplateName** | **string** | | +**Sha256** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewExportTaskInput + +`func NewExportTaskInput(name string, templateName string, ) *ExportTaskInput` + +NewExportTaskInput instantiates a new ExportTaskInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExportTaskInputWithDefaults + +`func NewExportTaskInputWithDefaults() *ExportTaskInput` + +NewExportTaskInputWithDefaults instantiates a new ExportTaskInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ExportTaskInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ExportTaskInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ExportTaskInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEnabled + +`func (o *ExportTaskInput) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ExportTaskInput) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *ExportTaskInput) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ExportTaskInput) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetDescription + +`func (o *ExportTaskInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ExportTaskInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ExportTaskInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ExportTaskInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *ExportTaskInput) GetStatus() TaskStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ExportTaskInput) GetStatusOk() (*TaskStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ExportTaskInput) SetStatus(v TaskStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ExportTaskInput) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStatusMessage + +`func (o *ExportTaskInput) GetStatusMessage() string` + +GetStatusMessage returns the StatusMessage field if non-nil, zero value otherwise. + +### GetStatusMessageOk + +`func (o *ExportTaskInput) GetStatusMessageOk() (*string, bool)` + +GetStatusMessageOk returns a tuple with the StatusMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusMessage + +`func (o *ExportTaskInput) SetStatusMessage(v string)` + +SetStatusMessage sets StatusMessage field to given value. + +### HasStatusMessage + +`func (o *ExportTaskInput) HasStatusMessage() bool` + +HasStatusMessage returns a boolean if a field has been set. + +### GetLastRun + +`func (o *ExportTaskInput) GetLastRun() time.Time` + +GetLastRun returns the LastRun field if non-nil, zero value otherwise. + +### GetLastRunOk + +`func (o *ExportTaskInput) GetLastRunOk() (*time.Time, bool)` + +GetLastRunOk returns a tuple with the LastRun field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastRun + +`func (o *ExportTaskInput) SetLastRun(v time.Time)` + +SetLastRun sets LastRun field to given value. + +### HasLastRun + +`func (o *ExportTaskInput) HasLastRun() bool` + +HasLastRun returns a boolean if a field has been set. + +### SetLastRunNil + +`func (o *ExportTaskInput) SetLastRunNil(b bool)` + + SetLastRunNil sets the value for LastRun to be an explicit nil + +### UnsetLastRun +`func (o *ExportTaskInput) UnsetLastRun()` + +UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +### GetFrequency + +`func (o *ExportTaskInput) GetFrequency() string` + +GetFrequency returns the Frequency field if non-nil, zero value otherwise. + +### GetFrequencyOk + +`func (o *ExportTaskInput) GetFrequencyOk() (*string, bool)` + +GetFrequencyOk returns a tuple with the Frequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrequency + +`func (o *ExportTaskInput) SetFrequency(v string)` + +SetFrequency sets Frequency field to given value. + +### HasFrequency + +`func (o *ExportTaskInput) HasFrequency() bool` + +HasFrequency returns a boolean if a field has been set. + +### SetFrequencyNil + +`func (o *ExportTaskInput) SetFrequencyNil(b bool)` + + SetFrequencyNil sets the value for Frequency to be an explicit nil + +### UnsetFrequency +`func (o *ExportTaskInput) UnsetFrequency()` + +UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +### GetType + +`func (o *ExportTaskInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ExportTaskInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ExportTaskInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ExportTaskInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetIncludeTags + +`func (o *ExportTaskInput) GetIncludeTags() []string` + +GetIncludeTags returns the IncludeTags field if non-nil, zero value otherwise. + +### GetIncludeTagsOk + +`func (o *ExportTaskInput) GetIncludeTagsOk() (*[]string, bool)` + +GetIncludeTagsOk returns a tuple with the IncludeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeTags + +`func (o *ExportTaskInput) SetIncludeTags(v []string)` + +SetIncludeTags sets IncludeTags field to given value. + +### HasIncludeTags + +`func (o *ExportTaskInput) HasIncludeTags() bool` + +HasIncludeTags returns a boolean if a field has been set. + +### GetExcludeTags + +`func (o *ExportTaskInput) GetExcludeTags() []string` + +GetExcludeTags returns the ExcludeTags field if non-nil, zero value otherwise. + +### GetExcludeTagsOk + +`func (o *ExportTaskInput) GetExcludeTagsOk() (*[]string, bool)` + +GetExcludeTagsOk returns a tuple with the ExcludeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeTags + +`func (o *ExportTaskInput) SetExcludeTags(v []string)` + +SetExcludeTags sets ExcludeTags field to given value. + +### HasExcludeTags + +`func (o *ExportTaskInput) HasExcludeTags() bool` + +HasExcludeTags returns a boolean if a field has been set. + +### GetIgnoreTags + +`func (o *ExportTaskInput) GetIgnoreTags() []string` + +GetIgnoreTags returns the IgnoreTags field if non-nil, zero value otherwise. + +### GetIgnoreTagsOk + +`func (o *ExportTaskInput) GetIgnoreTagsOk() (*[]string, bool)` + +GetIgnoreTagsOk returns a tuple with the IgnoreTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIgnoreTags + +`func (o *ExportTaskInput) SetIgnoreTags(v []string)` + +SetIgnoreTags sets IgnoreTags field to given value. + +### HasIgnoreTags + +`func (o *ExportTaskInput) HasIgnoreTags() bool` + +HasIgnoreTags returns a boolean if a field has been set. + +### GetFreshTags + +`func (o *ExportTaskInput) GetFreshTags() bool` + +GetFreshTags returns the FreshTags field if non-nil, zero value otherwise. + +### GetFreshTagsOk + +`func (o *ExportTaskInput) GetFreshTagsOk() (*bool, bool)` + +GetFreshTagsOk returns a tuple with the FreshTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFreshTags + +`func (o *ExportTaskInput) SetFreshTags(v bool)` + +SetFreshTags sets FreshTags field to given value. + +### HasFreshTags + +`func (o *ExportTaskInput) HasFreshTags() bool` + +HasFreshTags returns a boolean if a field has been set. + +### GetActsOn + +`func (o *ExportTaskInput) GetActsOn() []ObservableTypeInput` + +GetActsOn returns the ActsOn field if non-nil, zero value otherwise. + +### GetActsOnOk + +`func (o *ExportTaskInput) GetActsOnOk() (*[]ObservableTypeInput, bool)` + +GetActsOnOk returns a tuple with the ActsOn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActsOn + +`func (o *ExportTaskInput) SetActsOn(v []ObservableTypeInput)` + +SetActsOn sets ActsOn field to given value. + +### HasActsOn + +`func (o *ExportTaskInput) HasActsOn() bool` + +HasActsOn returns a boolean if a field has been set. + +### GetTemplateName + +`func (o *ExportTaskInput) GetTemplateName() string` + +GetTemplateName returns the TemplateName field if non-nil, zero value otherwise. + +### GetTemplateNameOk + +`func (o *ExportTaskInput) GetTemplateNameOk() (*string, bool)` + +GetTemplateNameOk returns a tuple with the TemplateName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateName + +`func (o *ExportTaskInput) SetTemplateName(v string)` + +SetTemplateName sets TemplateName field to given value. + + +### GetSha256 + +`func (o *ExportTaskInput) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ExportTaskInput) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ExportTaskInput) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ExportTaskInput) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### SetSha256Nil + +`func (o *ExportTaskInput) SetSha256Nil(b bool)` + + SetSha256Nil sets the value for Sha256 to be an explicit nil + +### UnsetSha256 +`func (o *ExportTaskInput) UnsetSha256()` + +UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportTaskOutput.md b/docs/ExportTaskOutput.md new file mode 100644 index 0000000..56ec48f --- /dev/null +++ b/docs/ExportTaskOutput.md @@ -0,0 +1,461 @@ +# ExportTaskOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Enabled** | Pointer to **bool** | | [optional] [default to false] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Status** | Pointer to [**TaskStatus**](TaskStatus.md) | | [optional] +**StatusMessage** | Pointer to **string** | | [optional] [default to ""] +**LastRun** | Pointer to **NullableTime** | | [optional] +**Frequency** | Pointer to **NullableString** | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "export"] +**IncludeTags** | Pointer to **[]string** | | [optional] [default to []] +**ExcludeTags** | Pointer to **[]string** | | [optional] [default to []] +**IgnoreTags** | Pointer to **[]string** | | [optional] [default to []] +**FreshTags** | Pointer to **bool** | | [optional] [default to true] +**ActsOn** | Pointer to **[]string** | | [optional] [default to []] +**TemplateName** | **string** | | +**Sha256** | Pointer to **NullableString** | | [optional] +**Id** | **string** | | [readonly] + +## Methods + +### NewExportTaskOutput + +`func NewExportTaskOutput(name string, templateName string, id string, ) *ExportTaskOutput` + +NewExportTaskOutput instantiates a new ExportTaskOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExportTaskOutputWithDefaults + +`func NewExportTaskOutputWithDefaults() *ExportTaskOutput` + +NewExportTaskOutputWithDefaults instantiates a new ExportTaskOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ExportTaskOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ExportTaskOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ExportTaskOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEnabled + +`func (o *ExportTaskOutput) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ExportTaskOutput) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *ExportTaskOutput) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ExportTaskOutput) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetDescription + +`func (o *ExportTaskOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ExportTaskOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ExportTaskOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ExportTaskOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *ExportTaskOutput) GetStatus() TaskStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ExportTaskOutput) GetStatusOk() (*TaskStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ExportTaskOutput) SetStatus(v TaskStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ExportTaskOutput) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStatusMessage + +`func (o *ExportTaskOutput) GetStatusMessage() string` + +GetStatusMessage returns the StatusMessage field if non-nil, zero value otherwise. + +### GetStatusMessageOk + +`func (o *ExportTaskOutput) GetStatusMessageOk() (*string, bool)` + +GetStatusMessageOk returns a tuple with the StatusMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusMessage + +`func (o *ExportTaskOutput) SetStatusMessage(v string)` + +SetStatusMessage sets StatusMessage field to given value. + +### HasStatusMessage + +`func (o *ExportTaskOutput) HasStatusMessage() bool` + +HasStatusMessage returns a boolean if a field has been set. + +### GetLastRun + +`func (o *ExportTaskOutput) GetLastRun() time.Time` + +GetLastRun returns the LastRun field if non-nil, zero value otherwise. + +### GetLastRunOk + +`func (o *ExportTaskOutput) GetLastRunOk() (*time.Time, bool)` + +GetLastRunOk returns a tuple with the LastRun field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastRun + +`func (o *ExportTaskOutput) SetLastRun(v time.Time)` + +SetLastRun sets LastRun field to given value. + +### HasLastRun + +`func (o *ExportTaskOutput) HasLastRun() bool` + +HasLastRun returns a boolean if a field has been set. + +### SetLastRunNil + +`func (o *ExportTaskOutput) SetLastRunNil(b bool)` + + SetLastRunNil sets the value for LastRun to be an explicit nil + +### UnsetLastRun +`func (o *ExportTaskOutput) UnsetLastRun()` + +UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +### GetFrequency + +`func (o *ExportTaskOutput) GetFrequency() string` + +GetFrequency returns the Frequency field if non-nil, zero value otherwise. + +### GetFrequencyOk + +`func (o *ExportTaskOutput) GetFrequencyOk() (*string, bool)` + +GetFrequencyOk returns a tuple with the Frequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrequency + +`func (o *ExportTaskOutput) SetFrequency(v string)` + +SetFrequency sets Frequency field to given value. + +### HasFrequency + +`func (o *ExportTaskOutput) HasFrequency() bool` + +HasFrequency returns a boolean if a field has been set. + +### SetFrequencyNil + +`func (o *ExportTaskOutput) SetFrequencyNil(b bool)` + + SetFrequencyNil sets the value for Frequency to be an explicit nil + +### UnsetFrequency +`func (o *ExportTaskOutput) UnsetFrequency()` + +UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +### GetType + +`func (o *ExportTaskOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ExportTaskOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ExportTaskOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ExportTaskOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetIncludeTags + +`func (o *ExportTaskOutput) GetIncludeTags() []string` + +GetIncludeTags returns the IncludeTags field if non-nil, zero value otherwise. + +### GetIncludeTagsOk + +`func (o *ExportTaskOutput) GetIncludeTagsOk() (*[]string, bool)` + +GetIncludeTagsOk returns a tuple with the IncludeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeTags + +`func (o *ExportTaskOutput) SetIncludeTags(v []string)` + +SetIncludeTags sets IncludeTags field to given value. + +### HasIncludeTags + +`func (o *ExportTaskOutput) HasIncludeTags() bool` + +HasIncludeTags returns a boolean if a field has been set. + +### GetExcludeTags + +`func (o *ExportTaskOutput) GetExcludeTags() []string` + +GetExcludeTags returns the ExcludeTags field if non-nil, zero value otherwise. + +### GetExcludeTagsOk + +`func (o *ExportTaskOutput) GetExcludeTagsOk() (*[]string, bool)` + +GetExcludeTagsOk returns a tuple with the ExcludeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeTags + +`func (o *ExportTaskOutput) SetExcludeTags(v []string)` + +SetExcludeTags sets ExcludeTags field to given value. + +### HasExcludeTags + +`func (o *ExportTaskOutput) HasExcludeTags() bool` + +HasExcludeTags returns a boolean if a field has been set. + +### GetIgnoreTags + +`func (o *ExportTaskOutput) GetIgnoreTags() []string` + +GetIgnoreTags returns the IgnoreTags field if non-nil, zero value otherwise. + +### GetIgnoreTagsOk + +`func (o *ExportTaskOutput) GetIgnoreTagsOk() (*[]string, bool)` + +GetIgnoreTagsOk returns a tuple with the IgnoreTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIgnoreTags + +`func (o *ExportTaskOutput) SetIgnoreTags(v []string)` + +SetIgnoreTags sets IgnoreTags field to given value. + +### HasIgnoreTags + +`func (o *ExportTaskOutput) HasIgnoreTags() bool` + +HasIgnoreTags returns a boolean if a field has been set. + +### GetFreshTags + +`func (o *ExportTaskOutput) GetFreshTags() bool` + +GetFreshTags returns the FreshTags field if non-nil, zero value otherwise. + +### GetFreshTagsOk + +`func (o *ExportTaskOutput) GetFreshTagsOk() (*bool, bool)` + +GetFreshTagsOk returns a tuple with the FreshTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFreshTags + +`func (o *ExportTaskOutput) SetFreshTags(v bool)` + +SetFreshTags sets FreshTags field to given value. + +### HasFreshTags + +`func (o *ExportTaskOutput) HasFreshTags() bool` + +HasFreshTags returns a boolean if a field has been set. + +### GetActsOn + +`func (o *ExportTaskOutput) GetActsOn() []string` + +GetActsOn returns the ActsOn field if non-nil, zero value otherwise. + +### GetActsOnOk + +`func (o *ExportTaskOutput) GetActsOnOk() (*[]string, bool)` + +GetActsOnOk returns a tuple with the ActsOn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActsOn + +`func (o *ExportTaskOutput) SetActsOn(v []string)` + +SetActsOn sets ActsOn field to given value. + +### HasActsOn + +`func (o *ExportTaskOutput) HasActsOn() bool` + +HasActsOn returns a boolean if a field has been set. + +### GetTemplateName + +`func (o *ExportTaskOutput) GetTemplateName() string` + +GetTemplateName returns the TemplateName field if non-nil, zero value otherwise. + +### GetTemplateNameOk + +`func (o *ExportTaskOutput) GetTemplateNameOk() (*string, bool)` + +GetTemplateNameOk returns a tuple with the TemplateName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateName + +`func (o *ExportTaskOutput) SetTemplateName(v string)` + +SetTemplateName sets TemplateName field to given value. + + +### GetSha256 + +`func (o *ExportTaskOutput) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ExportTaskOutput) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ExportTaskOutput) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ExportTaskOutput) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### SetSha256Nil + +`func (o *ExportTaskOutput) SetSha256Nil(b bool)` + + SetSha256Nil sets the value for Sha256 to be an explicit nil + +### UnsetSha256 +`func (o *ExportTaskOutput) UnsetSha256()` + +UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +### GetId + +`func (o *ExportTaskOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ExportTaskOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ExportTaskOutput) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FeedTask.md b/docs/FeedTask.md new file mode 100644 index 0000000..7ff4fc5 --- /dev/null +++ b/docs/FeedTask.md @@ -0,0 +1,274 @@ +# FeedTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Enabled** | Pointer to **bool** | | [optional] [default to false] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Status** | Pointer to [**TaskStatus**](TaskStatus.md) | | [optional] +**StatusMessage** | Pointer to **string** | | [optional] [default to ""] +**LastRun** | Pointer to **NullableTime** | | [optional] +**Frequency** | Pointer to **NullableString** | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "feed"] +**Id** | **string** | | [readonly] + +## Methods + +### NewFeedTask + +`func NewFeedTask(name string, id string, ) *FeedTask` + +NewFeedTask instantiates a new FeedTask object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeedTaskWithDefaults + +`func NewFeedTaskWithDefaults() *FeedTask` + +NewFeedTaskWithDefaults instantiates a new FeedTask object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *FeedTask) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FeedTask) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FeedTask) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEnabled + +`func (o *FeedTask) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *FeedTask) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *FeedTask) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *FeedTask) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetDescription + +`func (o *FeedTask) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *FeedTask) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *FeedTask) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *FeedTask) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *FeedTask) GetStatus() TaskStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *FeedTask) GetStatusOk() (*TaskStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *FeedTask) SetStatus(v TaskStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *FeedTask) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStatusMessage + +`func (o *FeedTask) GetStatusMessage() string` + +GetStatusMessage returns the StatusMessage field if non-nil, zero value otherwise. + +### GetStatusMessageOk + +`func (o *FeedTask) GetStatusMessageOk() (*string, bool)` + +GetStatusMessageOk returns a tuple with the StatusMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusMessage + +`func (o *FeedTask) SetStatusMessage(v string)` + +SetStatusMessage sets StatusMessage field to given value. + +### HasStatusMessage + +`func (o *FeedTask) HasStatusMessage() bool` + +HasStatusMessage returns a boolean if a field has been set. + +### GetLastRun + +`func (o *FeedTask) GetLastRun() time.Time` + +GetLastRun returns the LastRun field if non-nil, zero value otherwise. + +### GetLastRunOk + +`func (o *FeedTask) GetLastRunOk() (*time.Time, bool)` + +GetLastRunOk returns a tuple with the LastRun field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastRun + +`func (o *FeedTask) SetLastRun(v time.Time)` + +SetLastRun sets LastRun field to given value. + +### HasLastRun + +`func (o *FeedTask) HasLastRun() bool` + +HasLastRun returns a boolean if a field has been set. + +### SetLastRunNil + +`func (o *FeedTask) SetLastRunNil(b bool)` + + SetLastRunNil sets the value for LastRun to be an explicit nil + +### UnsetLastRun +`func (o *FeedTask) UnsetLastRun()` + +UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +### GetFrequency + +`func (o *FeedTask) GetFrequency() string` + +GetFrequency returns the Frequency field if non-nil, zero value otherwise. + +### GetFrequencyOk + +`func (o *FeedTask) GetFrequencyOk() (*string, bool)` + +GetFrequencyOk returns a tuple with the Frequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrequency + +`func (o *FeedTask) SetFrequency(v string)` + +SetFrequency sets Frequency field to given value. + +### HasFrequency + +`func (o *FeedTask) HasFrequency() bool` + +HasFrequency returns a boolean if a field has been set. + +### SetFrequencyNil + +`func (o *FeedTask) SetFrequencyNil(b bool)` + + SetFrequencyNil sets the value for Frequency to be an explicit nil + +### UnsetFrequency +`func (o *FeedTask) UnsetFrequency()` + +UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +### GetType + +`func (o *FeedTask) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FeedTask) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FeedTask) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *FeedTask) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *FeedTask) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FeedTask) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FeedTask) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FileInput.md b/docs/FileInput.md new file mode 100644 index 0000000..b9a9d72 --- /dev/null +++ b/docs/FileInput.md @@ -0,0 +1,371 @@ +# FileInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "file"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Name** | Pointer to **NullableString** | | [optional] +**Size** | Pointer to **NullableInt32** | | [optional] +**Sha256** | Pointer to **NullableString** | | [optional] +**Md5** | Pointer to **NullableString** | | [optional] +**Sha1** | Pointer to **NullableString** | | [optional] +**MimeType** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewFileInput + +`func NewFileInput(value string, ) *FileInput` + +NewFileInput instantiates a new FileInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFileInputWithDefaults + +`func NewFileInputWithDefaults() *FileInput` + +NewFileInputWithDefaults instantiates a new FileInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *FileInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *FileInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *FileInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *FileInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FileInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FileInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *FileInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *FileInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *FileInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *FileInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *FileInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *FileInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *FileInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *FileInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *FileInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *FileInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *FileInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *FileInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *FileInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetName + +`func (o *FileInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FileInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FileInput) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *FileInput) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetNameNil + +`func (o *FileInput) SetNameNil(b bool)` + + SetNameNil sets the value for Name to be an explicit nil + +### UnsetName +`func (o *FileInput) UnsetName()` + +UnsetName ensures that no value is present for Name, not even an explicit nil +### GetSize + +`func (o *FileInput) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *FileInput) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *FileInput) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *FileInput) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### SetSizeNil + +`func (o *FileInput) SetSizeNil(b bool)` + + SetSizeNil sets the value for Size to be an explicit nil + +### UnsetSize +`func (o *FileInput) UnsetSize()` + +UnsetSize ensures that no value is present for Size, not even an explicit nil +### GetSha256 + +`func (o *FileInput) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *FileInput) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *FileInput) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *FileInput) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### SetSha256Nil + +`func (o *FileInput) SetSha256Nil(b bool)` + + SetSha256Nil sets the value for Sha256 to be an explicit nil + +### UnsetSha256 +`func (o *FileInput) UnsetSha256()` + +UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +### GetMd5 + +`func (o *FileInput) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *FileInput) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *FileInput) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *FileInput) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### SetMd5Nil + +`func (o *FileInput) SetMd5Nil(b bool)` + + SetMd5Nil sets the value for Md5 to be an explicit nil + +### UnsetMd5 +`func (o *FileInput) UnsetMd5()` + +UnsetMd5 ensures that no value is present for Md5, not even an explicit nil +### GetSha1 + +`func (o *FileInput) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *FileInput) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *FileInput) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *FileInput) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### SetSha1Nil + +`func (o *FileInput) SetSha1Nil(b bool)` + + SetSha1Nil sets the value for Sha1 to be an explicit nil + +### UnsetSha1 +`func (o *FileInput) UnsetSha1()` + +UnsetSha1 ensures that no value is present for Sha1, not even an explicit nil +### GetMimeType + +`func (o *FileInput) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *FileInput) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *FileInput) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *FileInput) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### SetMimeTypeNil + +`func (o *FileInput) SetMimeTypeNil(b bool)` + + SetMimeTypeNil sets the value for MimeType to be an explicit nil + +### UnsetMimeType +`func (o *FileInput) UnsetMimeType()` + +UnsetMimeType ensures that no value is present for MimeType, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FileOutput.md b/docs/FileOutput.md new file mode 100644 index 0000000..9eaa78c --- /dev/null +++ b/docs/FileOutput.md @@ -0,0 +1,434 @@ +# FileOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "file"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Name** | Pointer to **NullableString** | | [optional] +**Size** | Pointer to **NullableInt32** | | [optional] +**Sha256** | Pointer to **NullableString** | | [optional] +**Md5** | Pointer to **NullableString** | | [optional] +**Sha1** | Pointer to **NullableString** | | [optional] +**MimeType** | Pointer to **NullableString** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewFileOutput + +`func NewFileOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *FileOutput` + +NewFileOutput instantiates a new FileOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFileOutputWithDefaults + +`func NewFileOutputWithDefaults() *FileOutput` + +NewFileOutputWithDefaults instantiates a new FileOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *FileOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *FileOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *FileOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *FileOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FileOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FileOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *FileOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *FileOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *FileOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *FileOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *FileOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *FileOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *FileOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *FileOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *FileOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *FileOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *FileOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *FileOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *FileOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetName + +`func (o *FileOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FileOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FileOutput) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *FileOutput) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetNameNil + +`func (o *FileOutput) SetNameNil(b bool)` + + SetNameNil sets the value for Name to be an explicit nil + +### UnsetName +`func (o *FileOutput) UnsetName()` + +UnsetName ensures that no value is present for Name, not even an explicit nil +### GetSize + +`func (o *FileOutput) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *FileOutput) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *FileOutput) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *FileOutput) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### SetSizeNil + +`func (o *FileOutput) SetSizeNil(b bool)` + + SetSizeNil sets the value for Size to be an explicit nil + +### UnsetSize +`func (o *FileOutput) UnsetSize()` + +UnsetSize ensures that no value is present for Size, not even an explicit nil +### GetSha256 + +`func (o *FileOutput) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *FileOutput) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *FileOutput) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *FileOutput) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### SetSha256Nil + +`func (o *FileOutput) SetSha256Nil(b bool)` + + SetSha256Nil sets the value for Sha256 to be an explicit nil + +### UnsetSha256 +`func (o *FileOutput) UnsetSha256()` + +UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +### GetMd5 + +`func (o *FileOutput) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *FileOutput) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *FileOutput) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *FileOutput) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### SetMd5Nil + +`func (o *FileOutput) SetMd5Nil(b bool)` + + SetMd5Nil sets the value for Md5 to be an explicit nil + +### UnsetMd5 +`func (o *FileOutput) UnsetMd5()` + +UnsetMd5 ensures that no value is present for Md5, not even an explicit nil +### GetSha1 + +`func (o *FileOutput) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *FileOutput) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *FileOutput) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *FileOutput) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### SetSha1Nil + +`func (o *FileOutput) SetSha1Nil(b bool)` + + SetSha1Nil sets the value for Sha1 to be an explicit nil + +### UnsetSha1 +`func (o *FileOutput) UnsetSha1()` + +UnsetSha1 ensures that no value is present for Sha1, not even an explicit nil +### GetMimeType + +`func (o *FileOutput) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *FileOutput) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *FileOutput) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *FileOutput) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### SetMimeTypeNil + +`func (o *FileOutput) SetMimeTypeNil(b bool)` + + SetMimeTypeNil sets the value for MimeType to be an explicit nil + +### UnsetMimeType +`func (o *FileOutput) UnsetMimeType()` + +UnsetMimeType ensures that no value is present for MimeType, not even an explicit nil +### GetId + +`func (o *FileOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FileOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FileOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *FileOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *FileOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *FileOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *FileOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *FileOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *FileOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ForensicArtifactInput.md b/docs/ForensicArtifactInput.md new file mode 100644 index 0000000..fab74ca --- /dev/null +++ b/docs/ForensicArtifactInput.md @@ -0,0 +1,405 @@ +# ForensicArtifactInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "forensicartifact"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Sources** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**SupportedOs** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewForensicArtifactInput + +`func NewForensicArtifactInput(name string, pattern string, diamond DiamondModel, ) *ForensicArtifactInput` + +NewForensicArtifactInput instantiates a new ForensicArtifactInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewForensicArtifactInputWithDefaults + +`func NewForensicArtifactInputWithDefaults() *ForensicArtifactInput` + +NewForensicArtifactInputWithDefaults instantiates a new ForensicArtifactInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ForensicArtifactInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ForensicArtifactInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ForensicArtifactInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *ForensicArtifactInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ForensicArtifactInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ForensicArtifactInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ForensicArtifactInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *ForensicArtifactInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ForensicArtifactInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ForensicArtifactInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ForensicArtifactInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *ForensicArtifactInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ForensicArtifactInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ForensicArtifactInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ForensicArtifactInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ForensicArtifactInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ForensicArtifactInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ForensicArtifactInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ForensicArtifactInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *ForensicArtifactInput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *ForensicArtifactInput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *ForensicArtifactInput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *ForensicArtifactInput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *ForensicArtifactInput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *ForensicArtifactInput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *ForensicArtifactInput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *ForensicArtifactInput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *ForensicArtifactInput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *ForensicArtifactInput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *ForensicArtifactInput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *ForensicArtifactInput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *ForensicArtifactInput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *ForensicArtifactInput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *ForensicArtifactInput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *ForensicArtifactInput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *ForensicArtifactInput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *ForensicArtifactInput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *ForensicArtifactInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ForensicArtifactInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ForensicArtifactInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ForensicArtifactInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *ForensicArtifactInput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *ForensicArtifactInput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *ForensicArtifactInput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *ForensicArtifactInput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetSources + +`func (o *ForensicArtifactInput) GetSources() []map[string]interface{}` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *ForensicArtifactInput) GetSourcesOk() (*[]map[string]interface{}, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *ForensicArtifactInput) SetSources(v []map[string]interface{})` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *ForensicArtifactInput) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetAliases + +`func (o *ForensicArtifactInput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ForensicArtifactInput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ForensicArtifactInput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ForensicArtifactInput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetSupportedOs + +`func (o *ForensicArtifactInput) GetSupportedOs() []string` + +GetSupportedOs returns the SupportedOs field if non-nil, zero value otherwise. + +### GetSupportedOsOk + +`func (o *ForensicArtifactInput) GetSupportedOsOk() (*[]string, bool)` + +GetSupportedOsOk returns a tuple with the SupportedOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedOs + +`func (o *ForensicArtifactInput) SetSupportedOs(v []string)` + +SetSupportedOs sets SupportedOs field to given value. + +### HasSupportedOs + +`func (o *ForensicArtifactInput) HasSupportedOs() bool` + +HasSupportedOs returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ForensicArtifactOutput.md b/docs/ForensicArtifactOutput.md new file mode 100644 index 0000000..e6905bb --- /dev/null +++ b/docs/ForensicArtifactOutput.md @@ -0,0 +1,468 @@ +# ForensicArtifactOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "forensicartifact"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Sources** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**SupportedOs** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewForensicArtifactOutput + +`func NewForensicArtifactOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, ) *ForensicArtifactOutput` + +NewForensicArtifactOutput instantiates a new ForensicArtifactOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewForensicArtifactOutputWithDefaults + +`func NewForensicArtifactOutputWithDefaults() *ForensicArtifactOutput` + +NewForensicArtifactOutputWithDefaults instantiates a new ForensicArtifactOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ForensicArtifactOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ForensicArtifactOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ForensicArtifactOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *ForensicArtifactOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ForensicArtifactOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ForensicArtifactOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ForensicArtifactOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *ForensicArtifactOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ForensicArtifactOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ForensicArtifactOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ForensicArtifactOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *ForensicArtifactOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ForensicArtifactOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ForensicArtifactOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ForensicArtifactOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ForensicArtifactOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ForensicArtifactOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ForensicArtifactOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ForensicArtifactOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *ForensicArtifactOutput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *ForensicArtifactOutput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *ForensicArtifactOutput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *ForensicArtifactOutput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *ForensicArtifactOutput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *ForensicArtifactOutput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *ForensicArtifactOutput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *ForensicArtifactOutput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *ForensicArtifactOutput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *ForensicArtifactOutput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *ForensicArtifactOutput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *ForensicArtifactOutput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *ForensicArtifactOutput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *ForensicArtifactOutput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *ForensicArtifactOutput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *ForensicArtifactOutput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *ForensicArtifactOutput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *ForensicArtifactOutput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *ForensicArtifactOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ForensicArtifactOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ForensicArtifactOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ForensicArtifactOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *ForensicArtifactOutput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *ForensicArtifactOutput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *ForensicArtifactOutput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *ForensicArtifactOutput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetSources + +`func (o *ForensicArtifactOutput) GetSources() []map[string]interface{}` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *ForensicArtifactOutput) GetSourcesOk() (*[]map[string]interface{}, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *ForensicArtifactOutput) SetSources(v []map[string]interface{})` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *ForensicArtifactOutput) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetAliases + +`func (o *ForensicArtifactOutput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ForensicArtifactOutput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ForensicArtifactOutput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ForensicArtifactOutput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetSupportedOs + +`func (o *ForensicArtifactOutput) GetSupportedOs() []string` + +GetSupportedOs returns the SupportedOs field if non-nil, zero value otherwise. + +### GetSupportedOsOk + +`func (o *ForensicArtifactOutput) GetSupportedOsOk() (*[]string, bool)` + +GetSupportedOsOk returns a tuple with the SupportedOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedOs + +`func (o *ForensicArtifactOutput) SetSupportedOs(v []string)` + +SetSupportedOs sets SupportedOs field to given value. + +### HasSupportedOs + +`func (o *ForensicArtifactOutput) HasSupportedOs() bool` + +HasSupportedOs returns a boolean if a field has been set. + +### GetId + +`func (o *ForensicArtifactOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ForensicArtifactOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ForensicArtifactOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ForensicArtifactOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ForensicArtifactOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ForensicArtifactOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ForensicArtifactOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ForensicArtifactOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ForensicArtifactOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GenericInput.md b/docs/GenericInput.md new file mode 100644 index 0000000..b10fb2c --- /dev/null +++ b/docs/GenericInput.md @@ -0,0 +1,155 @@ +# GenericInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "generic"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewGenericInput + +`func NewGenericInput(value string, ) *GenericInput` + +NewGenericInput instantiates a new GenericInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGenericInputWithDefaults + +`func NewGenericInputWithDefaults() *GenericInput` + +NewGenericInputWithDefaults instantiates a new GenericInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *GenericInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *GenericInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *GenericInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *GenericInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *GenericInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *GenericInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *GenericInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *GenericInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *GenericInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *GenericInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *GenericInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *GenericInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *GenericInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *GenericInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *GenericInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *GenericInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *GenericInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *GenericInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *GenericInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GenericOutput.md b/docs/GenericOutput.md new file mode 100644 index 0000000..64571d1 --- /dev/null +++ b/docs/GenericOutput.md @@ -0,0 +1,218 @@ +# GenericOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "generic"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewGenericOutput + +`func NewGenericOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *GenericOutput` + +NewGenericOutput instantiates a new GenericOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGenericOutputWithDefaults + +`func NewGenericOutputWithDefaults() *GenericOutput` + +NewGenericOutputWithDefaults instantiates a new GenericOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *GenericOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *GenericOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *GenericOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *GenericOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *GenericOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *GenericOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *GenericOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *GenericOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *GenericOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *GenericOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *GenericOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *GenericOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *GenericOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *GenericOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *GenericOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *GenericOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *GenericOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *GenericOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *GenericOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *GenericOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GenericOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GenericOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *GenericOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *GenericOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *GenericOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *GenericOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *GenericOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *GenericOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GraphAPI.md b/docs/GraphAPI.md new file mode 100644 index 0000000..66a2006 --- /dev/null +++ b/docs/GraphAPI.md @@ -0,0 +1,424 @@ +# \GraphAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddApiV2GraphAddPost**](GraphAPI.md#AddApiV2GraphAddPost) | **Post** /api/v2/graph/add | Add +[**DeleteApiV2GraphRelationshipIdDelete**](GraphAPI.md#DeleteApiV2GraphRelationshipIdDelete) | **Delete** /api/v2/graph/{relationship_id} | Delete +[**EditApiV2GraphRelationshipIdPatch**](GraphAPI.md#EditApiV2GraphRelationshipIdPatch) | **Patch** /api/v2/graph/{relationship_id} | Edit +[**MatchApiV2GraphMatchPost**](GraphAPI.md#MatchApiV2GraphMatchPost) | **Post** /api/v2/graph/match | Match +[**SearchApiV2GraphSearchPost**](GraphAPI.md#SearchApiV2GraphSearchPost) | **Post** /api/v2/graph/search | Search +[**SwapApiV2GraphRelationshipIdSwapPost**](GraphAPI.md#SwapApiV2GraphRelationshipIdSwapPost) | **Post** /api/v2/graph/{relationship_id}/swap | Swap + + + +## AddApiV2GraphAddPost + +> Relationship AddApiV2GraphAddPost(ctx).GraphAddRequest(graphAddRequest).Execute() + +Add + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + graphAddRequest := *openapiclient.NewGraphAddRequest("Source_example", "Target_example", "LinkType_example", "Description_example") // GraphAddRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GraphAPI.AddApiV2GraphAddPost(context.Background()).GraphAddRequest(graphAddRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GraphAPI.AddApiV2GraphAddPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddApiV2GraphAddPost`: Relationship + fmt.Fprintf(os.Stdout, "Response from `GraphAPI.AddApiV2GraphAddPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddApiV2GraphAddPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **graphAddRequest** | [**GraphAddRequest**](GraphAddRequest.md) | | + +### Return type + +[**Relationship**](Relationship.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApiV2GraphRelationshipIdDelete + +> interface{} DeleteApiV2GraphRelationshipIdDelete(ctx, relationshipId).Execute() + +Delete + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + relationshipId := "relationshipId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GraphAPI.DeleteApiV2GraphRelationshipIdDelete(context.Background(), relationshipId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GraphAPI.DeleteApiV2GraphRelationshipIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApiV2GraphRelationshipIdDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `GraphAPI.DeleteApiV2GraphRelationshipIdDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**relationshipId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApiV2GraphRelationshipIdDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## EditApiV2GraphRelationshipIdPatch + +> Relationship EditApiV2GraphRelationshipIdPatch(ctx, relationshipId).GraphPatchRequest(graphPatchRequest).Execute() + +Edit + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + relationshipId := "relationshipId_example" // string | + graphPatchRequest := *openapiclient.NewGraphPatchRequest("LinkType_example", "Description_example") // GraphPatchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GraphAPI.EditApiV2GraphRelationshipIdPatch(context.Background(), relationshipId).GraphPatchRequest(graphPatchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GraphAPI.EditApiV2GraphRelationshipIdPatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EditApiV2GraphRelationshipIdPatch`: Relationship + fmt.Fprintf(os.Stdout, "Response from `GraphAPI.EditApiV2GraphRelationshipIdPatch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**relationshipId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEditApiV2GraphRelationshipIdPatchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **graphPatchRequest** | [**GraphPatchRequest**](GraphPatchRequest.md) | | + +### Return type + +[**Relationship**](Relationship.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## MatchApiV2GraphMatchPost + +> AnalysisResponse MatchApiV2GraphMatchPost(ctx).AnalysisRequest(analysisRequest).Execute() + +Match + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + analysisRequest := *openapiclient.NewAnalysisRequest([]string{"Observables_example"}) // AnalysisRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GraphAPI.MatchApiV2GraphMatchPost(context.Background()).AnalysisRequest(analysisRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GraphAPI.MatchApiV2GraphMatchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `MatchApiV2GraphMatchPost`: AnalysisResponse + fmt.Fprintf(os.Stdout, "Response from `GraphAPI.MatchApiV2GraphMatchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiMatchApiV2GraphMatchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysisRequest** | [**AnalysisRequest**](AnalysisRequest.md) | | + +### Return type + +[**AnalysisResponse**](AnalysisResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2GraphSearchPost + +> GraphSearchResponse SearchApiV2GraphSearchPost(ctx).GraphSearchRequest(graphSearchRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + graphSearchRequest := *openapiclient.NewGraphSearchRequest("Source_example", "Graph_example", openapiclient.GraphDirection("outbound"), false) // GraphSearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GraphAPI.SearchApiV2GraphSearchPost(context.Background()).GraphSearchRequest(graphSearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GraphAPI.SearchApiV2GraphSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2GraphSearchPost`: GraphSearchResponse + fmt.Fprintf(os.Stdout, "Response from `GraphAPI.SearchApiV2GraphSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2GraphSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **graphSearchRequest** | [**GraphSearchRequest**](GraphSearchRequest.md) | | + +### Return type + +[**GraphSearchResponse**](GraphSearchResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SwapApiV2GraphRelationshipIdSwapPost + +> Relationship SwapApiV2GraphRelationshipIdSwapPost(ctx, relationshipId).Execute() + +Swap + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + relationshipId := "relationshipId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GraphAPI.SwapApiV2GraphRelationshipIdSwapPost(context.Background(), relationshipId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GraphAPI.SwapApiV2GraphRelationshipIdSwapPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SwapApiV2GraphRelationshipIdSwapPost`: Relationship + fmt.Fprintf(os.Stdout, "Response from `GraphAPI.SwapApiV2GraphRelationshipIdSwapPost`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**relationshipId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSwapApiV2GraphRelationshipIdSwapPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Relationship**](Relationship.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/GraphAddRequest.md b/docs/GraphAddRequest.md new file mode 100644 index 0000000..41f1a06 --- /dev/null +++ b/docs/GraphAddRequest.md @@ -0,0 +1,114 @@ +# GraphAddRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | +**Target** | **string** | | +**LinkType** | **string** | | +**Description** | **string** | | + +## Methods + +### NewGraphAddRequest + +`func NewGraphAddRequest(source string, target string, linkType string, description string, ) *GraphAddRequest` + +NewGraphAddRequest instantiates a new GraphAddRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGraphAddRequestWithDefaults + +`func NewGraphAddRequestWithDefaults() *GraphAddRequest` + +NewGraphAddRequestWithDefaults instantiates a new GraphAddRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSource + +`func (o *GraphAddRequest) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *GraphAddRequest) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *GraphAddRequest) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetTarget + +`func (o *GraphAddRequest) GetTarget() string` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *GraphAddRequest) GetTargetOk() (*string, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTarget + +`func (o *GraphAddRequest) SetTarget(v string)` + +SetTarget sets Target field to given value. + + +### GetLinkType + +`func (o *GraphAddRequest) GetLinkType() string` + +GetLinkType returns the LinkType field if non-nil, zero value otherwise. + +### GetLinkTypeOk + +`func (o *GraphAddRequest) GetLinkTypeOk() (*string, bool)` + +GetLinkTypeOk returns a tuple with the LinkType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinkType + +`func (o *GraphAddRequest) SetLinkType(v string)` + +SetLinkType sets LinkType field to given value. + + +### GetDescription + +`func (o *GraphAddRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GraphAddRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GraphAddRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GraphDirection.md b/docs/GraphDirection.md new file mode 100644 index 0000000..12fb250 --- /dev/null +++ b/docs/GraphDirection.md @@ -0,0 +1,15 @@ +# GraphDirection + +## Enum + + +* `OUTBOUND` (value: `"outbound"`) + +* `INBOUND` (value: `"inbound"`) + +* `ANY` (value: `"any"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GraphFilter.md b/docs/GraphFilter.md new file mode 100644 index 0000000..5f33593 --- /dev/null +++ b/docs/GraphFilter.md @@ -0,0 +1,93 @@ +# GraphFilter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | | +**Value** | **string** | | +**Operator** | **string** | | + +## Methods + +### NewGraphFilter + +`func NewGraphFilter(key string, value string, operator string, ) *GraphFilter` + +NewGraphFilter instantiates a new GraphFilter object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGraphFilterWithDefaults + +`func NewGraphFilterWithDefaults() *GraphFilter` + +NewGraphFilterWithDefaults instantiates a new GraphFilter object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKey + +`func (o *GraphFilter) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *GraphFilter) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *GraphFilter) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetValue + +`func (o *GraphFilter) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *GraphFilter) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *GraphFilter) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetOperator + +`func (o *GraphFilter) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *GraphFilter) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *GraphFilter) SetOperator(v string)` + +SetOperator sets Operator field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GraphPatchRequest.md b/docs/GraphPatchRequest.md new file mode 100644 index 0000000..65337d8 --- /dev/null +++ b/docs/GraphPatchRequest.md @@ -0,0 +1,72 @@ +# GraphPatchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LinkType** | **string** | | +**Description** | **string** | | + +## Methods + +### NewGraphPatchRequest + +`func NewGraphPatchRequest(linkType string, description string, ) *GraphPatchRequest` + +NewGraphPatchRequest instantiates a new GraphPatchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGraphPatchRequestWithDefaults + +`func NewGraphPatchRequestWithDefaults() *GraphPatchRequest` + +NewGraphPatchRequestWithDefaults instantiates a new GraphPatchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLinkType + +`func (o *GraphPatchRequest) GetLinkType() string` + +GetLinkType returns the LinkType field if non-nil, zero value otherwise. + +### GetLinkTypeOk + +`func (o *GraphPatchRequest) GetLinkTypeOk() (*string, bool)` + +GetLinkTypeOk returns a tuple with the LinkType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinkType + +`func (o *GraphPatchRequest) SetLinkType(v string)` + +SetLinkType sets LinkType field to given value. + + +### GetDescription + +`func (o *GraphPatchRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GraphPatchRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GraphPatchRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GraphSearchRequest.md b/docs/GraphSearchRequest.md new file mode 100644 index 0000000..8a8e4f1 --- /dev/null +++ b/docs/GraphSearchRequest.md @@ -0,0 +1,348 @@ +# GraphSearchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | +**LinkTypes** | Pointer to **[]string** | | [optional] [default to []] +**TargetTypes** | Pointer to **[]string** | | [optional] [default to []] +**Hops** | Pointer to [**Hops**](Hops.md) | | [optional] +**MinHops** | Pointer to [**MinHops**](MinHops.md) | | [optional] +**MaxHops** | Pointer to [**MaxHops**](MaxHops.md) | | [optional] +**Graph** | **string** | | +**Direction** | [**GraphDirection**](GraphDirection.md) | | +**Filter** | Pointer to [**[]GraphFilter**](GraphFilter.md) | | [optional] [default to []] +**IncludeOriginal** | **bool** | | +**Count** | Pointer to **int32** | | [optional] [default to 50] +**Page** | Pointer to **int32** | | [optional] [default to 0] +**Sorting** | Pointer to **[][]interface{}** | | [optional] [default to []] + +## Methods + +### NewGraphSearchRequest + +`func NewGraphSearchRequest(source string, graph string, direction GraphDirection, includeOriginal bool, ) *GraphSearchRequest` + +NewGraphSearchRequest instantiates a new GraphSearchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGraphSearchRequestWithDefaults + +`func NewGraphSearchRequestWithDefaults() *GraphSearchRequest` + +NewGraphSearchRequestWithDefaults instantiates a new GraphSearchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSource + +`func (o *GraphSearchRequest) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *GraphSearchRequest) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *GraphSearchRequest) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetLinkTypes + +`func (o *GraphSearchRequest) GetLinkTypes() []string` + +GetLinkTypes returns the LinkTypes field if non-nil, zero value otherwise. + +### GetLinkTypesOk + +`func (o *GraphSearchRequest) GetLinkTypesOk() (*[]string, bool)` + +GetLinkTypesOk returns a tuple with the LinkTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinkTypes + +`func (o *GraphSearchRequest) SetLinkTypes(v []string)` + +SetLinkTypes sets LinkTypes field to given value. + +### HasLinkTypes + +`func (o *GraphSearchRequest) HasLinkTypes() bool` + +HasLinkTypes returns a boolean if a field has been set. + +### GetTargetTypes + +`func (o *GraphSearchRequest) GetTargetTypes() []string` + +GetTargetTypes returns the TargetTypes field if non-nil, zero value otherwise. + +### GetTargetTypesOk + +`func (o *GraphSearchRequest) GetTargetTypesOk() (*[]string, bool)` + +GetTargetTypesOk returns a tuple with the TargetTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetTypes + +`func (o *GraphSearchRequest) SetTargetTypes(v []string)` + +SetTargetTypes sets TargetTypes field to given value. + +### HasTargetTypes + +`func (o *GraphSearchRequest) HasTargetTypes() bool` + +HasTargetTypes returns a boolean if a field has been set. + +### GetHops + +`func (o *GraphSearchRequest) GetHops() Hops` + +GetHops returns the Hops field if non-nil, zero value otherwise. + +### GetHopsOk + +`func (o *GraphSearchRequest) GetHopsOk() (*Hops, bool)` + +GetHopsOk returns a tuple with the Hops field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHops + +`func (o *GraphSearchRequest) SetHops(v Hops)` + +SetHops sets Hops field to given value. + +### HasHops + +`func (o *GraphSearchRequest) HasHops() bool` + +HasHops returns a boolean if a field has been set. + +### GetMinHops + +`func (o *GraphSearchRequest) GetMinHops() MinHops` + +GetMinHops returns the MinHops field if non-nil, zero value otherwise. + +### GetMinHopsOk + +`func (o *GraphSearchRequest) GetMinHopsOk() (*MinHops, bool)` + +GetMinHopsOk returns a tuple with the MinHops field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinHops + +`func (o *GraphSearchRequest) SetMinHops(v MinHops)` + +SetMinHops sets MinHops field to given value. + +### HasMinHops + +`func (o *GraphSearchRequest) HasMinHops() bool` + +HasMinHops returns a boolean if a field has been set. + +### GetMaxHops + +`func (o *GraphSearchRequest) GetMaxHops() MaxHops` + +GetMaxHops returns the MaxHops field if non-nil, zero value otherwise. + +### GetMaxHopsOk + +`func (o *GraphSearchRequest) GetMaxHopsOk() (*MaxHops, bool)` + +GetMaxHopsOk returns a tuple with the MaxHops field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxHops + +`func (o *GraphSearchRequest) SetMaxHops(v MaxHops)` + +SetMaxHops sets MaxHops field to given value. + +### HasMaxHops + +`func (o *GraphSearchRequest) HasMaxHops() bool` + +HasMaxHops returns a boolean if a field has been set. + +### GetGraph + +`func (o *GraphSearchRequest) GetGraph() string` + +GetGraph returns the Graph field if non-nil, zero value otherwise. + +### GetGraphOk + +`func (o *GraphSearchRequest) GetGraphOk() (*string, bool)` + +GetGraphOk returns a tuple with the Graph field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGraph + +`func (o *GraphSearchRequest) SetGraph(v string)` + +SetGraph sets Graph field to given value. + + +### GetDirection + +`func (o *GraphSearchRequest) GetDirection() GraphDirection` + +GetDirection returns the Direction field if non-nil, zero value otherwise. + +### GetDirectionOk + +`func (o *GraphSearchRequest) GetDirectionOk() (*GraphDirection, bool)` + +GetDirectionOk returns a tuple with the Direction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirection + +`func (o *GraphSearchRequest) SetDirection(v GraphDirection)` + +SetDirection sets Direction field to given value. + + +### GetFilter + +`func (o *GraphSearchRequest) GetFilter() []GraphFilter` + +GetFilter returns the Filter field if non-nil, zero value otherwise. + +### GetFilterOk + +`func (o *GraphSearchRequest) GetFilterOk() (*[]GraphFilter, bool)` + +GetFilterOk returns a tuple with the Filter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilter + +`func (o *GraphSearchRequest) SetFilter(v []GraphFilter)` + +SetFilter sets Filter field to given value. + +### HasFilter + +`func (o *GraphSearchRequest) HasFilter() bool` + +HasFilter returns a boolean if a field has been set. + +### GetIncludeOriginal + +`func (o *GraphSearchRequest) GetIncludeOriginal() bool` + +GetIncludeOriginal returns the IncludeOriginal field if non-nil, zero value otherwise. + +### GetIncludeOriginalOk + +`func (o *GraphSearchRequest) GetIncludeOriginalOk() (*bool, bool)` + +GetIncludeOriginalOk returns a tuple with the IncludeOriginal field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeOriginal + +`func (o *GraphSearchRequest) SetIncludeOriginal(v bool)` + +SetIncludeOriginal sets IncludeOriginal field to given value. + + +### GetCount + +`func (o *GraphSearchRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *GraphSearchRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *GraphSearchRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *GraphSearchRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetPage + +`func (o *GraphSearchRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *GraphSearchRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *GraphSearchRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *GraphSearchRequest) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetSorting + +`func (o *GraphSearchRequest) GetSorting() [][]interface{}` + +GetSorting returns the Sorting field if non-nil, zero value otherwise. + +### GetSortingOk + +`func (o *GraphSearchRequest) GetSortingOk() (*[][]interface{}, bool)` + +GetSortingOk returns a tuple with the Sorting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSorting + +`func (o *GraphSearchRequest) SetSorting(v [][]interface{})` + +SetSorting sets Sorting field to given value. + +### HasSorting + +`func (o *GraphSearchRequest) HasSorting() bool` + +HasSorting returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GraphSearchResponse.md b/docs/GraphSearchResponse.md new file mode 100644 index 0000000..79dfaad --- /dev/null +++ b/docs/GraphSearchResponse.md @@ -0,0 +1,93 @@ +# GraphSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Vertices** | [**map[string]VerticesValue**](VerticesValue.md) | | +**Paths** | [**[][]PathsInnerInner**]([]PathsInnerInner.md) | | +**Total** | **int32** | | + +## Methods + +### NewGraphSearchResponse + +`func NewGraphSearchResponse(vertices map[string]VerticesValue, paths [][]PathsInnerInner, total int32, ) *GraphSearchResponse` + +NewGraphSearchResponse instantiates a new GraphSearchResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGraphSearchResponseWithDefaults + +`func NewGraphSearchResponseWithDefaults() *GraphSearchResponse` + +NewGraphSearchResponseWithDefaults instantiates a new GraphSearchResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVertices + +`func (o *GraphSearchResponse) GetVertices() map[string]VerticesValue` + +GetVertices returns the Vertices field if non-nil, zero value otherwise. + +### GetVerticesOk + +`func (o *GraphSearchResponse) GetVerticesOk() (*map[string]VerticesValue, bool)` + +GetVerticesOk returns a tuple with the Vertices field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVertices + +`func (o *GraphSearchResponse) SetVertices(v map[string]VerticesValue)` + +SetVertices sets Vertices field to given value. + + +### GetPaths + +`func (o *GraphSearchResponse) GetPaths() [][]PathsInnerInner` + +GetPaths returns the Paths field if non-nil, zero value otherwise. + +### GetPathsOk + +`func (o *GraphSearchResponse) GetPathsOk() (*[][]PathsInnerInner, bool)` + +GetPathsOk returns a tuple with the Paths field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaths + +`func (o *GraphSearchResponse) SetPaths(v [][]PathsInnerInner)` + +SetPaths sets Paths field to given value. + + +### GetTotal + +`func (o *GraphSearchResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *GraphSearchResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *GraphSearchResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HTTPValidationError.md b/docs/HTTPValidationError.md new file mode 100644 index 0000000..3cde768 --- /dev/null +++ b/docs/HTTPValidationError.md @@ -0,0 +1,56 @@ +# HTTPValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Detail** | Pointer to [**[]ValidationError**](ValidationError.md) | | [optional] + +## Methods + +### NewHTTPValidationError + +`func NewHTTPValidationError() *HTTPValidationError` + +NewHTTPValidationError instantiates a new HTTPValidationError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHTTPValidationErrorWithDefaults + +`func NewHTTPValidationErrorWithDefaults() *HTTPValidationError` + +NewHTTPValidationErrorWithDefaults instantiates a new HTTPValidationError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDetail + +`func (o *HTTPValidationError) GetDetail() []ValidationError` + +GetDetail returns the Detail field if non-nil, zero value otherwise. + +### GetDetailOk + +`func (o *HTTPValidationError) GetDetailOk() (*[]ValidationError, bool)` + +GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetail + +`func (o *HTTPValidationError) SetDetail(v []ValidationError)` + +SetDetail sets Detail field to given value. + +### HasDetail + +`func (o *HTTPValidationError) HasDetail() bool` + +HasDetail returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Hops.md b/docs/Hops.md new file mode 100644 index 0000000..7c3c968 --- /dev/null +++ b/docs/Hops.md @@ -0,0 +1,30 @@ +# Hops + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewHops + +`func NewHops() *Hops` + +NewHops instantiates a new Hops object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHopsWithDefaults + +`func NewHopsWithDefaults() *Hops` + +NewHopsWithDefaults instantiates a new Hops object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HostnameInput.md b/docs/HostnameInput.md new file mode 100644 index 0000000..6052d56 --- /dev/null +++ b/docs/HostnameInput.md @@ -0,0 +1,155 @@ +# HostnameInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "hostname"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewHostnameInput + +`func NewHostnameInput(value string, ) *HostnameInput` + +NewHostnameInput instantiates a new HostnameInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHostnameInputWithDefaults + +`func NewHostnameInputWithDefaults() *HostnameInput` + +NewHostnameInputWithDefaults instantiates a new HostnameInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *HostnameInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *HostnameInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *HostnameInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *HostnameInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *HostnameInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *HostnameInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *HostnameInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *HostnameInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *HostnameInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *HostnameInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *HostnameInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *HostnameInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *HostnameInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *HostnameInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *HostnameInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *HostnameInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *HostnameInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *HostnameInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *HostnameInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HostnameOutput.md b/docs/HostnameOutput.md new file mode 100644 index 0000000..06cfb42 --- /dev/null +++ b/docs/HostnameOutput.md @@ -0,0 +1,218 @@ +# HostnameOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "hostname"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewHostnameOutput + +`func NewHostnameOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *HostnameOutput` + +NewHostnameOutput instantiates a new HostnameOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHostnameOutputWithDefaults + +`func NewHostnameOutputWithDefaults() *HostnameOutput` + +NewHostnameOutputWithDefaults instantiates a new HostnameOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *HostnameOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *HostnameOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *HostnameOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *HostnameOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *HostnameOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *HostnameOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *HostnameOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *HostnameOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *HostnameOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *HostnameOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *HostnameOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *HostnameOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *HostnameOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *HostnameOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *HostnameOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *HostnameOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *HostnameOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *HostnameOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *HostnameOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *HostnameOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *HostnameOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *HostnameOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *HostnameOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *HostnameOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *HostnameOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *HostnameOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *HostnameOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *HostnameOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IBANInput.md b/docs/IBANInput.md new file mode 100644 index 0000000..d83bb7f --- /dev/null +++ b/docs/IBANInput.md @@ -0,0 +1,155 @@ +# IBANInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "iban"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewIBANInput + +`func NewIBANInput(value string, ) *IBANInput` + +NewIBANInput instantiates a new IBANInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIBANInputWithDefaults + +`func NewIBANInputWithDefaults() *IBANInput` + +NewIBANInputWithDefaults instantiates a new IBANInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *IBANInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IBANInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IBANInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *IBANInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IBANInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IBANInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IBANInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *IBANInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IBANInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IBANInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IBANInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *IBANInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IBANInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IBANInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IBANInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *IBANInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *IBANInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *IBANInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *IBANInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IBANOutput.md b/docs/IBANOutput.md new file mode 100644 index 0000000..c474f30 --- /dev/null +++ b/docs/IBANOutput.md @@ -0,0 +1,218 @@ +# IBANOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "iban"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewIBANOutput + +`func NewIBANOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *IBANOutput` + +NewIBANOutput instantiates a new IBANOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIBANOutputWithDefaults + +`func NewIBANOutputWithDefaults() *IBANOutput` + +NewIBANOutputWithDefaults instantiates a new IBANOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *IBANOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IBANOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IBANOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *IBANOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IBANOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IBANOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IBANOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *IBANOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IBANOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IBANOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IBANOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *IBANOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IBANOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IBANOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IBANOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *IBANOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *IBANOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *IBANOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *IBANOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *IBANOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IBANOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IBANOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *IBANOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *IBANOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *IBANOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *IBANOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *IBANOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *IBANOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IPv4Input.md b/docs/IPv4Input.md new file mode 100644 index 0000000..12aec9c --- /dev/null +++ b/docs/IPv4Input.md @@ -0,0 +1,155 @@ +# IPv4Input + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "ipv4"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewIPv4Input + +`func NewIPv4Input(value string, ) *IPv4Input` + +NewIPv4Input instantiates a new IPv4Input object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIPv4InputWithDefaults + +`func NewIPv4InputWithDefaults() *IPv4Input` + +NewIPv4InputWithDefaults instantiates a new IPv4Input object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *IPv4Input) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IPv4Input) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IPv4Input) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *IPv4Input) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IPv4Input) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IPv4Input) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IPv4Input) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *IPv4Input) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IPv4Input) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IPv4Input) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IPv4Input) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *IPv4Input) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IPv4Input) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IPv4Input) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IPv4Input) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *IPv4Input) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *IPv4Input) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *IPv4Input) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *IPv4Input) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IPv4Output.md b/docs/IPv4Output.md new file mode 100644 index 0000000..6fde772 --- /dev/null +++ b/docs/IPv4Output.md @@ -0,0 +1,218 @@ +# IPv4Output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "ipv4"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewIPv4Output + +`func NewIPv4Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *IPv4Output` + +NewIPv4Output instantiates a new IPv4Output object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIPv4OutputWithDefaults + +`func NewIPv4OutputWithDefaults() *IPv4Output` + +NewIPv4OutputWithDefaults instantiates a new IPv4Output object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *IPv4Output) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IPv4Output) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IPv4Output) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *IPv4Output) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IPv4Output) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IPv4Output) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IPv4Output) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *IPv4Output) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IPv4Output) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IPv4Output) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IPv4Output) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *IPv4Output) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IPv4Output) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IPv4Output) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IPv4Output) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *IPv4Output) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *IPv4Output) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *IPv4Output) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *IPv4Output) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *IPv4Output) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IPv4Output) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IPv4Output) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *IPv4Output) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *IPv4Output) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *IPv4Output) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *IPv4Output) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *IPv4Output) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *IPv4Output) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IPv6Input.md b/docs/IPv6Input.md new file mode 100644 index 0000000..7f336aa --- /dev/null +++ b/docs/IPv6Input.md @@ -0,0 +1,155 @@ +# IPv6Input + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "ipv6"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewIPv6Input + +`func NewIPv6Input(value string, ) *IPv6Input` + +NewIPv6Input instantiates a new IPv6Input object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIPv6InputWithDefaults + +`func NewIPv6InputWithDefaults() *IPv6Input` + +NewIPv6InputWithDefaults instantiates a new IPv6Input object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *IPv6Input) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IPv6Input) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IPv6Input) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *IPv6Input) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IPv6Input) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IPv6Input) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IPv6Input) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *IPv6Input) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IPv6Input) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IPv6Input) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IPv6Input) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *IPv6Input) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IPv6Input) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IPv6Input) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IPv6Input) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *IPv6Input) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *IPv6Input) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *IPv6Input) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *IPv6Input) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IPv6Output.md b/docs/IPv6Output.md new file mode 100644 index 0000000..1098c14 --- /dev/null +++ b/docs/IPv6Output.md @@ -0,0 +1,218 @@ +# IPv6Output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "ipv6"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewIPv6Output + +`func NewIPv6Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *IPv6Output` + +NewIPv6Output instantiates a new IPv6Output object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIPv6OutputWithDefaults + +`func NewIPv6OutputWithDefaults() *IPv6Output` + +NewIPv6OutputWithDefaults instantiates a new IPv6Output object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *IPv6Output) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IPv6Output) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IPv6Output) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *IPv6Output) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IPv6Output) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IPv6Output) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IPv6Output) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *IPv6Output) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IPv6Output) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IPv6Output) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IPv6Output) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *IPv6Output) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IPv6Output) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IPv6Output) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IPv6Output) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *IPv6Output) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *IPv6Output) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *IPv6Output) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *IPv6Output) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *IPv6Output) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IPv6Output) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IPv6Output) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *IPv6Output) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *IPv6Output) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *IPv6Output) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *IPv6Output) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *IPv6Output) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *IPv6Output) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IdentityInput.md b/docs/IdentityInput.md new file mode 100644 index 0000000..b70da52 --- /dev/null +++ b/docs/IdentityInput.md @@ -0,0 +1,259 @@ +# IdentityInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "identity"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**IdentityClass** | Pointer to **string** | | [optional] [default to ""] +**Sectors** | Pointer to **[]string** | | [optional] [default to []] +**ContactInformation** | Pointer to **string** | | [optional] [default to ""] + +## Methods + +### NewIdentityInput + +`func NewIdentityInput(name string, ) *IdentityInput` + +NewIdentityInput instantiates a new IdentityInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIdentityInputWithDefaults + +`func NewIdentityInputWithDefaults() *IdentityInput` + +NewIdentityInputWithDefaults instantiates a new IdentityInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *IdentityInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IdentityInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IdentityInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IdentityInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *IdentityInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *IdentityInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *IdentityInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *IdentityInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *IdentityInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *IdentityInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *IdentityInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *IdentityInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IdentityInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IdentityInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IdentityInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *IdentityInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IdentityInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IdentityInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IdentityInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *IdentityInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *IdentityInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *IdentityInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *IdentityInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetIdentityClass + +`func (o *IdentityInput) GetIdentityClass() string` + +GetIdentityClass returns the IdentityClass field if non-nil, zero value otherwise. + +### GetIdentityClassOk + +`func (o *IdentityInput) GetIdentityClassOk() (*string, bool)` + +GetIdentityClassOk returns a tuple with the IdentityClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityClass + +`func (o *IdentityInput) SetIdentityClass(v string)` + +SetIdentityClass sets IdentityClass field to given value. + +### HasIdentityClass + +`func (o *IdentityInput) HasIdentityClass() bool` + +HasIdentityClass returns a boolean if a field has been set. + +### GetSectors + +`func (o *IdentityInput) GetSectors() []string` + +GetSectors returns the Sectors field if non-nil, zero value otherwise. + +### GetSectorsOk + +`func (o *IdentityInput) GetSectorsOk() (*[]string, bool)` + +GetSectorsOk returns a tuple with the Sectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSectors + +`func (o *IdentityInput) SetSectors(v []string)` + +SetSectors sets Sectors field to given value. + +### HasSectors + +`func (o *IdentityInput) HasSectors() bool` + +HasSectors returns a boolean if a field has been set. + +### GetContactInformation + +`func (o *IdentityInput) GetContactInformation() string` + +GetContactInformation returns the ContactInformation field if non-nil, zero value otherwise. + +### GetContactInformationOk + +`func (o *IdentityInput) GetContactInformationOk() (*string, bool)` + +GetContactInformationOk returns a tuple with the ContactInformation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContactInformation + +`func (o *IdentityInput) SetContactInformation(v string)` + +SetContactInformation sets ContactInformation field to given value. + +### HasContactInformation + +`func (o *IdentityInput) HasContactInformation() bool` + +HasContactInformation returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IdentityOutput.md b/docs/IdentityOutput.md new file mode 100644 index 0000000..6845cec --- /dev/null +++ b/docs/IdentityOutput.md @@ -0,0 +1,343 @@ +# IdentityOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "identity"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**IdentityClass** | Pointer to **string** | | [optional] [default to ""] +**Sectors** | Pointer to **[]string** | | [optional] [default to []] +**ContactInformation** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewIdentityOutput + +`func NewIdentityOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *IdentityOutput` + +NewIdentityOutput instantiates a new IdentityOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIdentityOutputWithDefaults + +`func NewIdentityOutputWithDefaults() *IdentityOutput` + +NewIdentityOutputWithDefaults instantiates a new IdentityOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *IdentityOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IdentityOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IdentityOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IdentityOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *IdentityOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *IdentityOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *IdentityOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *IdentityOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *IdentityOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *IdentityOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *IdentityOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *IdentityOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IdentityOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IdentityOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IdentityOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *IdentityOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IdentityOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IdentityOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IdentityOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *IdentityOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *IdentityOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *IdentityOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *IdentityOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetIdentityClass + +`func (o *IdentityOutput) GetIdentityClass() string` + +GetIdentityClass returns the IdentityClass field if non-nil, zero value otherwise. + +### GetIdentityClassOk + +`func (o *IdentityOutput) GetIdentityClassOk() (*string, bool)` + +GetIdentityClassOk returns a tuple with the IdentityClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityClass + +`func (o *IdentityOutput) SetIdentityClass(v string)` + +SetIdentityClass sets IdentityClass field to given value. + +### HasIdentityClass + +`func (o *IdentityOutput) HasIdentityClass() bool` + +HasIdentityClass returns a boolean if a field has been set. + +### GetSectors + +`func (o *IdentityOutput) GetSectors() []string` + +GetSectors returns the Sectors field if non-nil, zero value otherwise. + +### GetSectorsOk + +`func (o *IdentityOutput) GetSectorsOk() (*[]string, bool)` + +GetSectorsOk returns a tuple with the Sectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSectors + +`func (o *IdentityOutput) SetSectors(v []string)` + +SetSectors sets Sectors field to given value. + +### HasSectors + +`func (o *IdentityOutput) HasSectors() bool` + +HasSectors returns a boolean if a field has been set. + +### GetContactInformation + +`func (o *IdentityOutput) GetContactInformation() string` + +GetContactInformation returns the ContactInformation field if non-nil, zero value otherwise. + +### GetContactInformationOk + +`func (o *IdentityOutput) GetContactInformationOk() (*string, bool)` + +GetContactInformationOk returns a tuple with the ContactInformation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContactInformation + +`func (o *IdentityOutput) SetContactInformation(v string)` + +SetContactInformation sets ContactInformation field to given value. + +### HasContactInformation + +`func (o *IdentityOutput) HasContactInformation() bool` + +HasContactInformation returns a boolean if a field has been set. + +### GetId + +`func (o *IdentityOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IdentityOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IdentityOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *IdentityOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *IdentityOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *IdentityOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *IdentityOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *IdentityOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *IdentityOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *IdentityOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *IdentityOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *IdentityOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImphashInput.md b/docs/ImphashInput.md new file mode 100644 index 0000000..43aba54 --- /dev/null +++ b/docs/ImphashInput.md @@ -0,0 +1,155 @@ +# ImphashInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "imphash"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewImphashInput + +`func NewImphashInput(value string, ) *ImphashInput` + +NewImphashInput instantiates a new ImphashInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImphashInputWithDefaults + +`func NewImphashInputWithDefaults() *ImphashInput` + +NewImphashInputWithDefaults instantiates a new ImphashInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ImphashInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ImphashInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ImphashInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ImphashInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ImphashInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ImphashInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ImphashInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ImphashInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ImphashInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ImphashInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ImphashInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ImphashInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ImphashInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ImphashInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ImphashInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ImphashInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ImphashInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ImphashInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ImphashInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImphashOutput.md b/docs/ImphashOutput.md new file mode 100644 index 0000000..2133e58 --- /dev/null +++ b/docs/ImphashOutput.md @@ -0,0 +1,218 @@ +# ImphashOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "imphash"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewImphashOutput + +`func NewImphashOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *ImphashOutput` + +NewImphashOutput instantiates a new ImphashOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImphashOutputWithDefaults + +`func NewImphashOutputWithDefaults() *ImphashOutput` + +NewImphashOutputWithDefaults instantiates a new ImphashOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ImphashOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ImphashOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ImphashOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ImphashOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ImphashOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ImphashOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ImphashOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ImphashOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ImphashOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ImphashOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ImphashOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ImphashOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ImphashOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ImphashOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ImphashOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ImphashOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ImphashOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ImphashOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ImphashOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *ImphashOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ImphashOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ImphashOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ImphashOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ImphashOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ImphashOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ImphashOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ImphashOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ImphashOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImportDataAPI.md b/docs/ImportDataAPI.md new file mode 100644 index 0000000..c33eac7 --- /dev/null +++ b/docs/ImportDataAPI.md @@ -0,0 +1,73 @@ +# \ImportDataAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ImportMispJsonApiV2ImportDataImportMispJsonPost**](ImportDataAPI.md#ImportMispJsonApiV2ImportDataImportMispJsonPost) | **Post** /api/v2/import_data/import_misp_json | Import Misp Json + + + +## ImportMispJsonApiV2ImportDataImportMispJsonPost + +> interface{} ImportMispJsonApiV2ImportDataImportMispJsonPost(ctx).MispFileJson(mispFileJson).Execute() + +Import Misp Json + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + mispFileJson := os.NewFile(1234, "some_file") // *os.File | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ImportDataAPI.ImportMispJsonApiV2ImportDataImportMispJsonPost(context.Background()).MispFileJson(mispFileJson).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ImportDataAPI.ImportMispJsonApiV2ImportDataImportMispJsonPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImportMispJsonApiV2ImportDataImportMispJsonPost`: interface{} + fmt.Fprintf(os.Stdout, "Response from `ImportDataAPI.ImportMispJsonApiV2ImportDataImportMispJsonPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiImportMispJsonApiV2ImportDataImportMispJsonPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mispFileJson** | ***os.File** | | + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/ImportMispJsonAPI.md b/docs/ImportMispJsonAPI.md new file mode 100644 index 0000000..e248e73 --- /dev/null +++ b/docs/ImportMispJsonAPI.md @@ -0,0 +1,73 @@ +# \ImportMispJsonAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ImportMispJsonApiV2ImportDataImportMispJsonPost_0**](ImportMispJsonAPI.md#ImportMispJsonApiV2ImportDataImportMispJsonPost_0) | **Post** /api/v2/import_data/import_misp_json | Import Misp Json + + + +## ImportMispJsonApiV2ImportDataImportMispJsonPost_0 + +> interface{} ImportMispJsonApiV2ImportDataImportMispJsonPost_0(ctx).MispFileJson(mispFileJson).Execute() + +Import Misp Json + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + mispFileJson := os.NewFile(1234, "some_file") // *os.File | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ImportMispJsonAPI.ImportMispJsonApiV2ImportDataImportMispJsonPost_0(context.Background()).MispFileJson(mispFileJson).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ImportMispJsonAPI.ImportMispJsonApiV2ImportDataImportMispJsonPost_0``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImportMispJsonApiV2ImportDataImportMispJsonPost_0`: interface{} + fmt.Fprintf(os.Stdout, "Response from `ImportMispJsonAPI.ImportMispJsonApiV2ImportDataImportMispJsonPost_0`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiImportMispJsonApiV2ImportDataImportMispJsonPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mispFileJson** | ***os.File** | | + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/Indicator.md b/docs/Indicator.md new file mode 100644 index 0000000..0cf9052 --- /dev/null +++ b/docs/Indicator.md @@ -0,0 +1,385 @@ +# Indicator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewIndicator + +`func NewIndicator(name string, type_ string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, ) *Indicator` + +NewIndicator instantiates a new Indicator object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndicatorWithDefaults + +`func NewIndicatorWithDefaults() *Indicator` + +NewIndicatorWithDefaults instantiates a new Indicator object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Indicator) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Indicator) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Indicator) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *Indicator) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Indicator) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Indicator) SetType(v string)` + +SetType sets Type field to given value. + + +### GetDescription + +`func (o *Indicator) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Indicator) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Indicator) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Indicator) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *Indicator) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Indicator) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Indicator) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Indicator) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *Indicator) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *Indicator) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *Indicator) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *Indicator) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *Indicator) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *Indicator) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *Indicator) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *Indicator) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *Indicator) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *Indicator) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *Indicator) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *Indicator) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *Indicator) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *Indicator) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *Indicator) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *Indicator) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *Indicator) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *Indicator) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *Indicator) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *Indicator) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *Indicator) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *Indicator) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *Indicator) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *Indicator) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *Indicator) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *Indicator) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *Indicator) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *Indicator) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *Indicator) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *Indicator) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetId + +`func (o *Indicator) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Indicator) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Indicator) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *Indicator) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Indicator) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *Indicator) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *Indicator) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *Indicator) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *Indicator) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Indicator1.md b/docs/Indicator1.md new file mode 100644 index 0000000..adeea25 --- /dev/null +++ b/docs/Indicator1.md @@ -0,0 +1,530 @@ +# Indicator1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "query"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**QueryType** | **string** | | +**TargetSystems** | Pointer to **[]string** | | [optional] [default to []] +**Sources** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**SupportedOs** | Pointer to **[]string** | | [optional] [default to []] +**Sid** | Pointer to **int32** | | [optional] [default to 0] +**Metadata** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewIndicator1 + +`func NewIndicator1(name string, pattern string, diamond DiamondModel, queryType string, ) *Indicator1` + +NewIndicator1 instantiates a new Indicator1 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndicator1WithDefaults + +`func NewIndicator1WithDefaults() *Indicator1` + +NewIndicator1WithDefaults instantiates a new Indicator1 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Indicator1) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Indicator1) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Indicator1) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *Indicator1) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Indicator1) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Indicator1) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Indicator1) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *Indicator1) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Indicator1) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Indicator1) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Indicator1) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *Indicator1) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Indicator1) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Indicator1) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Indicator1) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *Indicator1) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *Indicator1) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *Indicator1) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *Indicator1) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *Indicator1) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *Indicator1) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *Indicator1) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *Indicator1) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *Indicator1) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *Indicator1) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *Indicator1) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *Indicator1) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *Indicator1) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *Indicator1) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *Indicator1) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *Indicator1) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *Indicator1) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *Indicator1) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *Indicator1) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *Indicator1) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *Indicator1) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *Indicator1) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *Indicator1) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *Indicator1) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *Indicator1) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *Indicator1) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *Indicator1) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *Indicator1) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *Indicator1) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *Indicator1) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetQueryType + +`func (o *Indicator1) GetQueryType() string` + +GetQueryType returns the QueryType field if non-nil, zero value otherwise. + +### GetQueryTypeOk + +`func (o *Indicator1) GetQueryTypeOk() (*string, bool)` + +GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryType + +`func (o *Indicator1) SetQueryType(v string)` + +SetQueryType sets QueryType field to given value. + + +### GetTargetSystems + +`func (o *Indicator1) GetTargetSystems() []string` + +GetTargetSystems returns the TargetSystems field if non-nil, zero value otherwise. + +### GetTargetSystemsOk + +`func (o *Indicator1) GetTargetSystemsOk() (*[]string, bool)` + +GetTargetSystemsOk returns a tuple with the TargetSystems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetSystems + +`func (o *Indicator1) SetTargetSystems(v []string)` + +SetTargetSystems sets TargetSystems field to given value. + +### HasTargetSystems + +`func (o *Indicator1) HasTargetSystems() bool` + +HasTargetSystems returns a boolean if a field has been set. + +### GetSources + +`func (o *Indicator1) GetSources() []map[string]interface{}` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *Indicator1) GetSourcesOk() (*[]map[string]interface{}, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *Indicator1) SetSources(v []map[string]interface{})` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *Indicator1) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetAliases + +`func (o *Indicator1) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *Indicator1) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *Indicator1) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *Indicator1) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetSupportedOs + +`func (o *Indicator1) GetSupportedOs() []string` + +GetSupportedOs returns the SupportedOs field if non-nil, zero value otherwise. + +### GetSupportedOsOk + +`func (o *Indicator1) GetSupportedOsOk() (*[]string, bool)` + +GetSupportedOsOk returns a tuple with the SupportedOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedOs + +`func (o *Indicator1) SetSupportedOs(v []string)` + +SetSupportedOs sets SupportedOs field to given value. + +### HasSupportedOs + +`func (o *Indicator1) HasSupportedOs() bool` + +HasSupportedOs returns a boolean if a field has been set. + +### GetSid + +`func (o *Indicator1) GetSid() int32` + +GetSid returns the Sid field if non-nil, zero value otherwise. + +### GetSidOk + +`func (o *Indicator1) GetSidOk() (*int32, bool)` + +GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSid + +`func (o *Indicator1) SetSid(v int32)` + +SetSid sets Sid field to given value. + +### HasSid + +`func (o *Indicator1) HasSid() bool` + +HasSid returns a boolean if a field has been set. + +### GetMetadata + +`func (o *Indicator1) GetMetadata() []string` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *Indicator1) GetMetadataOk() (*[]string, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *Indicator1) SetMetadata(v []string)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *Indicator1) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetReferences + +`func (o *Indicator1) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *Indicator1) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *Indicator1) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *Indicator1) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorSearchRequest.md b/docs/IndicatorSearchRequest.md new file mode 100644 index 0000000..6614ba1 --- /dev/null +++ b/docs/IndicatorSearchRequest.md @@ -0,0 +1,186 @@ +# IndicatorSearchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | Pointer to [**map[string]QueryValue**](QueryValue.md) | | [optional] [default to {}] +**Type** | Pointer to [**IndicatorSearchRequestType**](IndicatorSearchRequestType.md) | | [optional] +**Sorting** | Pointer to **[][]interface{}** | | [optional] [default to []] +**FilterAliases** | Pointer to **[][]interface{}** | | [optional] [default to []] +**Count** | Pointer to **int32** | | [optional] [default to 50] +**Page** | Pointer to **int32** | | [optional] [default to 0] + +## Methods + +### NewIndicatorSearchRequest + +`func NewIndicatorSearchRequest() *IndicatorSearchRequest` + +NewIndicatorSearchRequest instantiates a new IndicatorSearchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndicatorSearchRequestWithDefaults + +`func NewIndicatorSearchRequestWithDefaults() *IndicatorSearchRequest` + +NewIndicatorSearchRequestWithDefaults instantiates a new IndicatorSearchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *IndicatorSearchRequest) GetQuery() map[string]QueryValue` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *IndicatorSearchRequest) GetQueryOk() (*map[string]QueryValue, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *IndicatorSearchRequest) SetQuery(v map[string]QueryValue)` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *IndicatorSearchRequest) HasQuery() bool` + +HasQuery returns a boolean if a field has been set. + +### GetType + +`func (o *IndicatorSearchRequest) GetType() IndicatorSearchRequestType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IndicatorSearchRequest) GetTypeOk() (*IndicatorSearchRequestType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IndicatorSearchRequest) SetType(v IndicatorSearchRequestType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IndicatorSearchRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSorting + +`func (o *IndicatorSearchRequest) GetSorting() [][]interface{}` + +GetSorting returns the Sorting field if non-nil, zero value otherwise. + +### GetSortingOk + +`func (o *IndicatorSearchRequest) GetSortingOk() (*[][]interface{}, bool)` + +GetSortingOk returns a tuple with the Sorting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSorting + +`func (o *IndicatorSearchRequest) SetSorting(v [][]interface{})` + +SetSorting sets Sorting field to given value. + +### HasSorting + +`func (o *IndicatorSearchRequest) HasSorting() bool` + +HasSorting returns a boolean if a field has been set. + +### GetFilterAliases + +`func (o *IndicatorSearchRequest) GetFilterAliases() [][]interface{}` + +GetFilterAliases returns the FilterAliases field if non-nil, zero value otherwise. + +### GetFilterAliasesOk + +`func (o *IndicatorSearchRequest) GetFilterAliasesOk() (*[][]interface{}, bool)` + +GetFilterAliasesOk returns a tuple with the FilterAliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilterAliases + +`func (o *IndicatorSearchRequest) SetFilterAliases(v [][]interface{})` + +SetFilterAliases sets FilterAliases field to given value. + +### HasFilterAliases + +`func (o *IndicatorSearchRequest) HasFilterAliases() bool` + +HasFilterAliases returns a boolean if a field has been set. + +### GetCount + +`func (o *IndicatorSearchRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *IndicatorSearchRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *IndicatorSearchRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *IndicatorSearchRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetPage + +`func (o *IndicatorSearchRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *IndicatorSearchRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *IndicatorSearchRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *IndicatorSearchRequest) HasPage() bool` + +HasPage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorSearchRequestType.md b/docs/IndicatorSearchRequestType.md new file mode 100644 index 0000000..d61571a --- /dev/null +++ b/docs/IndicatorSearchRequestType.md @@ -0,0 +1,30 @@ +# IndicatorSearchRequestType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewIndicatorSearchRequestType + +`func NewIndicatorSearchRequestType() *IndicatorSearchRequestType` + +NewIndicatorSearchRequestType instantiates a new IndicatorSearchRequestType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndicatorSearchRequestTypeWithDefaults + +`func NewIndicatorSearchRequestTypeWithDefaults() *IndicatorSearchRequestType` + +NewIndicatorSearchRequestTypeWithDefaults instantiates a new IndicatorSearchRequestType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorSearchResponse.md b/docs/IndicatorSearchResponse.md new file mode 100644 index 0000000..a071f4b --- /dev/null +++ b/docs/IndicatorSearchResponse.md @@ -0,0 +1,72 @@ +# IndicatorSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Indicators** | [**[]IndicatorsInner**](IndicatorsInner.md) | | +**Total** | **int32** | | + +## Methods + +### NewIndicatorSearchResponse + +`func NewIndicatorSearchResponse(indicators []IndicatorsInner, total int32, ) *IndicatorSearchResponse` + +NewIndicatorSearchResponse instantiates a new IndicatorSearchResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndicatorSearchResponseWithDefaults + +`func NewIndicatorSearchResponseWithDefaults() *IndicatorSearchResponse` + +NewIndicatorSearchResponseWithDefaults instantiates a new IndicatorSearchResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIndicators + +`func (o *IndicatorSearchResponse) GetIndicators() []IndicatorsInner` + +GetIndicators returns the Indicators field if non-nil, zero value otherwise. + +### GetIndicatorsOk + +`func (o *IndicatorSearchResponse) GetIndicatorsOk() (*[]IndicatorsInner, bool)` + +GetIndicatorsOk returns a tuple with the Indicators field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndicators + +`func (o *IndicatorSearchResponse) SetIndicators(v []IndicatorsInner)` + +SetIndicators sets Indicators field to given value. + + +### GetTotal + +`func (o *IndicatorSearchResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *IndicatorSearchResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *IndicatorSearchResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorTagRequest.md b/docs/IndicatorTagRequest.md new file mode 100644 index 0000000..782ea39 --- /dev/null +++ b/docs/IndicatorTagRequest.md @@ -0,0 +1,103 @@ +# IndicatorTagRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ids** | **[]string** | | +**Tags** | Pointer to **[]string** | | [optional] [default to []] +**Strict** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewIndicatorTagRequest + +`func NewIndicatorTagRequest(ids []string, ) *IndicatorTagRequest` + +NewIndicatorTagRequest instantiates a new IndicatorTagRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndicatorTagRequestWithDefaults + +`func NewIndicatorTagRequestWithDefaults() *IndicatorTagRequest` + +NewIndicatorTagRequestWithDefaults instantiates a new IndicatorTagRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIds + +`func (o *IndicatorTagRequest) GetIds() []string` + +GetIds returns the Ids field if non-nil, zero value otherwise. + +### GetIdsOk + +`func (o *IndicatorTagRequest) GetIdsOk() (*[]string, bool)` + +GetIdsOk returns a tuple with the Ids field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIds + +`func (o *IndicatorTagRequest) SetIds(v []string)` + +SetIds sets Ids field to given value. + + +### GetTags + +`func (o *IndicatorTagRequest) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *IndicatorTagRequest) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *IndicatorTagRequest) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *IndicatorTagRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetStrict + +`func (o *IndicatorTagRequest) GetStrict() bool` + +GetStrict returns the Strict field if non-nil, zero value otherwise. + +### GetStrictOk + +`func (o *IndicatorTagRequest) GetStrictOk() (*bool, bool)` + +GetStrictOk returns a tuple with the Strict field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStrict + +`func (o *IndicatorTagRequest) SetStrict(v bool)` + +SetStrict sets Strict field to given value. + +### HasStrict + +`func (o *IndicatorTagRequest) HasStrict() bool` + +HasStrict returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorTagResponse.md b/docs/IndicatorTagResponse.md new file mode 100644 index 0000000..89d574e --- /dev/null +++ b/docs/IndicatorTagResponse.md @@ -0,0 +1,72 @@ +# IndicatorTagResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tagged** | **int32** | | +**Tags** | [**map[string]map[string]TagRelationshipOutput**](map.md) | | + +## Methods + +### NewIndicatorTagResponse + +`func NewIndicatorTagResponse(tagged int32, tags map[string]map[string]TagRelationshipOutput, ) *IndicatorTagResponse` + +NewIndicatorTagResponse instantiates a new IndicatorTagResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndicatorTagResponseWithDefaults + +`func NewIndicatorTagResponseWithDefaults() *IndicatorTagResponse` + +NewIndicatorTagResponseWithDefaults instantiates a new IndicatorTagResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTagged + +`func (o *IndicatorTagResponse) GetTagged() int32` + +GetTagged returns the Tagged field if non-nil, zero value otherwise. + +### GetTaggedOk + +`func (o *IndicatorTagResponse) GetTaggedOk() (*int32, bool)` + +GetTaggedOk returns a tuple with the Tagged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTagged + +`func (o *IndicatorTagResponse) SetTagged(v int32)` + +SetTagged sets Tagged field to given value. + + +### GetTags + +`func (o *IndicatorTagResponse) GetTags() map[string]map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *IndicatorTagResponse) GetTagsOk() (*map[string]map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *IndicatorTagResponse) SetTags(v map[string]map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorType.md b/docs/IndicatorType.md new file mode 100644 index 0000000..9300e22 --- /dev/null +++ b/docs/IndicatorType.md @@ -0,0 +1,21 @@ +# IndicatorType + +## Enum + + +* `QUERY` (value: `"query"`) + +* `SIGMA` (value: `"sigma"`) + +* `REGEX` (value: `"regex"`) + +* `FORENSICARTIFACT` (value: `"forensicartifact"`) + +* `SURICATA` (value: `"suricata"`) + +* `YARA` (value: `"yara"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorsAPI.md b/docs/IndicatorsAPI.md new file mode 100644 index 0000000..36f3a40 --- /dev/null +++ b/docs/IndicatorsAPI.md @@ -0,0 +1,424 @@ +# \IndicatorsAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteApiV2IndicatorsIndicatorIdDelete**](IndicatorsAPI.md#DeleteApiV2IndicatorsIndicatorIdDelete) | **Delete** /api/v2/indicators/{indicator_id} | Delete +[**DetailsApiV2IndicatorsIndicatorIdGet**](IndicatorsAPI.md#DetailsApiV2IndicatorsIndicatorIdGet) | **Get** /api/v2/indicators/{indicator_id} | Details +[**NewApiV2IndicatorsPost**](IndicatorsAPI.md#NewApiV2IndicatorsPost) | **Post** /api/v2/indicators/ | New +[**PatchApiV2IndicatorsIndicatorIdPatch**](IndicatorsAPI.md#PatchApiV2IndicatorsIndicatorIdPatch) | **Patch** /api/v2/indicators/{indicator_id} | Patch +[**SearchApiV2IndicatorsSearchPost**](IndicatorsAPI.md#SearchApiV2IndicatorsSearchPost) | **Post** /api/v2/indicators/search | Search +[**TagApiV2IndicatorsTagPost**](IndicatorsAPI.md#TagApiV2IndicatorsTagPost) | **Post** /api/v2/indicators/tag | Tag + + + +## DeleteApiV2IndicatorsIndicatorIdDelete + +> interface{} DeleteApiV2IndicatorsIndicatorIdDelete(ctx, indicatorId).Execute() + +Delete + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + indicatorId := "indicatorId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IndicatorsAPI.DeleteApiV2IndicatorsIndicatorIdDelete(context.Background(), indicatorId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IndicatorsAPI.DeleteApiV2IndicatorsIndicatorIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApiV2IndicatorsIndicatorIdDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `IndicatorsAPI.DeleteApiV2IndicatorsIndicatorIdDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**indicatorId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApiV2IndicatorsIndicatorIdDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DetailsApiV2IndicatorsIndicatorIdGet + +> ResponseDetailsApiV2IndicatorsIndicatorIdGet DetailsApiV2IndicatorsIndicatorIdGet(ctx, indicatorId).Execute() + +Details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + indicatorId := TODO // interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IndicatorsAPI.DetailsApiV2IndicatorsIndicatorIdGet(context.Background(), indicatorId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IndicatorsAPI.DetailsApiV2IndicatorsIndicatorIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailsApiV2IndicatorsIndicatorIdGet`: ResponseDetailsApiV2IndicatorsIndicatorIdGet + fmt.Fprintf(os.Stdout, "Response from `IndicatorsAPI.DetailsApiV2IndicatorsIndicatorIdGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**indicatorId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDetailsApiV2IndicatorsIndicatorIdGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDetailsApiV2IndicatorsIndicatorIdGet**](ResponseDetailsApiV2IndicatorsIndicatorIdGet.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## NewApiV2IndicatorsPost + +> ResponseNewApiV2IndicatorsPost NewApiV2IndicatorsPost(ctx).NewIndicatorRequest(newIndicatorRequest).Execute() + +New + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newIndicatorRequest := *openapiclient.NewNewIndicatorRequest(openapiclient.Indicator_1{ForensicArtifactInput: openapiclient.NewForensicArtifactInput("Name_example", "Pattern_example", openapiclient.DiamondModel("adversary"))}) // NewIndicatorRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IndicatorsAPI.NewApiV2IndicatorsPost(context.Background()).NewIndicatorRequest(newIndicatorRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IndicatorsAPI.NewApiV2IndicatorsPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `NewApiV2IndicatorsPost`: ResponseNewApiV2IndicatorsPost + fmt.Fprintf(os.Stdout, "Response from `IndicatorsAPI.NewApiV2IndicatorsPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiNewApiV2IndicatorsPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newIndicatorRequest** | [**NewIndicatorRequest**](NewIndicatorRequest.md) | | + +### Return type + +[**ResponseNewApiV2IndicatorsPost**](ResponseNewApiV2IndicatorsPost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchApiV2IndicatorsIndicatorIdPatch + +> ResponsePatchApiV2IndicatorsIndicatorIdPatch PatchApiV2IndicatorsIndicatorIdPatch(ctx, indicatorId).PatchIndicatorRequest(patchIndicatorRequest).Execute() + +Patch + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + indicatorId := TODO // interface{} | + patchIndicatorRequest := *openapiclient.NewPatchIndicatorRequest(openapiclient.Indicator_1{ForensicArtifactInput: openapiclient.NewForensicArtifactInput("Name_example", "Pattern_example", openapiclient.DiamondModel("adversary"))}) // PatchIndicatorRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IndicatorsAPI.PatchApiV2IndicatorsIndicatorIdPatch(context.Background(), indicatorId).PatchIndicatorRequest(patchIndicatorRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IndicatorsAPI.PatchApiV2IndicatorsIndicatorIdPatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchApiV2IndicatorsIndicatorIdPatch`: ResponsePatchApiV2IndicatorsIndicatorIdPatch + fmt.Fprintf(os.Stdout, "Response from `IndicatorsAPI.PatchApiV2IndicatorsIndicatorIdPatch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**indicatorId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchApiV2IndicatorsIndicatorIdPatchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchIndicatorRequest** | [**PatchIndicatorRequest**](PatchIndicatorRequest.md) | | + +### Return type + +[**ResponsePatchApiV2IndicatorsIndicatorIdPatch**](ResponsePatchApiV2IndicatorsIndicatorIdPatch.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2IndicatorsSearchPost + +> IndicatorSearchResponse SearchApiV2IndicatorsSearchPost(ctx).IndicatorSearchRequest(indicatorSearchRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + indicatorSearchRequest := *openapiclient.NewIndicatorSearchRequest() // IndicatorSearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IndicatorsAPI.SearchApiV2IndicatorsSearchPost(context.Background()).IndicatorSearchRequest(indicatorSearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IndicatorsAPI.SearchApiV2IndicatorsSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2IndicatorsSearchPost`: IndicatorSearchResponse + fmt.Fprintf(os.Stdout, "Response from `IndicatorsAPI.SearchApiV2IndicatorsSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2IndicatorsSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indicatorSearchRequest** | [**IndicatorSearchRequest**](IndicatorSearchRequest.md) | | + +### Return type + +[**IndicatorSearchResponse**](IndicatorSearchResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TagApiV2IndicatorsTagPost + +> IndicatorTagResponse TagApiV2IndicatorsTagPost(ctx).IndicatorTagRequest(indicatorTagRequest).Execute() + +Tag + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + indicatorTagRequest := *openapiclient.NewIndicatorTagRequest([]string{"Ids_example"}) // IndicatorTagRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IndicatorsAPI.TagApiV2IndicatorsTagPost(context.Background()).IndicatorTagRequest(indicatorTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IndicatorsAPI.TagApiV2IndicatorsTagPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TagApiV2IndicatorsTagPost`: IndicatorTagResponse + fmt.Fprintf(os.Stdout, "Response from `IndicatorsAPI.TagApiV2IndicatorsTagPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTagApiV2IndicatorsTagPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indicatorTagRequest** | [**IndicatorTagRequest**](IndicatorTagRequest.md) | | + +### Return type + +[**IndicatorTagResponse**](IndicatorTagResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/IndicatorsInner.md b/docs/IndicatorsInner.md new file mode 100644 index 0000000..76b1130 --- /dev/null +++ b/docs/IndicatorsInner.md @@ -0,0 +1,593 @@ +# IndicatorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "query"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**QueryType** | **string** | | +**TargetSystems** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**Sources** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**SupportedOs** | Pointer to **[]string** | | [optional] [default to []] +**Sid** | Pointer to **int32** | | [optional] [default to 0] +**Metadata** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewIndicatorsInner + +`func NewIndicatorsInner(name string, pattern string, diamond DiamondModel, queryType string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *IndicatorsInner` + +NewIndicatorsInner instantiates a new IndicatorsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndicatorsInnerWithDefaults + +`func NewIndicatorsInnerWithDefaults() *IndicatorsInner` + +NewIndicatorsInnerWithDefaults instantiates a new IndicatorsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *IndicatorsInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *IndicatorsInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *IndicatorsInner) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *IndicatorsInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IndicatorsInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IndicatorsInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IndicatorsInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *IndicatorsInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *IndicatorsInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *IndicatorsInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *IndicatorsInner) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *IndicatorsInner) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IndicatorsInner) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IndicatorsInner) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IndicatorsInner) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *IndicatorsInner) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *IndicatorsInner) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *IndicatorsInner) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *IndicatorsInner) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *IndicatorsInner) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *IndicatorsInner) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *IndicatorsInner) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *IndicatorsInner) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *IndicatorsInner) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *IndicatorsInner) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *IndicatorsInner) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *IndicatorsInner) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *IndicatorsInner) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *IndicatorsInner) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *IndicatorsInner) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *IndicatorsInner) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *IndicatorsInner) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *IndicatorsInner) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *IndicatorsInner) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *IndicatorsInner) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *IndicatorsInner) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *IndicatorsInner) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *IndicatorsInner) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *IndicatorsInner) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *IndicatorsInner) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *IndicatorsInner) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *IndicatorsInner) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *IndicatorsInner) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *IndicatorsInner) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *IndicatorsInner) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetQueryType + +`func (o *IndicatorsInner) GetQueryType() string` + +GetQueryType returns the QueryType field if non-nil, zero value otherwise. + +### GetQueryTypeOk + +`func (o *IndicatorsInner) GetQueryTypeOk() (*string, bool)` + +GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryType + +`func (o *IndicatorsInner) SetQueryType(v string)` + +SetQueryType sets QueryType field to given value. + + +### GetTargetSystems + +`func (o *IndicatorsInner) GetTargetSystems() []string` + +GetTargetSystems returns the TargetSystems field if non-nil, zero value otherwise. + +### GetTargetSystemsOk + +`func (o *IndicatorsInner) GetTargetSystemsOk() (*[]string, bool)` + +GetTargetSystemsOk returns a tuple with the TargetSystems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetSystems + +`func (o *IndicatorsInner) SetTargetSystems(v []string)` + +SetTargetSystems sets TargetSystems field to given value. + +### HasTargetSystems + +`func (o *IndicatorsInner) HasTargetSystems() bool` + +HasTargetSystems returns a boolean if a field has been set. + +### GetId + +`func (o *IndicatorsInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IndicatorsInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IndicatorsInner) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *IndicatorsInner) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *IndicatorsInner) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *IndicatorsInner) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *IndicatorsInner) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *IndicatorsInner) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *IndicatorsInner) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetSources + +`func (o *IndicatorsInner) GetSources() []map[string]interface{}` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *IndicatorsInner) GetSourcesOk() (*[]map[string]interface{}, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *IndicatorsInner) SetSources(v []map[string]interface{})` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *IndicatorsInner) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetAliases + +`func (o *IndicatorsInner) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *IndicatorsInner) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *IndicatorsInner) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *IndicatorsInner) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetSupportedOs + +`func (o *IndicatorsInner) GetSupportedOs() []string` + +GetSupportedOs returns the SupportedOs field if non-nil, zero value otherwise. + +### GetSupportedOsOk + +`func (o *IndicatorsInner) GetSupportedOsOk() (*[]string, bool)` + +GetSupportedOsOk returns a tuple with the SupportedOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedOs + +`func (o *IndicatorsInner) SetSupportedOs(v []string)` + +SetSupportedOs sets SupportedOs field to given value. + +### HasSupportedOs + +`func (o *IndicatorsInner) HasSupportedOs() bool` + +HasSupportedOs returns a boolean if a field has been set. + +### GetSid + +`func (o *IndicatorsInner) GetSid() int32` + +GetSid returns the Sid field if non-nil, zero value otherwise. + +### GetSidOk + +`func (o *IndicatorsInner) GetSidOk() (*int32, bool)` + +GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSid + +`func (o *IndicatorsInner) SetSid(v int32)` + +SetSid sets Sid field to given value. + +### HasSid + +`func (o *IndicatorsInner) HasSid() bool` + +HasSid returns a boolean if a field has been set. + +### GetMetadata + +`func (o *IndicatorsInner) GetMetadata() []string` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *IndicatorsInner) GetMetadataOk() (*[]string, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *IndicatorsInner) SetMetadata(v []string)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *IndicatorsInner) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetReferences + +`func (o *IndicatorsInner) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *IndicatorsInner) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *IndicatorsInner) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *IndicatorsInner) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntrusionSetInput.md b/docs/IntrusionSetInput.md new file mode 100644 index 0000000..1cc19ee --- /dev/null +++ b/docs/IntrusionSetInput.md @@ -0,0 +1,259 @@ +# IntrusionSetInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "intrusion-set"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewIntrusionSetInput + +`func NewIntrusionSetInput(name string, ) *IntrusionSetInput` + +NewIntrusionSetInput instantiates a new IntrusionSetInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIntrusionSetInputWithDefaults + +`func NewIntrusionSetInputWithDefaults() *IntrusionSetInput` + +NewIntrusionSetInputWithDefaults instantiates a new IntrusionSetInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *IntrusionSetInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IntrusionSetInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IntrusionSetInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IntrusionSetInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *IntrusionSetInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *IntrusionSetInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *IntrusionSetInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *IntrusionSetInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *IntrusionSetInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *IntrusionSetInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *IntrusionSetInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *IntrusionSetInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IntrusionSetInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IntrusionSetInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IntrusionSetInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *IntrusionSetInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IntrusionSetInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IntrusionSetInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IntrusionSetInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *IntrusionSetInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *IntrusionSetInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *IntrusionSetInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *IntrusionSetInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *IntrusionSetInput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *IntrusionSetInput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *IntrusionSetInput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *IntrusionSetInput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *IntrusionSetInput) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *IntrusionSetInput) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *IntrusionSetInput) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *IntrusionSetInput) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *IntrusionSetInput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *IntrusionSetInput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *IntrusionSetInput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *IntrusionSetInput) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntrusionSetOutput.md b/docs/IntrusionSetOutput.md new file mode 100644 index 0000000..70b86f3 --- /dev/null +++ b/docs/IntrusionSetOutput.md @@ -0,0 +1,343 @@ +# IntrusionSetOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "intrusion-set"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewIntrusionSetOutput + +`func NewIntrusionSetOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *IntrusionSetOutput` + +NewIntrusionSetOutput instantiates a new IntrusionSetOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIntrusionSetOutputWithDefaults + +`func NewIntrusionSetOutputWithDefaults() *IntrusionSetOutput` + +NewIntrusionSetOutputWithDefaults instantiates a new IntrusionSetOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *IntrusionSetOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IntrusionSetOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IntrusionSetOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IntrusionSetOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *IntrusionSetOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *IntrusionSetOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *IntrusionSetOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *IntrusionSetOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *IntrusionSetOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *IntrusionSetOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *IntrusionSetOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *IntrusionSetOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *IntrusionSetOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *IntrusionSetOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *IntrusionSetOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *IntrusionSetOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IntrusionSetOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IntrusionSetOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IntrusionSetOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *IntrusionSetOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *IntrusionSetOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *IntrusionSetOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *IntrusionSetOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *IntrusionSetOutput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *IntrusionSetOutput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *IntrusionSetOutput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *IntrusionSetOutput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *IntrusionSetOutput) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *IntrusionSetOutput) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *IntrusionSetOutput) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *IntrusionSetOutput) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *IntrusionSetOutput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *IntrusionSetOutput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *IntrusionSetOutput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *IntrusionSetOutput) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetId + +`func (o *IntrusionSetOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IntrusionSetOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IntrusionSetOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *IntrusionSetOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *IntrusionSetOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *IntrusionSetOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *IntrusionSetOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *IntrusionSetOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *IntrusionSetOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *IntrusionSetOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *IntrusionSetOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *IntrusionSetOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InvestigationInput.md b/docs/InvestigationInput.md new file mode 100644 index 0000000..0ac80cc --- /dev/null +++ b/docs/InvestigationInput.md @@ -0,0 +1,207 @@ +# InvestigationInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "investigation"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] + +## Methods + +### NewInvestigationInput + +`func NewInvestigationInput(name string, ) *InvestigationInput` + +NewInvestigationInput instantiates a new InvestigationInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInvestigationInputWithDefaults + +`func NewInvestigationInputWithDefaults() *InvestigationInput` + +NewInvestigationInputWithDefaults instantiates a new InvestigationInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *InvestigationInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InvestigationInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InvestigationInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *InvestigationInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *InvestigationInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *InvestigationInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *InvestigationInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *InvestigationInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *InvestigationInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *InvestigationInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *InvestigationInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *InvestigationInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *InvestigationInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *InvestigationInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *InvestigationInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *InvestigationInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *InvestigationInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *InvestigationInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *InvestigationInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *InvestigationInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *InvestigationInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *InvestigationInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *InvestigationInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetReference + +`func (o *InvestigationInput) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *InvestigationInput) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *InvestigationInput) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *InvestigationInput) HasReference() bool` + +HasReference returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InvestigationOutput.md b/docs/InvestigationOutput.md new file mode 100644 index 0000000..5bc6a9e --- /dev/null +++ b/docs/InvestigationOutput.md @@ -0,0 +1,291 @@ +# InvestigationOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "investigation"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewInvestigationOutput + +`func NewInvestigationOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *InvestigationOutput` + +NewInvestigationOutput instantiates a new InvestigationOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInvestigationOutputWithDefaults + +`func NewInvestigationOutputWithDefaults() *InvestigationOutput` + +NewInvestigationOutputWithDefaults instantiates a new InvestigationOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *InvestigationOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InvestigationOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InvestigationOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *InvestigationOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *InvestigationOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *InvestigationOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *InvestigationOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *InvestigationOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *InvestigationOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *InvestigationOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *InvestigationOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *InvestigationOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *InvestigationOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *InvestigationOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *InvestigationOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *InvestigationOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *InvestigationOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *InvestigationOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *InvestigationOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *InvestigationOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *InvestigationOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *InvestigationOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *InvestigationOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetReference + +`func (o *InvestigationOutput) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *InvestigationOutput) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *InvestigationOutput) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *InvestigationOutput) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetId + +`func (o *InvestigationOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *InvestigationOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *InvestigationOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *InvestigationOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *InvestigationOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *InvestigationOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *InvestigationOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *InvestigationOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *InvestigationOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *InvestigationOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *InvestigationOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *InvestigationOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/JA3Input.md b/docs/JA3Input.md new file mode 100644 index 0000000..2e8145f --- /dev/null +++ b/docs/JA3Input.md @@ -0,0 +1,155 @@ +# JA3Input + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "ja3"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewJA3Input + +`func NewJA3Input(value string, ) *JA3Input` + +NewJA3Input instantiates a new JA3Input object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewJA3InputWithDefaults + +`func NewJA3InputWithDefaults() *JA3Input` + +NewJA3InputWithDefaults instantiates a new JA3Input object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *JA3Input) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *JA3Input) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *JA3Input) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *JA3Input) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *JA3Input) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *JA3Input) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *JA3Input) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *JA3Input) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *JA3Input) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *JA3Input) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *JA3Input) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *JA3Input) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *JA3Input) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *JA3Input) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *JA3Input) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *JA3Input) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *JA3Input) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *JA3Input) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *JA3Input) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/JA3Output.md b/docs/JA3Output.md new file mode 100644 index 0000000..94ea2fc --- /dev/null +++ b/docs/JA3Output.md @@ -0,0 +1,218 @@ +# JA3Output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "ja3"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewJA3Output + +`func NewJA3Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *JA3Output` + +NewJA3Output instantiates a new JA3Output object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewJA3OutputWithDefaults + +`func NewJA3OutputWithDefaults() *JA3Output` + +NewJA3OutputWithDefaults instantiates a new JA3Output object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *JA3Output) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *JA3Output) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *JA3Output) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *JA3Output) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *JA3Output) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *JA3Output) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *JA3Output) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *JA3Output) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *JA3Output) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *JA3Output) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *JA3Output) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *JA3Output) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *JA3Output) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *JA3Output) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *JA3Output) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *JA3Output) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *JA3Output) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *JA3Output) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *JA3Output) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *JA3Output) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *JA3Output) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *JA3Output) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *JA3Output) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *JA3Output) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *JA3Output) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *JA3Output) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *JA3Output) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *JA3Output) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/JARMInput.md b/docs/JARMInput.md new file mode 100644 index 0000000..16d5d93 --- /dev/null +++ b/docs/JARMInput.md @@ -0,0 +1,155 @@ +# JARMInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "jarm"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewJARMInput + +`func NewJARMInput(value string, ) *JARMInput` + +NewJARMInput instantiates a new JARMInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewJARMInputWithDefaults + +`func NewJARMInputWithDefaults() *JARMInput` + +NewJARMInputWithDefaults instantiates a new JARMInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *JARMInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *JARMInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *JARMInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *JARMInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *JARMInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *JARMInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *JARMInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *JARMInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *JARMInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *JARMInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *JARMInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *JARMInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *JARMInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *JARMInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *JARMInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *JARMInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *JARMInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *JARMInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *JARMInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/JARMOutput.md b/docs/JARMOutput.md new file mode 100644 index 0000000..d543cc4 --- /dev/null +++ b/docs/JARMOutput.md @@ -0,0 +1,218 @@ +# JARMOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "jarm"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewJARMOutput + +`func NewJARMOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *JARMOutput` + +NewJARMOutput instantiates a new JARMOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewJARMOutputWithDefaults + +`func NewJARMOutputWithDefaults() *JARMOutput` + +NewJARMOutputWithDefaults instantiates a new JARMOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *JARMOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *JARMOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *JARMOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *JARMOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *JARMOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *JARMOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *JARMOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *JARMOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *JARMOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *JARMOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *JARMOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *JARMOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *JARMOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *JARMOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *JARMOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *JARMOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *JARMOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *JARMOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *JARMOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *JARMOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *JARMOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *JARMOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *JARMOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *JARMOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *JARMOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *JARMOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *JARMOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *JARMOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MD5Input.md b/docs/MD5Input.md new file mode 100644 index 0000000..0e4a8e9 --- /dev/null +++ b/docs/MD5Input.md @@ -0,0 +1,155 @@ +# MD5Input + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "md5"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewMD5Input + +`func NewMD5Input(value string, ) *MD5Input` + +NewMD5Input instantiates a new MD5Input object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMD5InputWithDefaults + +`func NewMD5InputWithDefaults() *MD5Input` + +NewMD5InputWithDefaults instantiates a new MD5Input object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *MD5Input) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *MD5Input) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *MD5Input) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *MD5Input) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MD5Input) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *MD5Input) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MD5Input) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *MD5Input) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *MD5Input) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *MD5Input) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *MD5Input) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *MD5Input) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *MD5Input) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *MD5Input) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *MD5Input) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *MD5Input) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *MD5Input) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *MD5Input) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *MD5Input) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MD5Output.md b/docs/MD5Output.md new file mode 100644 index 0000000..49c4fc1 --- /dev/null +++ b/docs/MD5Output.md @@ -0,0 +1,218 @@ +# MD5Output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "md5"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewMD5Output + +`func NewMD5Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *MD5Output` + +NewMD5Output instantiates a new MD5Output object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMD5OutputWithDefaults + +`func NewMD5OutputWithDefaults() *MD5Output` + +NewMD5OutputWithDefaults instantiates a new MD5Output object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *MD5Output) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *MD5Output) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *MD5Output) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *MD5Output) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MD5Output) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *MD5Output) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MD5Output) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *MD5Output) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *MD5Output) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *MD5Output) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *MD5Output) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *MD5Output) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *MD5Output) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *MD5Output) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *MD5Output) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *MD5Output) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *MD5Output) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *MD5Output) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *MD5Output) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *MD5Output) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MD5Output) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *MD5Output) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *MD5Output) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *MD5Output) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *MD5Output) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *MD5Output) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *MD5Output) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *MD5Output) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MacAddressInput.md b/docs/MacAddressInput.md new file mode 100644 index 0000000..6d8ee46 --- /dev/null +++ b/docs/MacAddressInput.md @@ -0,0 +1,155 @@ +# MacAddressInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "mac_address"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewMacAddressInput + +`func NewMacAddressInput(value string, ) *MacAddressInput` + +NewMacAddressInput instantiates a new MacAddressInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMacAddressInputWithDefaults + +`func NewMacAddressInputWithDefaults() *MacAddressInput` + +NewMacAddressInputWithDefaults instantiates a new MacAddressInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *MacAddressInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *MacAddressInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *MacAddressInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *MacAddressInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MacAddressInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *MacAddressInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MacAddressInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *MacAddressInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *MacAddressInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *MacAddressInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *MacAddressInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *MacAddressInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *MacAddressInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *MacAddressInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *MacAddressInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *MacAddressInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *MacAddressInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *MacAddressInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *MacAddressInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MacAddressOutput.md b/docs/MacAddressOutput.md new file mode 100644 index 0000000..59ee424 --- /dev/null +++ b/docs/MacAddressOutput.md @@ -0,0 +1,218 @@ +# MacAddressOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "mac_address"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewMacAddressOutput + +`func NewMacAddressOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *MacAddressOutput` + +NewMacAddressOutput instantiates a new MacAddressOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMacAddressOutputWithDefaults + +`func NewMacAddressOutputWithDefaults() *MacAddressOutput` + +NewMacAddressOutputWithDefaults instantiates a new MacAddressOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *MacAddressOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *MacAddressOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *MacAddressOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *MacAddressOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MacAddressOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *MacAddressOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MacAddressOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *MacAddressOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *MacAddressOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *MacAddressOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *MacAddressOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *MacAddressOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *MacAddressOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *MacAddressOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *MacAddressOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *MacAddressOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *MacAddressOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *MacAddressOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *MacAddressOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *MacAddressOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MacAddressOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *MacAddressOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *MacAddressOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *MacAddressOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *MacAddressOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *MacAddressOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *MacAddressOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *MacAddressOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MalwareInput.md b/docs/MalwareInput.md new file mode 100644 index 0000000..a872759 --- /dev/null +++ b/docs/MalwareInput.md @@ -0,0 +1,259 @@ +# MalwareInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "malware"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**Family** | Pointer to **string** | | [optional] [default to ""] + +## Methods + +### NewMalwareInput + +`func NewMalwareInput(name string, ) *MalwareInput` + +NewMalwareInput instantiates a new MalwareInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMalwareInputWithDefaults + +`func NewMalwareInputWithDefaults() *MalwareInput` + +NewMalwareInputWithDefaults instantiates a new MalwareInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *MalwareInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MalwareInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *MalwareInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MalwareInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *MalwareInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *MalwareInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *MalwareInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *MalwareInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *MalwareInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *MalwareInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *MalwareInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *MalwareInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *MalwareInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *MalwareInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *MalwareInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *MalwareInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *MalwareInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *MalwareInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *MalwareInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *MalwareInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *MalwareInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *MalwareInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *MalwareInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *MalwareInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *MalwareInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *MalwareInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *MalwareInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetAliases + +`func (o *MalwareInput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *MalwareInput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *MalwareInput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *MalwareInput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFamily + +`func (o *MalwareInput) GetFamily() string` + +GetFamily returns the Family field if non-nil, zero value otherwise. + +### GetFamilyOk + +`func (o *MalwareInput) GetFamilyOk() (*string, bool)` + +GetFamilyOk returns a tuple with the Family field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFamily + +`func (o *MalwareInput) SetFamily(v string)` + +SetFamily sets Family field to given value. + +### HasFamily + +`func (o *MalwareInput) HasFamily() bool` + +HasFamily returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MalwareOutput.md b/docs/MalwareOutput.md new file mode 100644 index 0000000..93d9848 --- /dev/null +++ b/docs/MalwareOutput.md @@ -0,0 +1,343 @@ +# MalwareOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "malware"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**Family** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewMalwareOutput + +`func NewMalwareOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *MalwareOutput` + +NewMalwareOutput instantiates a new MalwareOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMalwareOutputWithDefaults + +`func NewMalwareOutputWithDefaults() *MalwareOutput` + +NewMalwareOutputWithDefaults instantiates a new MalwareOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *MalwareOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MalwareOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *MalwareOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MalwareOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *MalwareOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *MalwareOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *MalwareOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *MalwareOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *MalwareOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *MalwareOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *MalwareOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *MalwareOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *MalwareOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *MalwareOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *MalwareOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *MalwareOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *MalwareOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *MalwareOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *MalwareOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *MalwareOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *MalwareOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *MalwareOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *MalwareOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *MalwareOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *MalwareOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *MalwareOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *MalwareOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetAliases + +`func (o *MalwareOutput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *MalwareOutput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *MalwareOutput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *MalwareOutput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFamily + +`func (o *MalwareOutput) GetFamily() string` + +GetFamily returns the Family field if non-nil, zero value otherwise. + +### GetFamilyOk + +`func (o *MalwareOutput) GetFamilyOk() (*string, bool)` + +GetFamilyOk returns a tuple with the Family field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFamily + +`func (o *MalwareOutput) SetFamily(v string)` + +SetFamily sets Family field to given value. + +### HasFamily + +`func (o *MalwareOutput) HasFamily() bool` + +HasFamily returns a boolean if a field has been set. + +### GetId + +`func (o *MalwareOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MalwareOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *MalwareOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *MalwareOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *MalwareOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *MalwareOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *MalwareOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *MalwareOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *MalwareOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *MalwareOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *MalwareOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *MalwareOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MaxHops.md b/docs/MaxHops.md new file mode 100644 index 0000000..8d8f210 --- /dev/null +++ b/docs/MaxHops.md @@ -0,0 +1,30 @@ +# MaxHops + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewMaxHops + +`func NewMaxHops() *MaxHops` + +NewMaxHops instantiates a new MaxHops object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMaxHopsWithDefaults + +`func NewMaxHopsWithDefaults() *MaxHops` + +NewMaxHopsWithDefaults instantiates a new MaxHops object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MergeTagRequest.md b/docs/MergeTagRequest.md new file mode 100644 index 0000000..3b7b563 --- /dev/null +++ b/docs/MergeTagRequest.md @@ -0,0 +1,98 @@ +# MergeTagRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Merge** | **[]string** | | +**MergeInto** | **string** | | +**Permanent** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewMergeTagRequest + +`func NewMergeTagRequest(merge []string, mergeInto string, ) *MergeTagRequest` + +NewMergeTagRequest instantiates a new MergeTagRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMergeTagRequestWithDefaults + +`func NewMergeTagRequestWithDefaults() *MergeTagRequest` + +NewMergeTagRequestWithDefaults instantiates a new MergeTagRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMerge + +`func (o *MergeTagRequest) GetMerge() []string` + +GetMerge returns the Merge field if non-nil, zero value otherwise. + +### GetMergeOk + +`func (o *MergeTagRequest) GetMergeOk() (*[]string, bool)` + +GetMergeOk returns a tuple with the Merge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMerge + +`func (o *MergeTagRequest) SetMerge(v []string)` + +SetMerge sets Merge field to given value. + + +### GetMergeInto + +`func (o *MergeTagRequest) GetMergeInto() string` + +GetMergeInto returns the MergeInto field if non-nil, zero value otherwise. + +### GetMergeIntoOk + +`func (o *MergeTagRequest) GetMergeIntoOk() (*string, bool)` + +GetMergeIntoOk returns a tuple with the MergeInto field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMergeInto + +`func (o *MergeTagRequest) SetMergeInto(v string)` + +SetMergeInto sets MergeInto field to given value. + + +### GetPermanent + +`func (o *MergeTagRequest) GetPermanent() bool` + +GetPermanent returns the Permanent field if non-nil, zero value otherwise. + +### GetPermanentOk + +`func (o *MergeTagRequest) GetPermanentOk() (*bool, bool)` + +GetPermanentOk returns a tuple with the Permanent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPermanent + +`func (o *MergeTagRequest) SetPermanent(v bool)` + +SetPermanent sets Permanent field to given value. + +### HasPermanent + +`func (o *MergeTagRequest) HasPermanent() bool` + +HasPermanent returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MergeTagResult.md b/docs/MergeTagResult.md new file mode 100644 index 0000000..4be818e --- /dev/null +++ b/docs/MergeTagResult.md @@ -0,0 +1,72 @@ +# MergeTagResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Merged** | **int32** | | +**Into** | [**Tag**](Tag.md) | | + +## Methods + +### NewMergeTagResult + +`func NewMergeTagResult(merged int32, into Tag, ) *MergeTagResult` + +NewMergeTagResult instantiates a new MergeTagResult object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMergeTagResultWithDefaults + +`func NewMergeTagResultWithDefaults() *MergeTagResult` + +NewMergeTagResultWithDefaults instantiates a new MergeTagResult object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMerged + +`func (o *MergeTagResult) GetMerged() int32` + +GetMerged returns the Merged field if non-nil, zero value otherwise. + +### GetMergedOk + +`func (o *MergeTagResult) GetMergedOk() (*int32, bool)` + +GetMergedOk returns a tuple with the Merged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMerged + +`func (o *MergeTagResult) SetMerged(v int32)` + +SetMerged sets Merged field to given value. + + +### GetInto + +`func (o *MergeTagResult) GetInto() Tag` + +GetInto returns the Into field if non-nil, zero value otherwise. + +### GetIntoOk + +`func (o *MergeTagResult) GetIntoOk() (*Tag, bool)` + +GetIntoOk returns a tuple with the Into field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInto + +`func (o *MergeTagResult) SetInto(v Tag)` + +SetInto sets Into field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MinHops.md b/docs/MinHops.md new file mode 100644 index 0000000..18b47c1 --- /dev/null +++ b/docs/MinHops.md @@ -0,0 +1,30 @@ +# MinHops + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewMinHops + +`func NewMinHops() *MinHops` + +NewMinHops instantiates a new MinHops object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMinHopsWithDefaults + +`func NewMinHopsWithDefaults() *MinHops` + +NewMinHopsWithDefaults instantiates a new MinHops object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MutexInput.md b/docs/MutexInput.md new file mode 100644 index 0000000..19b93eb --- /dev/null +++ b/docs/MutexInput.md @@ -0,0 +1,155 @@ +# MutexInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "mutex"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewMutexInput + +`func NewMutexInput(value string, ) *MutexInput` + +NewMutexInput instantiates a new MutexInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMutexInputWithDefaults + +`func NewMutexInputWithDefaults() *MutexInput` + +NewMutexInputWithDefaults instantiates a new MutexInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *MutexInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *MutexInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *MutexInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *MutexInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MutexInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *MutexInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MutexInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *MutexInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *MutexInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *MutexInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *MutexInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *MutexInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *MutexInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *MutexInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *MutexInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *MutexInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *MutexInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *MutexInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *MutexInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MutexOutput.md b/docs/MutexOutput.md new file mode 100644 index 0000000..69d367a --- /dev/null +++ b/docs/MutexOutput.md @@ -0,0 +1,218 @@ +# MutexOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "mutex"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewMutexOutput + +`func NewMutexOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *MutexOutput` + +NewMutexOutput instantiates a new MutexOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMutexOutputWithDefaults + +`func NewMutexOutputWithDefaults() *MutexOutput` + +NewMutexOutputWithDefaults instantiates a new MutexOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *MutexOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *MutexOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *MutexOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *MutexOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MutexOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *MutexOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MutexOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *MutexOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *MutexOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *MutexOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *MutexOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *MutexOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *MutexOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *MutexOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *MutexOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *MutexOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *MutexOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *MutexOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *MutexOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *MutexOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MutexOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *MutexOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *MutexOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *MutexOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *MutexOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *MutexOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *MutexOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *MutexOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Name.md b/docs/Name.md new file mode 100644 index 0000000..3298c9f --- /dev/null +++ b/docs/Name.md @@ -0,0 +1,30 @@ +# Name + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewName + +`func NewName() *Name` + +NewName instantiates a new Name object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNameWithDefaults + +`func NewNameWithDefaults() *Name` + +NewNameWithDefaults instantiates a new Name object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NamedPipeInput.md b/docs/NamedPipeInput.md new file mode 100644 index 0000000..75a89bc --- /dev/null +++ b/docs/NamedPipeInput.md @@ -0,0 +1,155 @@ +# NamedPipeInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "named_pipe"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewNamedPipeInput + +`func NewNamedPipeInput(value string, ) *NamedPipeInput` + +NewNamedPipeInput instantiates a new NamedPipeInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNamedPipeInputWithDefaults + +`func NewNamedPipeInputWithDefaults() *NamedPipeInput` + +NewNamedPipeInputWithDefaults instantiates a new NamedPipeInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *NamedPipeInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *NamedPipeInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *NamedPipeInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *NamedPipeInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NamedPipeInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *NamedPipeInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *NamedPipeInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *NamedPipeInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *NamedPipeInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *NamedPipeInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *NamedPipeInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *NamedPipeInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *NamedPipeInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *NamedPipeInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *NamedPipeInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *NamedPipeInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *NamedPipeInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *NamedPipeInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *NamedPipeInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NamedPipeOutput.md b/docs/NamedPipeOutput.md new file mode 100644 index 0000000..9692581 --- /dev/null +++ b/docs/NamedPipeOutput.md @@ -0,0 +1,218 @@ +# NamedPipeOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "named_pipe"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewNamedPipeOutput + +`func NewNamedPipeOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *NamedPipeOutput` + +NewNamedPipeOutput instantiates a new NamedPipeOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNamedPipeOutputWithDefaults + +`func NewNamedPipeOutputWithDefaults() *NamedPipeOutput` + +NewNamedPipeOutputWithDefaults instantiates a new NamedPipeOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *NamedPipeOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *NamedPipeOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *NamedPipeOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *NamedPipeOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NamedPipeOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *NamedPipeOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *NamedPipeOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *NamedPipeOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *NamedPipeOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *NamedPipeOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *NamedPipeOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *NamedPipeOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *NamedPipeOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *NamedPipeOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *NamedPipeOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *NamedPipeOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *NamedPipeOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *NamedPipeOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *NamedPipeOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *NamedPipeOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NamedPipeOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NamedPipeOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *NamedPipeOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *NamedPipeOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *NamedPipeOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *NamedPipeOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *NamedPipeOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *NamedPipeOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewBulkObservableAddRequest.md b/docs/NewBulkObservableAddRequest.md new file mode 100644 index 0000000..691e23e --- /dev/null +++ b/docs/NewBulkObservableAddRequest.md @@ -0,0 +1,51 @@ +# NewBulkObservableAddRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Observables** | [**[]NewObservableRequest**](NewObservableRequest.md) | | + +## Methods + +### NewNewBulkObservableAddRequest + +`func NewNewBulkObservableAddRequest(observables []NewObservableRequest, ) *NewBulkObservableAddRequest` + +NewNewBulkObservableAddRequest instantiates a new NewBulkObservableAddRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewBulkObservableAddRequestWithDefaults + +`func NewNewBulkObservableAddRequestWithDefaults() *NewBulkObservableAddRequest` + +NewNewBulkObservableAddRequestWithDefaults instantiates a new NewBulkObservableAddRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetObservables + +`func (o *NewBulkObservableAddRequest) GetObservables() []NewObservableRequest` + +GetObservables returns the Observables field if non-nil, zero value otherwise. + +### GetObservablesOk + +`func (o *NewBulkObservableAddRequest) GetObservablesOk() (*[]NewObservableRequest, bool)` + +GetObservablesOk returns a tuple with the Observables field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObservables + +`func (o *NewBulkObservableAddRequest) SetObservables(v []NewObservableRequest)` + +SetObservables sets Observables field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewDFIQRequest.md b/docs/NewDFIQRequest.md new file mode 100644 index 0000000..70422ad --- /dev/null +++ b/docs/NewDFIQRequest.md @@ -0,0 +1,98 @@ +# NewDFIQRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DfiqYaml** | **string** | | +**DfiqType** | [**DFIQType**](DFIQType.md) | | +**UpdateIndicators** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewNewDFIQRequest + +`func NewNewDFIQRequest(dfiqYaml string, dfiqType DFIQType, ) *NewDFIQRequest` + +NewNewDFIQRequest instantiates a new NewDFIQRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewDFIQRequestWithDefaults + +`func NewNewDFIQRequestWithDefaults() *NewDFIQRequest` + +NewNewDFIQRequestWithDefaults instantiates a new NewDFIQRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDfiqYaml + +`func (o *NewDFIQRequest) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *NewDFIQRequest) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *NewDFIQRequest) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetDfiqType + +`func (o *NewDFIQRequest) GetDfiqType() DFIQType` + +GetDfiqType returns the DfiqType field if non-nil, zero value otherwise. + +### GetDfiqTypeOk + +`func (o *NewDFIQRequest) GetDfiqTypeOk() (*DFIQType, bool)` + +GetDfiqTypeOk returns a tuple with the DfiqType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqType + +`func (o *NewDFIQRequest) SetDfiqType(v DFIQType)` + +SetDfiqType sets DfiqType field to given value. + + +### GetUpdateIndicators + +`func (o *NewDFIQRequest) GetUpdateIndicators() bool` + +GetUpdateIndicators returns the UpdateIndicators field if non-nil, zero value otherwise. + +### GetUpdateIndicatorsOk + +`func (o *NewDFIQRequest) GetUpdateIndicatorsOk() (*bool, bool)` + +GetUpdateIndicatorsOk returns a tuple with the UpdateIndicators field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdateIndicators + +`func (o *NewDFIQRequest) SetUpdateIndicators(v bool)` + +SetUpdateIndicators sets UpdateIndicators field to given value. + +### HasUpdateIndicators + +`func (o *NewDFIQRequest) HasUpdateIndicators() bool` + +HasUpdateIndicators returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewEntityRequest.md b/docs/NewEntityRequest.md new file mode 100644 index 0000000..2405c42 --- /dev/null +++ b/docs/NewEntityRequest.md @@ -0,0 +1,77 @@ +# NewEntityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entity** | [**Entity1**](Entity1.md) | | +**Tags** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewNewEntityRequest + +`func NewNewEntityRequest(entity Entity1, ) *NewEntityRequest` + +NewNewEntityRequest instantiates a new NewEntityRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewEntityRequestWithDefaults + +`func NewNewEntityRequestWithDefaults() *NewEntityRequest` + +NewNewEntityRequestWithDefaults instantiates a new NewEntityRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEntity + +`func (o *NewEntityRequest) GetEntity() Entity1` + +GetEntity returns the Entity field if non-nil, zero value otherwise. + +### GetEntityOk + +`func (o *NewEntityRequest) GetEntityOk() (*Entity1, bool)` + +GetEntityOk returns a tuple with the Entity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntity + +`func (o *NewEntityRequest) SetEntity(v Entity1)` + +SetEntity sets Entity field to given value. + + +### GetTags + +`func (o *NewEntityRequest) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *NewEntityRequest) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *NewEntityRequest) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *NewEntityRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewExportRequest.md b/docs/NewExportRequest.md new file mode 100644 index 0000000..f0c5186 --- /dev/null +++ b/docs/NewExportRequest.md @@ -0,0 +1,51 @@ +# NewExportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Export** | [**ExportTaskInput**](ExportTaskInput.md) | | + +## Methods + +### NewNewExportRequest + +`func NewNewExportRequest(export ExportTaskInput, ) *NewExportRequest` + +NewNewExportRequest instantiates a new NewExportRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewExportRequestWithDefaults + +`func NewNewExportRequestWithDefaults() *NewExportRequest` + +NewNewExportRequestWithDefaults instantiates a new NewExportRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetExport + +`func (o *NewExportRequest) GetExport() ExportTaskInput` + +GetExport returns the Export field if non-nil, zero value otherwise. + +### GetExportOk + +`func (o *NewExportRequest) GetExportOk() (*ExportTaskInput, bool)` + +GetExportOk returns a tuple with the Export field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExport + +`func (o *NewExportRequest) SetExport(v ExportTaskInput)` + +SetExport sets Export field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewExtendedObservableRequest.md b/docs/NewExtendedObservableRequest.md new file mode 100644 index 0000000..82b1ff5 --- /dev/null +++ b/docs/NewExtendedObservableRequest.md @@ -0,0 +1,77 @@ +# NewExtendedObservableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | Pointer to **[]string** | | [optional] [default to []] +**Observable** | [**Observable1**](Observable1.md) | | + +## Methods + +### NewNewExtendedObservableRequest + +`func NewNewExtendedObservableRequest(observable Observable1, ) *NewExtendedObservableRequest` + +NewNewExtendedObservableRequest instantiates a new NewExtendedObservableRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewExtendedObservableRequestWithDefaults + +`func NewNewExtendedObservableRequestWithDefaults() *NewExtendedObservableRequest` + +NewNewExtendedObservableRequestWithDefaults instantiates a new NewExtendedObservableRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTags + +`func (o *NewExtendedObservableRequest) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *NewExtendedObservableRequest) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *NewExtendedObservableRequest) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *NewExtendedObservableRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetObservable + +`func (o *NewExtendedObservableRequest) GetObservable() Observable1` + +GetObservable returns the Observable field if non-nil, zero value otherwise. + +### GetObservableOk + +`func (o *NewExtendedObservableRequest) GetObservableOk() (*Observable1, bool)` + +GetObservableOk returns a tuple with the Observable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObservable + +`func (o *NewExtendedObservableRequest) SetObservable(v Observable1)` + +SetObservable sets Observable field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewIndicatorRequest.md b/docs/NewIndicatorRequest.md new file mode 100644 index 0000000..d675b84 --- /dev/null +++ b/docs/NewIndicatorRequest.md @@ -0,0 +1,51 @@ +# NewIndicatorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Indicator** | [**Indicator1**](Indicator1.md) | | + +## Methods + +### NewNewIndicatorRequest + +`func NewNewIndicatorRequest(indicator Indicator1, ) *NewIndicatorRequest` + +NewNewIndicatorRequest instantiates a new NewIndicatorRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewIndicatorRequestWithDefaults + +`func NewNewIndicatorRequestWithDefaults() *NewIndicatorRequest` + +NewNewIndicatorRequestWithDefaults instantiates a new NewIndicatorRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIndicator + +`func (o *NewIndicatorRequest) GetIndicator() Indicator1` + +GetIndicator returns the Indicator field if non-nil, zero value otherwise. + +### GetIndicatorOk + +`func (o *NewIndicatorRequest) GetIndicatorOk() (*Indicator1, bool)` + +GetIndicatorOk returns a tuple with the Indicator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndicator + +`func (o *NewIndicatorRequest) SetIndicator(v Indicator1)` + +SetIndicator sets Indicator field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewObservableRequest.md b/docs/NewObservableRequest.md new file mode 100644 index 0000000..7f3e816 --- /dev/null +++ b/docs/NewObservableRequest.md @@ -0,0 +1,98 @@ +# NewObservableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | Pointer to **[]string** | | [optional] [default to []] +**Value** | **string** | | +**Type** | [**ObservableTypeInput**](ObservableTypeInput.md) | | + +## Methods + +### NewNewObservableRequest + +`func NewNewObservableRequest(value string, type_ ObservableTypeInput, ) *NewObservableRequest` + +NewNewObservableRequest instantiates a new NewObservableRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewObservableRequestWithDefaults + +`func NewNewObservableRequestWithDefaults() *NewObservableRequest` + +NewNewObservableRequestWithDefaults instantiates a new NewObservableRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTags + +`func (o *NewObservableRequest) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *NewObservableRequest) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *NewObservableRequest) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *NewObservableRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetValue + +`func (o *NewObservableRequest) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *NewObservableRequest) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *NewObservableRequest) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *NewObservableRequest) GetType() ObservableTypeInput` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NewObservableRequest) GetTypeOk() (*ObservableTypeInput, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *NewObservableRequest) SetType(v ObservableTypeInput)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewRequest.md b/docs/NewRequest.md new file mode 100644 index 0000000..ef62ad1 --- /dev/null +++ b/docs/NewRequest.md @@ -0,0 +1,129 @@ +# NewRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**DefaultExpiration** | Pointer to **string** | | [optional] [default to "P90D"] +**Produces** | Pointer to **[]string** | | [optional] [default to []] +**Replaces** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewNewRequest + +`func NewNewRequest(name string, ) *NewRequest` + +NewNewRequest instantiates a new NewRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewRequestWithDefaults + +`func NewNewRequestWithDefaults() *NewRequest` + +NewNewRequestWithDefaults instantiates a new NewRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *NewRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NewRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NewRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDefaultExpiration + +`func (o *NewRequest) GetDefaultExpiration() string` + +GetDefaultExpiration returns the DefaultExpiration field if non-nil, zero value otherwise. + +### GetDefaultExpirationOk + +`func (o *NewRequest) GetDefaultExpirationOk() (*string, bool)` + +GetDefaultExpirationOk returns a tuple with the DefaultExpiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultExpiration + +`func (o *NewRequest) SetDefaultExpiration(v string)` + +SetDefaultExpiration sets DefaultExpiration field to given value. + +### HasDefaultExpiration + +`func (o *NewRequest) HasDefaultExpiration() bool` + +HasDefaultExpiration returns a boolean if a field has been set. + +### GetProduces + +`func (o *NewRequest) GetProduces() []string` + +GetProduces returns the Produces field if non-nil, zero value otherwise. + +### GetProducesOk + +`func (o *NewRequest) GetProducesOk() (*[]string, bool)` + +GetProducesOk returns a tuple with the Produces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProduces + +`func (o *NewRequest) SetProduces(v []string)` + +SetProduces sets Produces field to given value. + +### HasProduces + +`func (o *NewRequest) HasProduces() bool` + +HasProduces returns a boolean if a field has been set. + +### GetReplaces + +`func (o *NewRequest) GetReplaces() []string` + +GetReplaces returns the Replaces field if non-nil, zero value otherwise. + +### GetReplacesOk + +`func (o *NewRequest) GetReplacesOk() (*[]string, bool)` + +GetReplacesOk returns a tuple with the Replaces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplaces + +`func (o *NewRequest) SetReplaces(v []string)` + +SetReplaces sets Replaces field to given value. + +### HasReplaces + +`func (o *NewRequest) HasReplaces() bool` + +HasReplaces returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewUserRequest.md b/docs/NewUserRequest.md new file mode 100644 index 0000000..d7fd4b1 --- /dev/null +++ b/docs/NewUserRequest.md @@ -0,0 +1,93 @@ +# NewUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | +**Password** | **string** | | +**Admin** | **bool** | | + +## Methods + +### NewNewUserRequest + +`func NewNewUserRequest(username string, password string, admin bool, ) *NewUserRequest` + +NewNewUserRequest instantiates a new NewUserRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewUserRequestWithDefaults + +`func NewNewUserRequestWithDefaults() *NewUserRequest` + +NewNewUserRequestWithDefaults instantiates a new NewUserRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUsername + +`func (o *NewUserRequest) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *NewUserRequest) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *NewUserRequest) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetPassword + +`func (o *NewUserRequest) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *NewUserRequest) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *NewUserRequest) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetAdmin + +`func (o *NewUserRequest) GetAdmin() bool` + +GetAdmin returns the Admin field if non-nil, zero value otherwise. + +### GetAdminOk + +`func (o *NewUserRequest) GetAdminOk() (*bool, bool)` + +GetAdminOk returns a tuple with the Admin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdmin + +`func (o *NewUserRequest) SetAdmin(v bool)` + +SetAdmin sets Admin field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NoteInput.md b/docs/NoteInput.md new file mode 100644 index 0000000..bd57d19 --- /dev/null +++ b/docs/NoteInput.md @@ -0,0 +1,181 @@ +# NoteInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "note"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewNoteInput + +`func NewNoteInput(name string, ) *NoteInput` + +NewNoteInput instantiates a new NoteInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNoteInputWithDefaults + +`func NewNoteInputWithDefaults() *NoteInput` + +NewNoteInputWithDefaults instantiates a new NoteInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *NoteInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NoteInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *NoteInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *NoteInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *NoteInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NoteInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NoteInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *NoteInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *NoteInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *NoteInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *NoteInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *NoteInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *NoteInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *NoteInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *NoteInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *NoteInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *NoteInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *NoteInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *NoteInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *NoteInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *NoteInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *NoteInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *NoteInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NoteOutput.md b/docs/NoteOutput.md new file mode 100644 index 0000000..2e3dd22 --- /dev/null +++ b/docs/NoteOutput.md @@ -0,0 +1,265 @@ +# NoteOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "note"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewNoteOutput + +`func NewNoteOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *NoteOutput` + +NewNoteOutput instantiates a new NoteOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNoteOutputWithDefaults + +`func NewNoteOutputWithDefaults() *NoteOutput` + +NewNoteOutputWithDefaults instantiates a new NoteOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *NoteOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NoteOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *NoteOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *NoteOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *NoteOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NoteOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NoteOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *NoteOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *NoteOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *NoteOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *NoteOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *NoteOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *NoteOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *NoteOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *NoteOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *NoteOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *NoteOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *NoteOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *NoteOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *NoteOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *NoteOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *NoteOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *NoteOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetId + +`func (o *NoteOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NoteOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NoteOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *NoteOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *NoteOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *NoteOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *NoteOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *NoteOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *NoteOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *NoteOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *NoteOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *NoteOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Observable.md b/docs/Observable.md new file mode 100644 index 0000000..f3d2cad --- /dev/null +++ b/docs/Observable.md @@ -0,0 +1,213 @@ +# Observable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewObservable + +`func NewObservable(value string, type_ string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *Observable` + +NewObservable instantiates a new Observable object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObservableWithDefaults + +`func NewObservableWithDefaults() *Observable` + +NewObservableWithDefaults instantiates a new Observable object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *Observable) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *Observable) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *Observable) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *Observable) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Observable) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Observable) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCreated + +`func (o *Observable) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Observable) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Observable) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Observable) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *Observable) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *Observable) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *Observable) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *Observable) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *Observable) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *Observable) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *Observable) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *Observable) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *Observable) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Observable) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Observable) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *Observable) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Observable) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *Observable) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *Observable) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *Observable) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *Observable) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Observable1.md b/docs/Observable1.md new file mode 100644 index 0000000..d367d50 --- /dev/null +++ b/docs/Observable1.md @@ -0,0 +1,1128 @@ +# Observable1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "cidr"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewObservable1 + +`func NewObservable1(value string, key string, data *os.File, hive RegistryHive, ) *Observable1` + +NewObservable1 instantiates a new Observable1 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObservable1WithDefaults + +`func NewObservable1WithDefaults() *Observable1` + +NewObservable1WithDefaults instantiates a new Observable1 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *Observable1) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *Observable1) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *Observable1) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *Observable1) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Observable1) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Observable1) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Observable1) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *Observable1) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Observable1) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Observable1) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Observable1) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *Observable1) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *Observable1) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *Observable1) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *Observable1) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *Observable1) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *Observable1) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *Observable1) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *Observable1) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *Observable1) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *Observable1) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *Observable1) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *Observable1) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *Observable1) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *Observable1) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *Observable1) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *Observable1) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *Observable1) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *Observable1) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *Observable1) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *Observable1) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *Observable1) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *Observable1) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *Observable1) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *Observable1) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *Observable1) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *Observable1) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *Observable1) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *Observable1) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *Observable1) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *Observable1) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *Observable1) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *Observable1) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *Observable1) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *Observable1) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *Observable1) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *Observable1) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *Observable1) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *Observable1) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *Observable1) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *Observable1) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetUserId + +`func (o *Observable1) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *Observable1) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *Observable1) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *Observable1) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *Observable1) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *Observable1) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *Observable1) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *Observable1) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *Observable1) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *Observable1) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *Observable1) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *Observable1) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *Observable1) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *Observable1) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *Observable1) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *Observable1) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *Observable1) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *Observable1) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *Observable1) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *Observable1) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *Observable1) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *Observable1) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *Observable1) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *Observable1) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *Observable1) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *Observable1) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *Observable1) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *Observable1) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *Observable1) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *Observable1) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *Observable1) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *Observable1) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *Observable1) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *Observable1) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *Observable1) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *Observable1) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *Observable1) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *Observable1) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *Observable1) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *Observable1) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *Observable1) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *Observable1) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *Observable1) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *Observable1) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *Observable1) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *Observable1) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *Observable1) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *Observable1) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *Observable1) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *Observable1) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *Observable1) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *Observable1) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *Observable1) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *Observable1) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *Observable1) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *Observable1) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetVersion + +`func (o *Observable1) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *Observable1) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *Observable1) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *Observable1) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *Observable1) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *Observable1) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *Observable1) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *Observable1) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *Observable1) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Observable1) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Observable1) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Observable1) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *Observable1) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *Observable1) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *Observable1) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *Observable1) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *Observable1) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *Observable1) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *Observable1) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *Observable1) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *Observable1) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *Observable1) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *Observable1) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *Observable1) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *Observable1) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *Observable1) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *Observable1) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *Observable1) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *Observable1) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *Observable1) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *Observable1) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *Observable1) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetKey + +`func (o *Observable1) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *Observable1) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *Observable1) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *Observable1) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *Observable1) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *Observable1) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *Observable1) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *Observable1) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *Observable1) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *Observable1) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *Observable1) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *Observable1) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *Observable1) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCoin + +`func (o *Observable1) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *Observable1) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *Observable1) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *Observable1) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *Observable1) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *Observable1) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *Observable1) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *Observable1) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + +### GetCountry + +`func (o *Observable1) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *Observable1) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *Observable1) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *Observable1) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *Observable1) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Observable1) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Observable1) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Observable1) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObservableSearchRequest.md b/docs/ObservableSearchRequest.md new file mode 100644 index 0000000..c035222 --- /dev/null +++ b/docs/ObservableSearchRequest.md @@ -0,0 +1,160 @@ +# ObservableSearchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | Pointer to [**map[string]QueryValue**](QueryValue.md) | | [optional] [default to {}] +**Type** | Pointer to [**ObservableSearchRequestType**](ObservableSearchRequestType.md) | | [optional] +**Sorting** | Pointer to **[][]interface{}** | | [optional] [default to []] +**Count** | Pointer to **int32** | | [optional] [default to 50] +**Page** | Pointer to **int32** | | [optional] [default to 0] + +## Methods + +### NewObservableSearchRequest + +`func NewObservableSearchRequest() *ObservableSearchRequest` + +NewObservableSearchRequest instantiates a new ObservableSearchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObservableSearchRequestWithDefaults + +`func NewObservableSearchRequestWithDefaults() *ObservableSearchRequest` + +NewObservableSearchRequestWithDefaults instantiates a new ObservableSearchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *ObservableSearchRequest) GetQuery() map[string]QueryValue` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *ObservableSearchRequest) GetQueryOk() (*map[string]QueryValue, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *ObservableSearchRequest) SetQuery(v map[string]QueryValue)` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *ObservableSearchRequest) HasQuery() bool` + +HasQuery returns a boolean if a field has been set. + +### GetType + +`func (o *ObservableSearchRequest) GetType() ObservableSearchRequestType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ObservableSearchRequest) GetTypeOk() (*ObservableSearchRequestType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ObservableSearchRequest) SetType(v ObservableSearchRequestType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ObservableSearchRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSorting + +`func (o *ObservableSearchRequest) GetSorting() [][]interface{}` + +GetSorting returns the Sorting field if non-nil, zero value otherwise. + +### GetSortingOk + +`func (o *ObservableSearchRequest) GetSortingOk() (*[][]interface{}, bool)` + +GetSortingOk returns a tuple with the Sorting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSorting + +`func (o *ObservableSearchRequest) SetSorting(v [][]interface{})` + +SetSorting sets Sorting field to given value. + +### HasSorting + +`func (o *ObservableSearchRequest) HasSorting() bool` + +HasSorting returns a boolean if a field has been set. + +### GetCount + +`func (o *ObservableSearchRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *ObservableSearchRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *ObservableSearchRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *ObservableSearchRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetPage + +`func (o *ObservableSearchRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *ObservableSearchRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *ObservableSearchRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *ObservableSearchRequest) HasPage() bool` + +HasPage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObservableSearchRequestType.md b/docs/ObservableSearchRequestType.md new file mode 100644 index 0000000..4ab7791 --- /dev/null +++ b/docs/ObservableSearchRequestType.md @@ -0,0 +1,30 @@ +# ObservableSearchRequestType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewObservableSearchRequestType + +`func NewObservableSearchRequestType() *ObservableSearchRequestType` + +NewObservableSearchRequestType instantiates a new ObservableSearchRequestType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObservableSearchRequestTypeWithDefaults + +`func NewObservableSearchRequestTypeWithDefaults() *ObservableSearchRequestType` + +NewObservableSearchRequestTypeWithDefaults instantiates a new ObservableSearchRequestType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObservableSearchResponse.md b/docs/ObservableSearchResponse.md new file mode 100644 index 0000000..0990dd2 --- /dev/null +++ b/docs/ObservableSearchResponse.md @@ -0,0 +1,72 @@ +# ObservableSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Observables** | [**[]AddedInner**](AddedInner.md) | | +**Total** | **int32** | | + +## Methods + +### NewObservableSearchResponse + +`func NewObservableSearchResponse(observables []AddedInner, total int32, ) *ObservableSearchResponse` + +NewObservableSearchResponse instantiates a new ObservableSearchResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObservableSearchResponseWithDefaults + +`func NewObservableSearchResponseWithDefaults() *ObservableSearchResponse` + +NewObservableSearchResponseWithDefaults instantiates a new ObservableSearchResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetObservables + +`func (o *ObservableSearchResponse) GetObservables() []AddedInner` + +GetObservables returns the Observables field if non-nil, zero value otherwise. + +### GetObservablesOk + +`func (o *ObservableSearchResponse) GetObservablesOk() (*[]AddedInner, bool)` + +GetObservablesOk returns a tuple with the Observables field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObservables + +`func (o *ObservableSearchResponse) SetObservables(v []AddedInner)` + +SetObservables sets Observables field to given value. + + +### GetTotal + +`func (o *ObservableSearchResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *ObservableSearchResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *ObservableSearchResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObservableTagRequest.md b/docs/ObservableTagRequest.md new file mode 100644 index 0000000..d14f537 --- /dev/null +++ b/docs/ObservableTagRequest.md @@ -0,0 +1,103 @@ +# ObservableTagRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | Pointer to **[]string** | | [optional] [default to []] +**Ids** | **[]string** | | +**Strict** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewObservableTagRequest + +`func NewObservableTagRequest(ids []string, ) *ObservableTagRequest` + +NewObservableTagRequest instantiates a new ObservableTagRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObservableTagRequestWithDefaults + +`func NewObservableTagRequestWithDefaults() *ObservableTagRequest` + +NewObservableTagRequestWithDefaults instantiates a new ObservableTagRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTags + +`func (o *ObservableTagRequest) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ObservableTagRequest) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ObservableTagRequest) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ObservableTagRequest) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetIds + +`func (o *ObservableTagRequest) GetIds() []string` + +GetIds returns the Ids field if non-nil, zero value otherwise. + +### GetIdsOk + +`func (o *ObservableTagRequest) GetIdsOk() (*[]string, bool)` + +GetIdsOk returns a tuple with the Ids field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIds + +`func (o *ObservableTagRequest) SetIds(v []string)` + +SetIds sets Ids field to given value. + + +### GetStrict + +`func (o *ObservableTagRequest) GetStrict() bool` + +GetStrict returns the Strict field if non-nil, zero value otherwise. + +### GetStrictOk + +`func (o *ObservableTagRequest) GetStrictOk() (*bool, bool)` + +GetStrictOk returns a tuple with the Strict field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStrict + +`func (o *ObservableTagRequest) SetStrict(v bool)` + +SetStrict sets Strict field to given value. + +### HasStrict + +`func (o *ObservableTagRequest) HasStrict() bool` + +HasStrict returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObservableTagResponse.md b/docs/ObservableTagResponse.md new file mode 100644 index 0000000..69688c4 --- /dev/null +++ b/docs/ObservableTagResponse.md @@ -0,0 +1,72 @@ +# ObservableTagResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tagged** | **int32** | | +**Tags** | [**map[string]map[string]TagRelationshipOutput**](map.md) | | + +## Methods + +### NewObservableTagResponse + +`func NewObservableTagResponse(tagged int32, tags map[string]map[string]TagRelationshipOutput, ) *ObservableTagResponse` + +NewObservableTagResponse instantiates a new ObservableTagResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObservableTagResponseWithDefaults + +`func NewObservableTagResponseWithDefaults() *ObservableTagResponse` + +NewObservableTagResponseWithDefaults instantiates a new ObservableTagResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTagged + +`func (o *ObservableTagResponse) GetTagged() int32` + +GetTagged returns the Tagged field if non-nil, zero value otherwise. + +### GetTaggedOk + +`func (o *ObservableTagResponse) GetTaggedOk() (*int32, bool)` + +GetTaggedOk returns a tuple with the Tagged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTagged + +`func (o *ObservableTagResponse) SetTagged(v int32)` + +SetTagged sets Tagged field to given value. + + +### GetTags + +`func (o *ObservableTagResponse) GetTags() map[string]map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ObservableTagResponse) GetTagsOk() (*map[string]map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ObservableTagResponse) SetTags(v map[string]map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObservableTypeInput.md b/docs/ObservableTypeInput.md new file mode 100644 index 0000000..d84a635 --- /dev/null +++ b/docs/ObservableTypeInput.md @@ -0,0 +1,73 @@ +# ObservableTypeInput + +## Enum + + +* `CIDR` (value: `"cidr"`) + +* `HOSTNAME` (value: `"hostname"`) + +* `MAC_ADDRESS` (value: `"mac_address"`) + +* `CERTIFICATE` (value: `"certificate"`) + +* `IPV6` (value: `"ipv6"`) + +* `USER_ACCOUNT` (value: `"user_account"`) + +* `SSDEEP` (value: `"ssdeep"`) + +* `BIC` (value: `"bic"`) + +* `PACKAGE` (value: `"package"`) + +* `SHA256` (value: `"sha256"`) + +* `DOCKER_IMAGE` (value: `"docker_image"`) + +* `EMAIL` (value: `"email"`) + +* `JARM` (value: `"jarm"`) + +* `FILE` (value: `"file"`) + +* `MUTEX` (value: `"mutex"`) + +* `IBAN` (value: `"iban"`) + +* `COMMAND_LINE` (value: `"command_line"`) + +* `URL` (value: `"url"`) + +* `REGISTRY_KEY` (value: `"registry_key"`) + +* `PATH` (value: `"path"`) + +* `IPV4` (value: `"ipv4"`) + +* `TLSH` (value: `"tlsh"`) + +* `GENERIC` (value: `"generic"`) + +* `SHA1` (value: `"sha1"`) + +* `USER_AGENT` (value: `"user_agent"`) + +* `WALLET` (value: `"wallet"`) + +* `MD5` (value: `"md5"`) + +* `IMPHASH` (value: `"imphash"`) + +* `ASN` (value: `"asn"`) + +* `NAMED_PIPE` (value: `"named_pipe"`) + +* `JA3` (value: `"ja3"`) + +* `GUESS` (value: `"guess"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObservablesAPI.md b/docs/ObservablesAPI.md new file mode 100644 index 0000000..b59a91d --- /dev/null +++ b/docs/ObservablesAPI.md @@ -0,0 +1,831 @@ +# \ObservablesAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddContextApiV2ObservablesObservableIdContextPost**](ObservablesAPI.md#AddContextApiV2ObservablesObservableIdContextPost) | **Post** /api/v2/observables/{observable_id}/context | Add Context +[**AddTextApiV2ObservablesAddTextPost**](ObservablesAPI.md#AddTextApiV2ObservablesAddTextPost) | **Post** /api/v2/observables/add_text | Add Text +[**BulkAddApiV2ObservablesBulkPost**](ObservablesAPI.md#BulkAddApiV2ObservablesBulkPost) | **Post** /api/v2/observables/bulk | Bulk Add +[**DeleteApiV2ObservablesObservableIdDelete**](ObservablesAPI.md#DeleteApiV2ObservablesObservableIdDelete) | **Delete** /api/v2/observables/{observable_id} | Delete +[**DeleteContextApiV2ObservablesObservableIdContextDeletePost**](ObservablesAPI.md#DeleteContextApiV2ObservablesObservableIdContextDeletePost) | **Post** /api/v2/observables/{observable_id}/context/delete | Delete Context +[**DetailsApiV2ObservablesObservableIdGet**](ObservablesAPI.md#DetailsApiV2ObservablesObservableIdGet) | **Get** /api/v2/observables/{observable_id} | Details +[**NewApiV2ObservablesPost**](ObservablesAPI.md#NewApiV2ObservablesPost) | **Post** /api/v2/observables/ | New +[**NewExtendedApiV2ObservablesExtendedPost**](ObservablesAPI.md#NewExtendedApiV2ObservablesExtendedPost) | **Post** /api/v2/observables/extended | New Extended +[**ObservablesRootApiV2ObservablesGet**](ObservablesAPI.md#ObservablesRootApiV2ObservablesGet) | **Get** /api/v2/observables/ | Observables Root +[**PatchApiV2ObservablesObservableIdPatch**](ObservablesAPI.md#PatchApiV2ObservablesObservableIdPatch) | **Patch** /api/v2/observables/{observable_id} | Patch +[**SearchApiV2ObservablesSearchPost**](ObservablesAPI.md#SearchApiV2ObservablesSearchPost) | **Post** /api/v2/observables/search | Search +[**TagObservableApiV2ObservablesTagPost**](ObservablesAPI.md#TagObservableApiV2ObservablesTagPost) | **Post** /api/v2/observables/tag | Tag Observable + + + +## AddContextApiV2ObservablesObservableIdContextPost + +> ResponseAddContextApiV2ObservablesObservableIdContextPost AddContextApiV2ObservablesObservableIdContextPost(ctx, observableId).AddContextRequest(addContextRequest).Execute() + +Add Context + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + observableId := TODO // interface{} | + addContextRequest := *openapiclient.NewAddContextRequest("Source_example", map[string]interface{}(123)) // AddContextRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.AddContextApiV2ObservablesObservableIdContextPost(context.Background(), observableId).AddContextRequest(addContextRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.AddContextApiV2ObservablesObservableIdContextPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddContextApiV2ObservablesObservableIdContextPost`: ResponseAddContextApiV2ObservablesObservableIdContextPost + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.AddContextApiV2ObservablesObservableIdContextPost`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**observableId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddContextApiV2ObservablesObservableIdContextPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **addContextRequest** | [**AddContextRequest**](AddContextRequest.md) | | + +### Return type + +[**ResponseAddContextApiV2ObservablesObservableIdContextPost**](ResponseAddContextApiV2ObservablesObservableIdContextPost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AddTextApiV2ObservablesAddTextPost + +> ResponseAddTextApiV2ObservablesAddTextPost AddTextApiV2ObservablesAddTextPost(ctx).AddTextRequest(addTextRequest).Execute() + +Add Text + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + addTextRequest := *openapiclient.NewAddTextRequest("Text_example") // AddTextRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.AddTextApiV2ObservablesAddTextPost(context.Background()).AddTextRequest(addTextRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.AddTextApiV2ObservablesAddTextPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddTextApiV2ObservablesAddTextPost`: ResponseAddTextApiV2ObservablesAddTextPost + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.AddTextApiV2ObservablesAddTextPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddTextApiV2ObservablesAddTextPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **addTextRequest** | [**AddTextRequest**](AddTextRequest.md) | | + +### Return type + +[**ResponseAddTextApiV2ObservablesAddTextPost**](ResponseAddTextApiV2ObservablesAddTextPost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## BulkAddApiV2ObservablesBulkPost + +> BulkObservableAddResponse BulkAddApiV2ObservablesBulkPost(ctx).NewBulkObservableAddRequest(newBulkObservableAddRequest).Execute() + +Bulk Add + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newBulkObservableAddRequest := *openapiclient.NewNewBulkObservableAddRequest([]openapiclient.NewObservableRequest{*openapiclient.NewNewObservableRequest("Value_example", openapiclient.ObservableType-Input("cidr"))}) // NewBulkObservableAddRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.BulkAddApiV2ObservablesBulkPost(context.Background()).NewBulkObservableAddRequest(newBulkObservableAddRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.BulkAddApiV2ObservablesBulkPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BulkAddApiV2ObservablesBulkPost`: BulkObservableAddResponse + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.BulkAddApiV2ObservablesBulkPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkAddApiV2ObservablesBulkPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newBulkObservableAddRequest** | [**NewBulkObservableAddRequest**](NewBulkObservableAddRequest.md) | | + +### Return type + +[**BulkObservableAddResponse**](BulkObservableAddResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApiV2ObservablesObservableIdDelete + +> interface{} DeleteApiV2ObservablesObservableIdDelete(ctx, observableId).Execute() + +Delete + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + observableId := "observableId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.DeleteApiV2ObservablesObservableIdDelete(context.Background(), observableId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.DeleteApiV2ObservablesObservableIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApiV2ObservablesObservableIdDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.DeleteApiV2ObservablesObservableIdDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**observableId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApiV2ObservablesObservableIdDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteContextApiV2ObservablesObservableIdContextDeletePost + +> ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost DeleteContextApiV2ObservablesObservableIdContextDeletePost(ctx, observableId).DeleteContextRequest(deleteContextRequest).Execute() + +Delete Context + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + observableId := TODO // interface{} | + deleteContextRequest := *openapiclient.NewDeleteContextRequest("Source_example", map[string]interface{}(123)) // DeleteContextRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.DeleteContextApiV2ObservablesObservableIdContextDeletePost(context.Background(), observableId).DeleteContextRequest(deleteContextRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.DeleteContextApiV2ObservablesObservableIdContextDeletePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteContextApiV2ObservablesObservableIdContextDeletePost`: ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.DeleteContextApiV2ObservablesObservableIdContextDeletePost`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**observableId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteContextApiV2ObservablesObservableIdContextDeletePostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **deleteContextRequest** | [**DeleteContextRequest**](DeleteContextRequest.md) | | + +### Return type + +[**ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost**](ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DetailsApiV2ObservablesObservableIdGet + +> ResponseDetailsApiV2ObservablesObservableIdGet DetailsApiV2ObservablesObservableIdGet(ctx, observableId).Execute() + +Details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + observableId := TODO // interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.DetailsApiV2ObservablesObservableIdGet(context.Background(), observableId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.DetailsApiV2ObservablesObservableIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailsApiV2ObservablesObservableIdGet`: ResponseDetailsApiV2ObservablesObservableIdGet + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.DetailsApiV2ObservablesObservableIdGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**observableId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDetailsApiV2ObservablesObservableIdGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDetailsApiV2ObservablesObservableIdGet**](ResponseDetailsApiV2ObservablesObservableIdGet.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## NewApiV2ObservablesPost + +> ResponseNewApiV2ObservablesPost NewApiV2ObservablesPost(ctx).NewObservableRequest(newObservableRequest).Execute() + +New + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newObservableRequest := *openapiclient.NewNewObservableRequest("Value_example", openapiclient.ObservableType-Input("cidr")) // NewObservableRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.NewApiV2ObservablesPost(context.Background()).NewObservableRequest(newObservableRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.NewApiV2ObservablesPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `NewApiV2ObservablesPost`: ResponseNewApiV2ObservablesPost + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.NewApiV2ObservablesPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiNewApiV2ObservablesPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newObservableRequest** | [**NewObservableRequest**](NewObservableRequest.md) | | + +### Return type + +[**ResponseNewApiV2ObservablesPost**](ResponseNewApiV2ObservablesPost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## NewExtendedApiV2ObservablesExtendedPost + +> ResponseNewExtendedApiV2ObservablesExtendedPost NewExtendedApiV2ObservablesExtendedPost(ctx).NewExtendedObservableRequest(newExtendedObservableRequest).Execute() + +New Extended + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newExtendedObservableRequest := *openapiclient.NewNewExtendedObservableRequest(*openapiclient.NewObservable1("Value_example", "Key_example", "TODO", openapiclient.RegistryHive("HKEY_CURRENT_CONFIG"))) // NewExtendedObservableRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.NewExtendedApiV2ObservablesExtendedPost(context.Background()).NewExtendedObservableRequest(newExtendedObservableRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.NewExtendedApiV2ObservablesExtendedPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `NewExtendedApiV2ObservablesExtendedPost`: ResponseNewExtendedApiV2ObservablesExtendedPost + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.NewExtendedApiV2ObservablesExtendedPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiNewExtendedApiV2ObservablesExtendedPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newExtendedObservableRequest** | [**NewExtendedObservableRequest**](NewExtendedObservableRequest.md) | | + +### Return type + +[**ResponseNewExtendedApiV2ObservablesExtendedPost**](ResponseNewExtendedApiV2ObservablesExtendedPost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ObservablesRootApiV2ObservablesGet + +> []Observable ObservablesRootApiV2ObservablesGet(ctx).Execute() + +Observables Root + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.ObservablesRootApiV2ObservablesGet(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.ObservablesRootApiV2ObservablesGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ObservablesRootApiV2ObservablesGet`: []Observable + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.ObservablesRootApiV2ObservablesGet`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiObservablesRootApiV2ObservablesGetRequest struct via the builder pattern + + +### Return type + +[**[]Observable**](Observable.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchApiV2ObservablesObservableIdPatch + +> ResponsePatchApiV2ObservablesObservableIdPatch PatchApiV2ObservablesObservableIdPatch(ctx, observableId).PatchObservableRequest(patchObservableRequest).Execute() + +Patch + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + observableId := TODO // interface{} | + patchObservableRequest := *openapiclient.NewPatchObservableRequest(*openapiclient.NewObservable1("Value_example", "Key_example", "TODO", openapiclient.RegistryHive("HKEY_CURRENT_CONFIG"))) // PatchObservableRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.PatchApiV2ObservablesObservableIdPatch(context.Background(), observableId).PatchObservableRequest(patchObservableRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.PatchApiV2ObservablesObservableIdPatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchApiV2ObservablesObservableIdPatch`: ResponsePatchApiV2ObservablesObservableIdPatch + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.PatchApiV2ObservablesObservableIdPatch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**observableId** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchApiV2ObservablesObservableIdPatchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchObservableRequest** | [**PatchObservableRequest**](PatchObservableRequest.md) | | + +### Return type + +[**ResponsePatchApiV2ObservablesObservableIdPatch**](ResponsePatchApiV2ObservablesObservableIdPatch.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2ObservablesSearchPost + +> ObservableSearchResponse SearchApiV2ObservablesSearchPost(ctx).ObservableSearchRequest(observableSearchRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + observableSearchRequest := *openapiclient.NewObservableSearchRequest() // ObservableSearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.SearchApiV2ObservablesSearchPost(context.Background()).ObservableSearchRequest(observableSearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.SearchApiV2ObservablesSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2ObservablesSearchPost`: ObservableSearchResponse + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.SearchApiV2ObservablesSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2ObservablesSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **observableSearchRequest** | [**ObservableSearchRequest**](ObservableSearchRequest.md) | | + +### Return type + +[**ObservableSearchResponse**](ObservableSearchResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TagObservableApiV2ObservablesTagPost + +> ObservableTagResponse TagObservableApiV2ObservablesTagPost(ctx).ObservableTagRequest(observableTagRequest).Execute() + +Tag Observable + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + observableTagRequest := *openapiclient.NewObservableTagRequest([]string{"Ids_example"}) // ObservableTagRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ObservablesAPI.TagObservableApiV2ObservablesTagPost(context.Background()).ObservableTagRequest(observableTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.TagObservableApiV2ObservablesTagPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TagObservableApiV2ObservablesTagPost`: ObservableTagResponse + fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.TagObservableApiV2ObservablesTagPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTagObservableApiV2ObservablesTagPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **observableTagRequest** | [**ObservableTagRequest**](ObservableTagRequest.md) | | + +### Return type + +[**ObservableTagResponse**](ObservableTagResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/OneShotTask.md b/docs/OneShotTask.md new file mode 100644 index 0000000..d9bd4bd --- /dev/null +++ b/docs/OneShotTask.md @@ -0,0 +1,300 @@ +# OneShotTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Enabled** | Pointer to **bool** | | [optional] [default to false] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Status** | Pointer to [**TaskStatus**](TaskStatus.md) | | [optional] +**StatusMessage** | Pointer to **string** | | [optional] [default to ""] +**LastRun** | Pointer to **NullableTime** | | [optional] +**Frequency** | Pointer to **NullableString** | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "oneshot"] +**ActsOn** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] + +## Methods + +### NewOneShotTask + +`func NewOneShotTask(name string, id string, ) *OneShotTask` + +NewOneShotTask instantiates a new OneShotTask object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOneShotTaskWithDefaults + +`func NewOneShotTaskWithDefaults() *OneShotTask` + +NewOneShotTaskWithDefaults instantiates a new OneShotTask object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *OneShotTask) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OneShotTask) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *OneShotTask) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEnabled + +`func (o *OneShotTask) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *OneShotTask) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *OneShotTask) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *OneShotTask) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetDescription + +`func (o *OneShotTask) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *OneShotTask) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *OneShotTask) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *OneShotTask) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *OneShotTask) GetStatus() TaskStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *OneShotTask) GetStatusOk() (*TaskStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *OneShotTask) SetStatus(v TaskStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *OneShotTask) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStatusMessage + +`func (o *OneShotTask) GetStatusMessage() string` + +GetStatusMessage returns the StatusMessage field if non-nil, zero value otherwise. + +### GetStatusMessageOk + +`func (o *OneShotTask) GetStatusMessageOk() (*string, bool)` + +GetStatusMessageOk returns a tuple with the StatusMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusMessage + +`func (o *OneShotTask) SetStatusMessage(v string)` + +SetStatusMessage sets StatusMessage field to given value. + +### HasStatusMessage + +`func (o *OneShotTask) HasStatusMessage() bool` + +HasStatusMessage returns a boolean if a field has been set. + +### GetLastRun + +`func (o *OneShotTask) GetLastRun() time.Time` + +GetLastRun returns the LastRun field if non-nil, zero value otherwise. + +### GetLastRunOk + +`func (o *OneShotTask) GetLastRunOk() (*time.Time, bool)` + +GetLastRunOk returns a tuple with the LastRun field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastRun + +`func (o *OneShotTask) SetLastRun(v time.Time)` + +SetLastRun sets LastRun field to given value. + +### HasLastRun + +`func (o *OneShotTask) HasLastRun() bool` + +HasLastRun returns a boolean if a field has been set. + +### SetLastRunNil + +`func (o *OneShotTask) SetLastRunNil(b bool)` + + SetLastRunNil sets the value for LastRun to be an explicit nil + +### UnsetLastRun +`func (o *OneShotTask) UnsetLastRun()` + +UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +### GetFrequency + +`func (o *OneShotTask) GetFrequency() string` + +GetFrequency returns the Frequency field if non-nil, zero value otherwise. + +### GetFrequencyOk + +`func (o *OneShotTask) GetFrequencyOk() (*string, bool)` + +GetFrequencyOk returns a tuple with the Frequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrequency + +`func (o *OneShotTask) SetFrequency(v string)` + +SetFrequency sets Frequency field to given value. + +### HasFrequency + +`func (o *OneShotTask) HasFrequency() bool` + +HasFrequency returns a boolean if a field has been set. + +### SetFrequencyNil + +`func (o *OneShotTask) SetFrequencyNil(b bool)` + + SetFrequencyNil sets the value for Frequency to be an explicit nil + +### UnsetFrequency +`func (o *OneShotTask) UnsetFrequency()` + +UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +### GetType + +`func (o *OneShotTask) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OneShotTask) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OneShotTask) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *OneShotTask) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetActsOn + +`func (o *OneShotTask) GetActsOn() []string` + +GetActsOn returns the ActsOn field if non-nil, zero value otherwise. + +### GetActsOnOk + +`func (o *OneShotTask) GetActsOnOk() (*[]string, bool)` + +GetActsOnOk returns a tuple with the ActsOn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActsOn + +`func (o *OneShotTask) SetActsOn(v []string)` + +SetActsOn sets ActsOn field to given value. + +### HasActsOn + +`func (o *OneShotTask) HasActsOn() bool` + +HasActsOn returns a boolean if a field has been set. + +### GetId + +`func (o *OneShotTask) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *OneShotTask) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *OneShotTask) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PackageInput.md b/docs/PackageInput.md new file mode 100644 index 0000000..40481ab --- /dev/null +++ b/docs/PackageInput.md @@ -0,0 +1,207 @@ +# PackageInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "package"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] + +## Methods + +### NewPackageInput + +`func NewPackageInput(value string, ) *PackageInput` + +NewPackageInput instantiates a new PackageInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPackageInputWithDefaults + +`func NewPackageInputWithDefaults() *PackageInput` + +NewPackageInputWithDefaults instantiates a new PackageInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *PackageInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *PackageInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *PackageInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *PackageInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PackageInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PackageInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PackageInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *PackageInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *PackageInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *PackageInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *PackageInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *PackageInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *PackageInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *PackageInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *PackageInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *PackageInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *PackageInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *PackageInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *PackageInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetVersion + +`func (o *PackageInput) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *PackageInput) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *PackageInput) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *PackageInput) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *PackageInput) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *PackageInput) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *PackageInput) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *PackageInput) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PackageOutput.md b/docs/PackageOutput.md new file mode 100644 index 0000000..02a843d --- /dev/null +++ b/docs/PackageOutput.md @@ -0,0 +1,270 @@ +# PackageOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "package"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewPackageOutput + +`func NewPackageOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *PackageOutput` + +NewPackageOutput instantiates a new PackageOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPackageOutputWithDefaults + +`func NewPackageOutputWithDefaults() *PackageOutput` + +NewPackageOutputWithDefaults instantiates a new PackageOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *PackageOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *PackageOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *PackageOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *PackageOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PackageOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PackageOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PackageOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *PackageOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *PackageOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *PackageOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *PackageOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *PackageOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *PackageOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *PackageOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *PackageOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *PackageOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *PackageOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *PackageOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *PackageOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetVersion + +`func (o *PackageOutput) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *PackageOutput) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *PackageOutput) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *PackageOutput) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *PackageOutput) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *PackageOutput) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *PackageOutput) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *PackageOutput) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetId + +`func (o *PackageOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PackageOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *PackageOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *PackageOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *PackageOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *PackageOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *PackageOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *PackageOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *PackageOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchDFIQRequest.md b/docs/PatchDFIQRequest.md new file mode 100644 index 0000000..a05f1b8 --- /dev/null +++ b/docs/PatchDFIQRequest.md @@ -0,0 +1,98 @@ +# PatchDFIQRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DfiqYaml** | **string** | | +**DfiqType** | [**DFIQType**](DFIQType.md) | | +**UpdateIndicators** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewPatchDFIQRequest + +`func NewPatchDFIQRequest(dfiqYaml string, dfiqType DFIQType, ) *PatchDFIQRequest` + +NewPatchDFIQRequest instantiates a new PatchDFIQRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchDFIQRequestWithDefaults + +`func NewPatchDFIQRequestWithDefaults() *PatchDFIQRequest` + +NewPatchDFIQRequestWithDefaults instantiates a new PatchDFIQRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDfiqYaml + +`func (o *PatchDFIQRequest) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *PatchDFIQRequest) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *PatchDFIQRequest) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetDfiqType + +`func (o *PatchDFIQRequest) GetDfiqType() DFIQType` + +GetDfiqType returns the DfiqType field if non-nil, zero value otherwise. + +### GetDfiqTypeOk + +`func (o *PatchDFIQRequest) GetDfiqTypeOk() (*DFIQType, bool)` + +GetDfiqTypeOk returns a tuple with the DfiqType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqType + +`func (o *PatchDFIQRequest) SetDfiqType(v DFIQType)` + +SetDfiqType sets DfiqType field to given value. + + +### GetUpdateIndicators + +`func (o *PatchDFIQRequest) GetUpdateIndicators() bool` + +GetUpdateIndicators returns the UpdateIndicators field if non-nil, zero value otherwise. + +### GetUpdateIndicatorsOk + +`func (o *PatchDFIQRequest) GetUpdateIndicatorsOk() (*bool, bool)` + +GetUpdateIndicatorsOk returns a tuple with the UpdateIndicators field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdateIndicators + +`func (o *PatchDFIQRequest) SetUpdateIndicators(v bool)` + +SetUpdateIndicators sets UpdateIndicators field to given value. + +### HasUpdateIndicators + +`func (o *PatchDFIQRequest) HasUpdateIndicators() bool` + +HasUpdateIndicators returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchEntityRequest.md b/docs/PatchEntityRequest.md new file mode 100644 index 0000000..f76bcd6 --- /dev/null +++ b/docs/PatchEntityRequest.md @@ -0,0 +1,51 @@ +# PatchEntityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entity** | [**Entity1**](Entity1.md) | | + +## Methods + +### NewPatchEntityRequest + +`func NewPatchEntityRequest(entity Entity1, ) *PatchEntityRequest` + +NewPatchEntityRequest instantiates a new PatchEntityRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchEntityRequestWithDefaults + +`func NewPatchEntityRequestWithDefaults() *PatchEntityRequest` + +NewPatchEntityRequestWithDefaults instantiates a new PatchEntityRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEntity + +`func (o *PatchEntityRequest) GetEntity() Entity1` + +GetEntity returns the Entity field if non-nil, zero value otherwise. + +### GetEntityOk + +`func (o *PatchEntityRequest) GetEntityOk() (*Entity1, bool)` + +GetEntityOk returns a tuple with the Entity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntity + +`func (o *PatchEntityRequest) SetEntity(v Entity1)` + +SetEntity sets Entity field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchExportRequest.md b/docs/PatchExportRequest.md new file mode 100644 index 0000000..39427ff --- /dev/null +++ b/docs/PatchExportRequest.md @@ -0,0 +1,51 @@ +# PatchExportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Export** | [**ExportTaskInput**](ExportTaskInput.md) | | + +## Methods + +### NewPatchExportRequest + +`func NewPatchExportRequest(export ExportTaskInput, ) *PatchExportRequest` + +NewPatchExportRequest instantiates a new PatchExportRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchExportRequestWithDefaults + +`func NewPatchExportRequestWithDefaults() *PatchExportRequest` + +NewPatchExportRequestWithDefaults instantiates a new PatchExportRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetExport + +`func (o *PatchExportRequest) GetExport() ExportTaskInput` + +GetExport returns the Export field if non-nil, zero value otherwise. + +### GetExportOk + +`func (o *PatchExportRequest) GetExportOk() (*ExportTaskInput, bool)` + +GetExportOk returns a tuple with the Export field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExport + +`func (o *PatchExportRequest) SetExport(v ExportTaskInput)` + +SetExport sets Export field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchIndicatorRequest.md b/docs/PatchIndicatorRequest.md new file mode 100644 index 0000000..ff2a7b2 --- /dev/null +++ b/docs/PatchIndicatorRequest.md @@ -0,0 +1,51 @@ +# PatchIndicatorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Indicator** | [**Indicator1**](Indicator1.md) | | + +## Methods + +### NewPatchIndicatorRequest + +`func NewPatchIndicatorRequest(indicator Indicator1, ) *PatchIndicatorRequest` + +NewPatchIndicatorRequest instantiates a new PatchIndicatorRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchIndicatorRequestWithDefaults + +`func NewPatchIndicatorRequestWithDefaults() *PatchIndicatorRequest` + +NewPatchIndicatorRequestWithDefaults instantiates a new PatchIndicatorRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIndicator + +`func (o *PatchIndicatorRequest) GetIndicator() Indicator1` + +GetIndicator returns the Indicator field if non-nil, zero value otherwise. + +### GetIndicatorOk + +`func (o *PatchIndicatorRequest) GetIndicatorOk() (*Indicator1, bool)` + +GetIndicatorOk returns a tuple with the Indicator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndicator + +`func (o *PatchIndicatorRequest) SetIndicator(v Indicator1)` + +SetIndicator sets Indicator field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchObservableRequest.md b/docs/PatchObservableRequest.md new file mode 100644 index 0000000..6915419 --- /dev/null +++ b/docs/PatchObservableRequest.md @@ -0,0 +1,51 @@ +# PatchObservableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Observable** | [**Observable1**](Observable1.md) | | + +## Methods + +### NewPatchObservableRequest + +`func NewPatchObservableRequest(observable Observable1, ) *PatchObservableRequest` + +NewPatchObservableRequest instantiates a new PatchObservableRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchObservableRequestWithDefaults + +`func NewPatchObservableRequestWithDefaults() *PatchObservableRequest` + +NewPatchObservableRequestWithDefaults instantiates a new PatchObservableRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetObservable + +`func (o *PatchObservableRequest) GetObservable() Observable1` + +GetObservable returns the Observable field if non-nil, zero value otherwise. + +### GetObservableOk + +`func (o *PatchObservableRequest) GetObservableOk() (*Observable1, bool)` + +GetObservableOk returns a tuple with the Observable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObservable + +`func (o *PatchObservableRequest) SetObservable(v Observable1)` + +SetObservable sets Observable field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PathInput.md b/docs/PathInput.md new file mode 100644 index 0000000..21c96f4 --- /dev/null +++ b/docs/PathInput.md @@ -0,0 +1,155 @@ +# PathInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "path"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewPathInput + +`func NewPathInput(value string, ) *PathInput` + +NewPathInput instantiates a new PathInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPathInputWithDefaults + +`func NewPathInputWithDefaults() *PathInput` + +NewPathInputWithDefaults instantiates a new PathInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *PathInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *PathInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *PathInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *PathInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PathInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PathInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PathInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *PathInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *PathInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *PathInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *PathInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *PathInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *PathInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *PathInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *PathInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *PathInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *PathInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *PathInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *PathInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PathOutput.md b/docs/PathOutput.md new file mode 100644 index 0000000..840f00c --- /dev/null +++ b/docs/PathOutput.md @@ -0,0 +1,218 @@ +# PathOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "path"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewPathOutput + +`func NewPathOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *PathOutput` + +NewPathOutput instantiates a new PathOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPathOutputWithDefaults + +`func NewPathOutputWithDefaults() *PathOutput` + +NewPathOutputWithDefaults instantiates a new PathOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *PathOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *PathOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *PathOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *PathOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PathOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PathOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PathOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *PathOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *PathOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *PathOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *PathOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *PathOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *PathOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *PathOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *PathOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *PathOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *PathOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *PathOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *PathOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *PathOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PathOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *PathOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *PathOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *PathOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *PathOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *PathOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *PathOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *PathOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PathsInnerInner.md b/docs/PathsInnerInner.md new file mode 100644 index 0000000..b38e918 --- /dev/null +++ b/docs/PathsInnerInner.md @@ -0,0 +1,271 @@ +# PathsInnerInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | +**Target** | **string** | | +**Type** | **string** | | +**Count** | Pointer to **int32** | | [optional] [default to 1] +**Description** | **string** | | +**Created** | **time.Time** | | +**Modified** | **time.Time** | | +**Id** | **string** | | [readonly] +**LastSeen** | **time.Time** | | +**Expires** | Pointer to **time.Time** | | [optional] +**Fresh** | **bool** | | + +## Methods + +### NewPathsInnerInner + +`func NewPathsInnerInner(source string, target string, type_ string, description string, created time.Time, modified time.Time, id string, lastSeen time.Time, fresh bool, ) *PathsInnerInner` + +NewPathsInnerInner instantiates a new PathsInnerInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPathsInnerInnerWithDefaults + +`func NewPathsInnerInnerWithDefaults() *PathsInnerInner` + +NewPathsInnerInnerWithDefaults instantiates a new PathsInnerInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSource + +`func (o *PathsInnerInner) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *PathsInnerInner) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *PathsInnerInner) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetTarget + +`func (o *PathsInnerInner) GetTarget() string` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *PathsInnerInner) GetTargetOk() (*string, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTarget + +`func (o *PathsInnerInner) SetTarget(v string)` + +SetTarget sets Target field to given value. + + +### GetType + +`func (o *PathsInnerInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PathsInnerInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PathsInnerInner) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCount + +`func (o *PathsInnerInner) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PathsInnerInner) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PathsInnerInner) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PathsInnerInner) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetDescription + +`func (o *PathsInnerInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PathsInnerInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PathsInnerInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetCreated + +`func (o *PathsInnerInner) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *PathsInnerInner) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *PathsInnerInner) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetModified + +`func (o *PathsInnerInner) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *PathsInnerInner) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *PathsInnerInner) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + + +### GetId + +`func (o *PathsInnerInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PathsInnerInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *PathsInnerInner) SetId(v string)` + +SetId sets Id field to given value. + + +### GetLastSeen + +`func (o *PathsInnerInner) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *PathsInnerInner) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *PathsInnerInner) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + + +### GetExpires + +`func (o *PathsInnerInner) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *PathsInnerInner) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *PathsInnerInner) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + +### HasExpires + +`func (o *PathsInnerInner) HasExpires() bool` + +HasExpires returns a boolean if a field has been set. + +### GetFresh + +`func (o *PathsInnerInner) GetFresh() bool` + +GetFresh returns the Fresh field if non-nil, zero value otherwise. + +### GetFreshOk + +`func (o *PathsInnerInner) GetFreshOk() (*bool, bool)` + +GetFreshOk returns a tuple with the Fresh field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFresh + +`func (o *PathsInnerInner) SetFresh(v bool)` + +SetFresh sets Fresh field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PhoneInput.md b/docs/PhoneInput.md new file mode 100644 index 0000000..84c1f84 --- /dev/null +++ b/docs/PhoneInput.md @@ -0,0 +1,181 @@ +# PhoneInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "phone"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewPhoneInput + +`func NewPhoneInput(name string, ) *PhoneInput` + +NewPhoneInput instantiates a new PhoneInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPhoneInputWithDefaults + +`func NewPhoneInputWithDefaults() *PhoneInput` + +NewPhoneInputWithDefaults instantiates a new PhoneInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *PhoneInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PhoneInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PhoneInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PhoneInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *PhoneInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PhoneInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PhoneInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *PhoneInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PhoneInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PhoneInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PhoneInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *PhoneInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *PhoneInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *PhoneInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *PhoneInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *PhoneInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *PhoneInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *PhoneInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *PhoneInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *PhoneInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *PhoneInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *PhoneInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *PhoneInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PhoneOutput.md b/docs/PhoneOutput.md new file mode 100644 index 0000000..22a53e4 --- /dev/null +++ b/docs/PhoneOutput.md @@ -0,0 +1,265 @@ +# PhoneOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "phone"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewPhoneOutput + +`func NewPhoneOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *PhoneOutput` + +NewPhoneOutput instantiates a new PhoneOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPhoneOutputWithDefaults + +`func NewPhoneOutputWithDefaults() *PhoneOutput` + +NewPhoneOutputWithDefaults instantiates a new PhoneOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *PhoneOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PhoneOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PhoneOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PhoneOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *PhoneOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PhoneOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PhoneOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *PhoneOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PhoneOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PhoneOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PhoneOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *PhoneOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *PhoneOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *PhoneOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *PhoneOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *PhoneOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *PhoneOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *PhoneOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *PhoneOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *PhoneOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *PhoneOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *PhoneOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *PhoneOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetId + +`func (o *PhoneOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PhoneOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *PhoneOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *PhoneOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *PhoneOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *PhoneOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *PhoneOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *PhoneOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *PhoneOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *PhoneOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *PhoneOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *PhoneOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QueryInput.md b/docs/QueryInput.md new file mode 100644 index 0000000..6ec1c9d --- /dev/null +++ b/docs/QueryInput.md @@ -0,0 +1,374 @@ +# QueryInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "query"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**QueryType** | **string** | | +**TargetSystems** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewQueryInput + +`func NewQueryInput(name string, pattern string, diamond DiamondModel, queryType string, ) *QueryInput` + +NewQueryInput instantiates a new QueryInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewQueryInputWithDefaults + +`func NewQueryInputWithDefaults() *QueryInput` + +NewQueryInputWithDefaults instantiates a new QueryInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *QueryInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *QueryInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *QueryInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *QueryInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *QueryInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *QueryInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *QueryInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *QueryInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *QueryInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *QueryInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *QueryInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *QueryInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *QueryInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *QueryInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *QueryInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *QueryInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *QueryInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *QueryInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *QueryInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *QueryInput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *QueryInput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *QueryInput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *QueryInput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *QueryInput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *QueryInput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *QueryInput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *QueryInput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *QueryInput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *QueryInput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *QueryInput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *QueryInput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *QueryInput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *QueryInput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *QueryInput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *QueryInput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *QueryInput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *QueryInput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *QueryInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *QueryInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *QueryInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *QueryInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *QueryInput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *QueryInput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *QueryInput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *QueryInput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetQueryType + +`func (o *QueryInput) GetQueryType() string` + +GetQueryType returns the QueryType field if non-nil, zero value otherwise. + +### GetQueryTypeOk + +`func (o *QueryInput) GetQueryTypeOk() (*string, bool)` + +GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryType + +`func (o *QueryInput) SetQueryType(v string)` + +SetQueryType sets QueryType field to given value. + + +### GetTargetSystems + +`func (o *QueryInput) GetTargetSystems() []string` + +GetTargetSystems returns the TargetSystems field if non-nil, zero value otherwise. + +### GetTargetSystemsOk + +`func (o *QueryInput) GetTargetSystemsOk() (*[]string, bool)` + +GetTargetSystemsOk returns a tuple with the TargetSystems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetSystems + +`func (o *QueryInput) SetTargetSystems(v []string)` + +SetTargetSystems sets TargetSystems field to given value. + +### HasTargetSystems + +`func (o *QueryInput) HasTargetSystems() bool` + +HasTargetSystems returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QueryOutput.md b/docs/QueryOutput.md new file mode 100644 index 0000000..0d4bd17 --- /dev/null +++ b/docs/QueryOutput.md @@ -0,0 +1,437 @@ +# QueryOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "query"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**QueryType** | **string** | | +**TargetSystems** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewQueryOutput + +`func NewQueryOutput(name string, pattern string, diamond DiamondModel, queryType string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *QueryOutput` + +NewQueryOutput instantiates a new QueryOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewQueryOutputWithDefaults + +`func NewQueryOutputWithDefaults() *QueryOutput` + +NewQueryOutputWithDefaults instantiates a new QueryOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *QueryOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *QueryOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *QueryOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *QueryOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *QueryOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *QueryOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *QueryOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *QueryOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *QueryOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *QueryOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *QueryOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *QueryOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *QueryOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *QueryOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *QueryOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *QueryOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *QueryOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *QueryOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *QueryOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *QueryOutput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *QueryOutput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *QueryOutput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *QueryOutput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *QueryOutput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *QueryOutput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *QueryOutput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *QueryOutput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *QueryOutput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *QueryOutput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *QueryOutput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *QueryOutput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *QueryOutput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *QueryOutput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *QueryOutput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *QueryOutput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *QueryOutput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *QueryOutput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *QueryOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *QueryOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *QueryOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *QueryOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *QueryOutput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *QueryOutput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *QueryOutput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *QueryOutput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetQueryType + +`func (o *QueryOutput) GetQueryType() string` + +GetQueryType returns the QueryType field if non-nil, zero value otherwise. + +### GetQueryTypeOk + +`func (o *QueryOutput) GetQueryTypeOk() (*string, bool)` + +GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryType + +`func (o *QueryOutput) SetQueryType(v string)` + +SetQueryType sets QueryType field to given value. + + +### GetTargetSystems + +`func (o *QueryOutput) GetTargetSystems() []string` + +GetTargetSystems returns the TargetSystems field if non-nil, zero value otherwise. + +### GetTargetSystemsOk + +`func (o *QueryOutput) GetTargetSystemsOk() (*[]string, bool)` + +GetTargetSystemsOk returns a tuple with the TargetSystems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetSystems + +`func (o *QueryOutput) SetTargetSystems(v []string)` + +SetTargetSystems sets TargetSystems field to given value. + +### HasTargetSystems + +`func (o *QueryOutput) HasTargetSystems() bool` + +HasTargetSystems returns a boolean if a field has been set. + +### GetId + +`func (o *QueryOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *QueryOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *QueryOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *QueryOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *QueryOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *QueryOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *QueryOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *QueryOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *QueryOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QueryValue.md b/docs/QueryValue.md new file mode 100644 index 0000000..e4e5e43 --- /dev/null +++ b/docs/QueryValue.md @@ -0,0 +1,30 @@ +# QueryValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewQueryValue + +`func NewQueryValue() *QueryValue` + +NewQueryValue instantiates a new QueryValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewQueryValueWithDefaults + +`func NewQueryValueWithDefaults() *QueryValue` + +NewQueryValueWithDefaults instantiates a new QueryValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RegexInput.md b/docs/RegexInput.md new file mode 100644 index 0000000..dccb3cc --- /dev/null +++ b/docs/RegexInput.md @@ -0,0 +1,327 @@ +# RegexInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "regex"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewRegexInput + +`func NewRegexInput(name string, pattern string, diamond DiamondModel, ) *RegexInput` + +NewRegexInput instantiates a new RegexInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRegexInputWithDefaults + +`func NewRegexInputWithDefaults() *RegexInput` + +NewRegexInputWithDefaults instantiates a new RegexInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *RegexInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RegexInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RegexInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *RegexInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RegexInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RegexInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RegexInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *RegexInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RegexInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RegexInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RegexInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *RegexInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *RegexInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *RegexInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *RegexInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *RegexInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *RegexInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *RegexInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *RegexInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *RegexInput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *RegexInput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *RegexInput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *RegexInput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *RegexInput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *RegexInput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *RegexInput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *RegexInput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *RegexInput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *RegexInput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *RegexInput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *RegexInput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *RegexInput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *RegexInput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *RegexInput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *RegexInput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *RegexInput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *RegexInput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *RegexInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *RegexInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *RegexInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *RegexInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *RegexInput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *RegexInput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *RegexInput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *RegexInput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RegexOutput.md b/docs/RegexOutput.md new file mode 100644 index 0000000..9d51489 --- /dev/null +++ b/docs/RegexOutput.md @@ -0,0 +1,390 @@ +# RegexOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "regex"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewRegexOutput + +`func NewRegexOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, ) *RegexOutput` + +NewRegexOutput instantiates a new RegexOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRegexOutputWithDefaults + +`func NewRegexOutputWithDefaults() *RegexOutput` + +NewRegexOutputWithDefaults instantiates a new RegexOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *RegexOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RegexOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RegexOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *RegexOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RegexOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RegexOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RegexOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *RegexOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RegexOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RegexOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RegexOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *RegexOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *RegexOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *RegexOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *RegexOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *RegexOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *RegexOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *RegexOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *RegexOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *RegexOutput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *RegexOutput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *RegexOutput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *RegexOutput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *RegexOutput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *RegexOutput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *RegexOutput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *RegexOutput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *RegexOutput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *RegexOutput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *RegexOutput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *RegexOutput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *RegexOutput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *RegexOutput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *RegexOutput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *RegexOutput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *RegexOutput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *RegexOutput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *RegexOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *RegexOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *RegexOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *RegexOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *RegexOutput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *RegexOutput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *RegexOutput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *RegexOutput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetId + +`func (o *RegexOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RegexOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RegexOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *RegexOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *RegexOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *RegexOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *RegexOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *RegexOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *RegexOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RegistryHive.md b/docs/RegistryHive.md new file mode 100644 index 0000000..7ea79cb --- /dev/null +++ b/docs/RegistryHive.md @@ -0,0 +1,23 @@ +# RegistryHive + +## Enum + + +* `CURRENT_CONFIG` (value: `"HKEY_CURRENT_CONFIG"`) + +* `CURRENT_USER` (value: `"HKEY_CURRENT_USER"`) + +* `LOCAL_MACHINE_SAM` (value: `"HKEY_LOCAL_MACHINE_SAM"`) + +* `LOCAL_MACHINE_SECURITY` (value: `"HKEY_LOCAL_MACHINE_Security"`) + +* `LOCAL_MACHINE_SOFTWARE` (value: `"HKEY_LOCAL_MACHINE_Software"`) + +* `LOCAL_MACHINE_SYSTEM` (value: `"HKEY_LOCAL_MACHINE_System"`) + +* `USERS_DEFAULT` (value: `"HKEY_USERS_DEFAULT"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RegistryKeyInput.md b/docs/RegistryKeyInput.md new file mode 100644 index 0000000..92ffa40 --- /dev/null +++ b/docs/RegistryKeyInput.md @@ -0,0 +1,254 @@ +# RegistryKeyInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "registry_key"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewRegistryKeyInput + +`func NewRegistryKeyInput(value string, key string, data *os.File, hive RegistryHive, ) *RegistryKeyInput` + +NewRegistryKeyInput instantiates a new RegistryKeyInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRegistryKeyInputWithDefaults + +`func NewRegistryKeyInputWithDefaults() *RegistryKeyInput` + +NewRegistryKeyInputWithDefaults instantiates a new RegistryKeyInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *RegistryKeyInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *RegistryKeyInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *RegistryKeyInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *RegistryKeyInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RegistryKeyInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RegistryKeyInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RegistryKeyInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *RegistryKeyInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *RegistryKeyInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *RegistryKeyInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *RegistryKeyInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *RegistryKeyInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *RegistryKeyInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *RegistryKeyInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *RegistryKeyInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *RegistryKeyInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *RegistryKeyInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *RegistryKeyInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *RegistryKeyInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetKey + +`func (o *RegistryKeyInput) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *RegistryKeyInput) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *RegistryKeyInput) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *RegistryKeyInput) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RegistryKeyInput) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *RegistryKeyInput) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *RegistryKeyInput) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *RegistryKeyInput) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *RegistryKeyInput) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *RegistryKeyInput) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *RegistryKeyInput) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *RegistryKeyInput) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *RegistryKeyInput) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### SetPathFileNil + +`func (o *RegistryKeyInput) SetPathFileNil(b bool)` + + SetPathFileNil sets the value for PathFile to be an explicit nil + +### UnsetPathFile +`func (o *RegistryKeyInput) UnsetPathFile()` + +UnsetPathFile ensures that no value is present for PathFile, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RegistryKeyOutput.md b/docs/RegistryKeyOutput.md new file mode 100644 index 0000000..8a319a7 --- /dev/null +++ b/docs/RegistryKeyOutput.md @@ -0,0 +1,317 @@ +# RegistryKeyOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "registry_key"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **NullableString** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewRegistryKeyOutput + +`func NewRegistryKeyOutput(value string, key string, data *os.File, hive RegistryHive, id string, tags map[string]TagRelationshipOutput, rootType string, ) *RegistryKeyOutput` + +NewRegistryKeyOutput instantiates a new RegistryKeyOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRegistryKeyOutputWithDefaults + +`func NewRegistryKeyOutputWithDefaults() *RegistryKeyOutput` + +NewRegistryKeyOutputWithDefaults instantiates a new RegistryKeyOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *RegistryKeyOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *RegistryKeyOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *RegistryKeyOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *RegistryKeyOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RegistryKeyOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RegistryKeyOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RegistryKeyOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *RegistryKeyOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *RegistryKeyOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *RegistryKeyOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *RegistryKeyOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *RegistryKeyOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *RegistryKeyOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *RegistryKeyOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *RegistryKeyOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *RegistryKeyOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *RegistryKeyOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *RegistryKeyOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *RegistryKeyOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetKey + +`func (o *RegistryKeyOutput) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *RegistryKeyOutput) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *RegistryKeyOutput) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *RegistryKeyOutput) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RegistryKeyOutput) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *RegistryKeyOutput) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *RegistryKeyOutput) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *RegistryKeyOutput) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *RegistryKeyOutput) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *RegistryKeyOutput) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *RegistryKeyOutput) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *RegistryKeyOutput) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *RegistryKeyOutput) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### SetPathFileNil + +`func (o *RegistryKeyOutput) SetPathFileNil(b bool)` + + SetPathFileNil sets the value for PathFile to be an explicit nil + +### UnsetPathFile +`func (o *RegistryKeyOutput) UnsetPathFile()` + +UnsetPathFile ensures that no value is present for PathFile, not even an explicit nil +### GetId + +`func (o *RegistryKeyOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RegistryKeyOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RegistryKeyOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *RegistryKeyOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *RegistryKeyOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *RegistryKeyOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *RegistryKeyOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *RegistryKeyOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *RegistryKeyOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Relationship.md b/docs/Relationship.md new file mode 100644 index 0000000..66c09c0 --- /dev/null +++ b/docs/Relationship.md @@ -0,0 +1,203 @@ +# Relationship + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | +**Target** | **string** | | +**Type** | **string** | | +**Count** | Pointer to **int32** | | [optional] [default to 1] +**Description** | **string** | | +**Created** | **time.Time** | | +**Modified** | **time.Time** | | +**Id** | **string** | | [readonly] + +## Methods + +### NewRelationship + +`func NewRelationship(source string, target string, type_ string, description string, created time.Time, modified time.Time, id string, ) *Relationship` + +NewRelationship instantiates a new Relationship object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipWithDefaults + +`func NewRelationshipWithDefaults() *Relationship` + +NewRelationshipWithDefaults instantiates a new Relationship object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSource + +`func (o *Relationship) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *Relationship) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *Relationship) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetTarget + +`func (o *Relationship) GetTarget() string` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *Relationship) GetTargetOk() (*string, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTarget + +`func (o *Relationship) SetTarget(v string)` + +SetTarget sets Target field to given value. + + +### GetType + +`func (o *Relationship) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Relationship) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Relationship) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCount + +`func (o *Relationship) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *Relationship) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *Relationship) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *Relationship) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetDescription + +`func (o *Relationship) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Relationship) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Relationship) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetCreated + +`func (o *Relationship) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Relationship) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Relationship) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetModified + +`func (o *Relationship) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *Relationship) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *Relationship) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + + +### GetId + +`func (o *Relationship) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Relationship) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Relationship) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RenderTemplateRequest.md b/docs/RenderTemplateRequest.md new file mode 100644 index 0000000..b1276fd --- /dev/null +++ b/docs/RenderTemplateRequest.md @@ -0,0 +1,103 @@ +# RenderTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateName** | **string** | | +**ObservableIds** | Pointer to **[]string** | | [optional] [default to []] +**SearchQuery** | Pointer to [**SearchQuery**](SearchQuery.md) | | [optional] + +## Methods + +### NewRenderTemplateRequest + +`func NewRenderTemplateRequest(templateName string, ) *RenderTemplateRequest` + +NewRenderTemplateRequest instantiates a new RenderTemplateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRenderTemplateRequestWithDefaults + +`func NewRenderTemplateRequestWithDefaults() *RenderTemplateRequest` + +NewRenderTemplateRequestWithDefaults instantiates a new RenderTemplateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTemplateName + +`func (o *RenderTemplateRequest) GetTemplateName() string` + +GetTemplateName returns the TemplateName field if non-nil, zero value otherwise. + +### GetTemplateNameOk + +`func (o *RenderTemplateRequest) GetTemplateNameOk() (*string, bool)` + +GetTemplateNameOk returns a tuple with the TemplateName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateName + +`func (o *RenderTemplateRequest) SetTemplateName(v string)` + +SetTemplateName sets TemplateName field to given value. + + +### GetObservableIds + +`func (o *RenderTemplateRequest) GetObservableIds() []string` + +GetObservableIds returns the ObservableIds field if non-nil, zero value otherwise. + +### GetObservableIdsOk + +`func (o *RenderTemplateRequest) GetObservableIdsOk() (*[]string, bool)` + +GetObservableIdsOk returns a tuple with the ObservableIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObservableIds + +`func (o *RenderTemplateRequest) SetObservableIds(v []string)` + +SetObservableIds sets ObservableIds field to given value. + +### HasObservableIds + +`func (o *RenderTemplateRequest) HasObservableIds() bool` + +HasObservableIds returns a boolean if a field has been set. + +### GetSearchQuery + +`func (o *RenderTemplateRequest) GetSearchQuery() SearchQuery` + +GetSearchQuery returns the SearchQuery field if non-nil, zero value otherwise. + +### GetSearchQueryOk + +`func (o *RenderTemplateRequest) GetSearchQueryOk() (*SearchQuery, bool)` + +GetSearchQueryOk returns a tuple with the SearchQuery field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearchQuery + +`func (o *RenderTemplateRequest) SetSearchQuery(v SearchQuery)` + +SetSearchQuery sets SearchQuery field to given value. + +### HasSearchQuery + +`func (o *RenderTemplateRequest) HasSearchQuery() bool` + +HasSearchQuery returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResetApiKeyRequest.md b/docs/ResetApiKeyRequest.md new file mode 100644 index 0000000..1f61057 --- /dev/null +++ b/docs/ResetApiKeyRequest.md @@ -0,0 +1,51 @@ +# ResetApiKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **string** | | + +## Methods + +### NewResetApiKeyRequest + +`func NewResetApiKeyRequest(userId string, ) *ResetApiKeyRequest` + +NewResetApiKeyRequest instantiates a new ResetApiKeyRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResetApiKeyRequestWithDefaults + +`func NewResetApiKeyRequestWithDefaults() *ResetApiKeyRequest` + +NewResetApiKeyRequestWithDefaults instantiates a new ResetApiKeyRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUserId + +`func (o *ResetApiKeyRequest) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResetApiKeyRequest) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResetApiKeyRequest) SetUserId(v string)` + +SetUserId sets UserId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResetPasswordRequest.md b/docs/ResetPasswordRequest.md new file mode 100644 index 0000000..bf31d00 --- /dev/null +++ b/docs/ResetPasswordRequest.md @@ -0,0 +1,72 @@ +# ResetPasswordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **string** | | +**NewPassword** | **string** | | + +## Methods + +### NewResetPasswordRequest + +`func NewResetPasswordRequest(userId string, newPassword string, ) *ResetPasswordRequest` + +NewResetPasswordRequest instantiates a new ResetPasswordRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResetPasswordRequestWithDefaults + +`func NewResetPasswordRequestWithDefaults() *ResetPasswordRequest` + +NewResetPasswordRequestWithDefaults instantiates a new ResetPasswordRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUserId + +`func (o *ResetPasswordRequest) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResetPasswordRequest) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResetPasswordRequest) SetUserId(v string)` + +SetUserId sets UserId field to given value. + + +### GetNewPassword + +`func (o *ResetPasswordRequest) GetNewPassword() string` + +GetNewPassword returns the NewPassword field if non-nil, zero value otherwise. + +### GetNewPasswordOk + +`func (o *ResetPasswordRequest) GetNewPasswordOk() (*string, bool)` + +GetNewPasswordOk returns a tuple with the NewPassword field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewPassword + +`func (o *ResetPasswordRequest) SetNewPassword(v string)` + +SetNewPassword sets NewPassword field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseAddContextApiV2ObservablesObservableIdContextPost.md b/docs/ResponseAddContextApiV2ObservablesObservableIdContextPost.md new file mode 100644 index 0000000..6aac34d --- /dev/null +++ b/docs/ResponseAddContextApiV2ObservablesObservableIdContextPost.md @@ -0,0 +1,1191 @@ +# ResponseAddContextApiV2ObservablesObservableIdContextPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAddContextApiV2ObservablesObservableIdContextPost + +`func NewResponseAddContextApiV2ObservablesObservableIdContextPost(value string, id string, tags map[string]TagRelationshipOutput, rootType string, key string, data *os.File, hive RegistryHive, ) *ResponseAddContextApiV2ObservablesObservableIdContextPost` + +NewResponseAddContextApiV2ObservablesObservableIdContextPost instantiates a new ResponseAddContextApiV2ObservablesObservableIdContextPost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAddContextApiV2ObservablesObservableIdContextPostWithDefaults + +`func NewResponseAddContextApiV2ObservablesObservableIdContextPostWithDefaults() *ResponseAddContextApiV2ObservablesObservableIdContextPost` + +NewResponseAddContextApiV2ObservablesObservableIdContextPostWithDefaults instantiates a new ResponseAddContextApiV2ObservablesObservableIdContextPost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetLastSeen + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetKey + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCountry + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetVersion + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetUserId + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetCoin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *ResponseAddContextApiV2ObservablesObservableIdContextPost) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseAddTextApiV2ObservablesAddTextPost.md b/docs/ResponseAddTextApiV2ObservablesAddTextPost.md new file mode 100644 index 0000000..51aae8e --- /dev/null +++ b/docs/ResponseAddTextApiV2ObservablesAddTextPost.md @@ -0,0 +1,1191 @@ +# ResponseAddTextApiV2ObservablesAddTextPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAddTextApiV2ObservablesAddTextPost + +`func NewResponseAddTextApiV2ObservablesAddTextPost(value string, id string, tags map[string]TagRelationshipOutput, rootType string, key string, data *os.File, hive RegistryHive, ) *ResponseAddTextApiV2ObservablesAddTextPost` + +NewResponseAddTextApiV2ObservablesAddTextPost instantiates a new ResponseAddTextApiV2ObservablesAddTextPost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAddTextApiV2ObservablesAddTextPostWithDefaults + +`func NewResponseAddTextApiV2ObservablesAddTextPostWithDefaults() *ResponseAddTextApiV2ObservablesAddTextPost` + +NewResponseAddTextApiV2ObservablesAddTextPostWithDefaults instantiates a new ResponseAddTextApiV2ObservablesAddTextPost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetLastSeen + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetKey + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCountry + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetVersion + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetUserId + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetCoin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *ResponseAddTextApiV2ObservablesAddTextPost) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost.md b/docs/ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost.md new file mode 100644 index 0000000..4cbf8a9 --- /dev/null +++ b/docs/ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost.md @@ -0,0 +1,1191 @@ +# ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost + +`func NewResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost(value string, id string, tags map[string]TagRelationshipOutput, rootType string, key string, data *os.File, hive RegistryHive, ) *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost` + +NewResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost instantiates a new ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteContextApiV2ObservablesObservableIdContextDeletePostWithDefaults + +`func NewResponseDeleteContextApiV2ObservablesObservableIdContextDeletePostWithDefaults() *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost` + +NewResponseDeleteContextApiV2ObservablesObservableIdContextDeletePostWithDefaults instantiates a new ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetLastSeen + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetKey + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCountry + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetVersion + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetUserId + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetCoin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseDetailsApiV2DfiqDfiqIdGet.md b/docs/ResponseDetailsApiV2DfiqDfiqIdGet.md new file mode 100644 index 0000000..b9cd590 --- /dev/null +++ b/docs/ResponseDetailsApiV2DfiqDfiqIdGet.md @@ -0,0 +1,385 @@ +# ResponseDetailsApiV2DfiqDfiqIdGet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Uuid** | Pointer to **string** | | [optional] +**DfiqId** | Pointer to **string** | | [optional] +**DfiqVersion** | **string** | | +**DfiqTags** | Pointer to **[]string** | | [optional] +**Contributors** | Pointer to **[]string** | | [optional] +**DfiqYaml** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Description** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "scenario"] +**Id** | **string** | | [readonly] +**RootType** | **string** | | [readonly] +**ParentIds** | **[]string** | | +**Approaches** | Pointer to [**[]DFIQApproach**](DFIQApproach.md) | | [optional] [default to []] + +## Methods + +### NewResponseDetailsApiV2DfiqDfiqIdGet + +`func NewResponseDetailsApiV2DfiqDfiqIdGet(name string, dfiqVersion string, dfiqYaml string, description string, id string, rootType string, parentIds []string, ) *ResponseDetailsApiV2DfiqDfiqIdGet` + +NewResponseDetailsApiV2DfiqDfiqIdGet instantiates a new ResponseDetailsApiV2DfiqDfiqIdGet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDetailsApiV2DfiqDfiqIdGetWithDefaults + +`func NewResponseDetailsApiV2DfiqDfiqIdGetWithDefaults() *ResponseDetailsApiV2DfiqDfiqIdGet` + +NewResponseDetailsApiV2DfiqDfiqIdGetWithDefaults instantiates a new ResponseDetailsApiV2DfiqDfiqIdGet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUuid + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetUuidOk() (*string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUuid + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetUuid(v string)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### GetDfiqId + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDfiqId() string` + +GetDfiqId returns the DfiqId field if non-nil, zero value otherwise. + +### GetDfiqIdOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDfiqIdOk() (*string, bool)` + +GetDfiqIdOk returns a tuple with the DfiqId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqId + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetDfiqId(v string)` + +SetDfiqId sets DfiqId field to given value. + +### HasDfiqId + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) HasDfiqId() bool` + +HasDfiqId returns a boolean if a field has been set. + +### GetDfiqVersion + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDfiqVersion() string` + +GetDfiqVersion returns the DfiqVersion field if non-nil, zero value otherwise. + +### GetDfiqVersionOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDfiqVersionOk() (*string, bool)` + +GetDfiqVersionOk returns a tuple with the DfiqVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqVersion + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetDfiqVersion(v string)` + +SetDfiqVersion sets DfiqVersion field to given value. + + +### GetDfiqTags + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDfiqTags() []string` + +GetDfiqTags returns the DfiqTags field if non-nil, zero value otherwise. + +### GetDfiqTagsOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDfiqTagsOk() (*[]string, bool)` + +GetDfiqTagsOk returns a tuple with the DfiqTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqTags + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetDfiqTags(v []string)` + +SetDfiqTags sets DfiqTags field to given value. + +### HasDfiqTags + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) HasDfiqTags() bool` + +HasDfiqTags returns a boolean if a field has been set. + +### GetContributors + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetContributors() []string` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetContributorsOk() (*[]string, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetContributors(v []string)` + +SetContributors sets Contributors field to given value. + +### HasContributors + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) HasContributors() bool` + +HasContributors returns a boolean if a field has been set. + +### GetDfiqYaml + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetCreated + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRootType + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetParentIds + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetParentIds() []string` + +GetParentIds returns the ParentIds field if non-nil, zero value otherwise. + +### GetParentIdsOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetParentIdsOk() (*[]string, bool)` + +GetParentIdsOk returns a tuple with the ParentIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentIds + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetParentIds(v []string)` + +SetParentIds sets ParentIds field to given value. + + +### GetApproaches + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetApproaches() []DFIQApproach` + +GetApproaches returns the Approaches field if non-nil, zero value otherwise. + +### GetApproachesOk + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) GetApproachesOk() (*[]DFIQApproach, bool)` + +GetApproachesOk returns a tuple with the Approaches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApproaches + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) SetApproaches(v []DFIQApproach)` + +SetApproaches sets Approaches field to given value. + +### HasApproaches + +`func (o *ResponseDetailsApiV2DfiqDfiqIdGet) HasApproaches() bool` + +HasApproaches returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseDetailsApiV2EntitiesEntityIdGet.md b/docs/ResponseDetailsApiV2EntitiesEntityIdGet.md new file mode 100644 index 0000000..b5e1a7c --- /dev/null +++ b/docs/ResponseDetailsApiV2EntitiesEntityIdGet.md @@ -0,0 +1,629 @@ +# ResponseDetailsApiV2EntitiesEntityIdGet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "tool"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**ToolVersion** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] +**Title** | Pointer to **string** | | [optional] [default to ""] +**BaseScore** | Pointer to **float32** | | [optional] [default to 0.0] +**Severity** | Pointer to [**SeverityType**](SeverityType.md) | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] +**Family** | Pointer to **string** | | [optional] [default to ""] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**ThreatActorTypes** | Pointer to **[]string** | | [optional] [default to []] +**IdentityClass** | Pointer to **string** | | [optional] [default to ""] +**Sectors** | Pointer to **[]string** | | [optional] [default to []] +**ContactInformation** | Pointer to **string** | | [optional] [default to ""] + +## Methods + +### NewResponseDetailsApiV2EntitiesEntityIdGet + +`func NewResponseDetailsApiV2EntitiesEntityIdGet(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *ResponseDetailsApiV2EntitiesEntityIdGet` + +NewResponseDetailsApiV2EntitiesEntityIdGet instantiates a new ResponseDetailsApiV2EntitiesEntityIdGet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDetailsApiV2EntitiesEntityIdGetWithDefaults + +`func NewResponseDetailsApiV2EntitiesEntityIdGetWithDefaults() *ResponseDetailsApiV2EntitiesEntityIdGet` + +NewResponseDetailsApiV2EntitiesEntityIdGetWithDefaults instantiates a new ResponseDetailsApiV2EntitiesEntityIdGet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetToolVersion + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetToolVersion() string` + +GetToolVersion returns the ToolVersion field if non-nil, zero value otherwise. + +### GetToolVersionOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetToolVersionOk() (*string, bool)` + +GetToolVersionOk returns a tuple with the ToolVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolVersion + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetToolVersion(v string)` + +SetToolVersion sets ToolVersion field to given value. + +### HasToolVersion + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasToolVersion() bool` + +HasToolVersion returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + +### GetTitle + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetBaseScore + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetBaseScore() float32` + +GetBaseScore returns the BaseScore field if non-nil, zero value otherwise. + +### GetBaseScoreOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetBaseScoreOk() (*float32, bool)` + +GetBaseScoreOk returns a tuple with the BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseScore + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetBaseScore(v float32)` + +SetBaseScore sets BaseScore field to given value. + +### HasBaseScore + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasBaseScore() bool` + +HasBaseScore returns a boolean if a field has been set. + +### GetSeverity + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetSeverity() SeverityType` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetSeverityOk() (*SeverityType, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetSeverity(v SeverityType)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetReference + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetFamily + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetFamily() string` + +GetFamily returns the Family field if non-nil, zero value otherwise. + +### GetFamilyOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetFamilyOk() (*string, bool)` + +GetFamilyOk returns a tuple with the Family field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFamily + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetFamily(v string)` + +SetFamily sets Family field to given value. + +### HasFamily + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasFamily() bool` + +HasFamily returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetThreatActorTypes + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetThreatActorTypes() []string` + +GetThreatActorTypes returns the ThreatActorTypes field if non-nil, zero value otherwise. + +### GetThreatActorTypesOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetThreatActorTypesOk() (*[]string, bool)` + +GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreatActorTypes + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetThreatActorTypes(v []string)` + +SetThreatActorTypes sets ThreatActorTypes field to given value. + +### HasThreatActorTypes + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasThreatActorTypes() bool` + +HasThreatActorTypes returns a boolean if a field has been set. + +### GetIdentityClass + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetIdentityClass() string` + +GetIdentityClass returns the IdentityClass field if non-nil, zero value otherwise. + +### GetIdentityClassOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetIdentityClassOk() (*string, bool)` + +GetIdentityClassOk returns a tuple with the IdentityClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityClass + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetIdentityClass(v string)` + +SetIdentityClass sets IdentityClass field to given value. + +### HasIdentityClass + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasIdentityClass() bool` + +HasIdentityClass returns a boolean if a field has been set. + +### GetSectors + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetSectors() []string` + +GetSectors returns the Sectors field if non-nil, zero value otherwise. + +### GetSectorsOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetSectorsOk() (*[]string, bool)` + +GetSectorsOk returns a tuple with the Sectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSectors + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetSectors(v []string)` + +SetSectors sets Sectors field to given value. + +### HasSectors + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasSectors() bool` + +HasSectors returns a boolean if a field has been set. + +### GetContactInformation + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetContactInformation() string` + +GetContactInformation returns the ContactInformation field if non-nil, zero value otherwise. + +### GetContactInformationOk + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) GetContactInformationOk() (*string, bool)` + +GetContactInformationOk returns a tuple with the ContactInformation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContactInformation + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) SetContactInformation(v string)` + +SetContactInformation sets ContactInformation field to given value. + +### HasContactInformation + +`func (o *ResponseDetailsApiV2EntitiesEntityIdGet) HasContactInformation() bool` + +HasContactInformation returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseDetailsApiV2IndicatorsIndicatorIdGet.md b/docs/ResponseDetailsApiV2IndicatorsIndicatorIdGet.md new file mode 100644 index 0000000..ee3e0fe --- /dev/null +++ b/docs/ResponseDetailsApiV2IndicatorsIndicatorIdGet.md @@ -0,0 +1,593 @@ +# ResponseDetailsApiV2IndicatorsIndicatorIdGet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "suricata"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Sid** | Pointer to **int32** | | [optional] [default to 0] +**Metadata** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**Sources** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**SupportedOs** | Pointer to **[]string** | | [optional] [default to []] +**QueryType** | **string** | | +**TargetSystems** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewResponseDetailsApiV2IndicatorsIndicatorIdGet + +`func NewResponseDetailsApiV2IndicatorsIndicatorIdGet(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, queryType string, ) *ResponseDetailsApiV2IndicatorsIndicatorIdGet` + +NewResponseDetailsApiV2IndicatorsIndicatorIdGet instantiates a new ResponseDetailsApiV2IndicatorsIndicatorIdGet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDetailsApiV2IndicatorsIndicatorIdGetWithDefaults + +`func NewResponseDetailsApiV2IndicatorsIndicatorIdGetWithDefaults() *ResponseDetailsApiV2IndicatorsIndicatorIdGet` + +NewResponseDetailsApiV2IndicatorsIndicatorIdGetWithDefaults instantiates a new ResponseDetailsApiV2IndicatorsIndicatorIdGet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetSid + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetSid() int32` + +GetSid returns the Sid field if non-nil, zero value otherwise. + +### GetSidOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetSidOk() (*int32, bool)` + +GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSid + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetSid(v int32)` + +SetSid sets Sid field to given value. + +### HasSid + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasSid() bool` + +HasSid returns a boolean if a field has been set. + +### GetMetadata + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetMetadata() []string` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetMetadataOk() (*[]string, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetMetadata(v []string)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetReferences + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetSources + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetSources() []map[string]interface{}` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetSourcesOk() (*[]map[string]interface{}, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetSources(v []map[string]interface{})` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetAliases + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetSupportedOs + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetSupportedOs() []string` + +GetSupportedOs returns the SupportedOs field if non-nil, zero value otherwise. + +### GetSupportedOsOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetSupportedOsOk() (*[]string, bool)` + +GetSupportedOsOk returns a tuple with the SupportedOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedOs + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetSupportedOs(v []string)` + +SetSupportedOs sets SupportedOs field to given value. + +### HasSupportedOs + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasSupportedOs() bool` + +HasSupportedOs returns a boolean if a field has been set. + +### GetQueryType + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetQueryType() string` + +GetQueryType returns the QueryType field if non-nil, zero value otherwise. + +### GetQueryTypeOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetQueryTypeOk() (*string, bool)` + +GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryType + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetQueryType(v string)` + +SetQueryType sets QueryType field to given value. + + +### GetTargetSystems + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetTargetSystems() []string` + +GetTargetSystems returns the TargetSystems field if non-nil, zero value otherwise. + +### GetTargetSystemsOk + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) GetTargetSystemsOk() (*[]string, bool)` + +GetTargetSystemsOk returns a tuple with the TargetSystems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetSystems + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) SetTargetSystems(v []string)` + +SetTargetSystems sets TargetSystems field to given value. + +### HasTargetSystems + +`func (o *ResponseDetailsApiV2IndicatorsIndicatorIdGet) HasTargetSystems() bool` + +HasTargetSystems returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseDetailsApiV2ObservablesObservableIdGet.md b/docs/ResponseDetailsApiV2ObservablesObservableIdGet.md new file mode 100644 index 0000000..e6ad85b --- /dev/null +++ b/docs/ResponseDetailsApiV2ObservablesObservableIdGet.md @@ -0,0 +1,1191 @@ +# ResponseDetailsApiV2ObservablesObservableIdGet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDetailsApiV2ObservablesObservableIdGet + +`func NewResponseDetailsApiV2ObservablesObservableIdGet(value string, id string, tags map[string]TagRelationshipOutput, rootType string, key string, data *os.File, hive RegistryHive, ) *ResponseDetailsApiV2ObservablesObservableIdGet` + +NewResponseDetailsApiV2ObservablesObservableIdGet instantiates a new ResponseDetailsApiV2ObservablesObservableIdGet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDetailsApiV2ObservablesObservableIdGetWithDefaults + +`func NewResponseDetailsApiV2ObservablesObservableIdGetWithDefaults() *ResponseDetailsApiV2ObservablesObservableIdGet` + +NewResponseDetailsApiV2ObservablesObservableIdGetWithDefaults instantiates a new ResponseDetailsApiV2ObservablesObservableIdGet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetLastSeen + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetKey + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCountry + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetVersion + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetUserId + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetCoin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *ResponseDetailsApiV2ObservablesObservableIdGet) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseNewApiV2EntitiesPost.md b/docs/ResponseNewApiV2EntitiesPost.md new file mode 100644 index 0000000..05b7d57 --- /dev/null +++ b/docs/ResponseNewApiV2EntitiesPost.md @@ -0,0 +1,629 @@ +# ResponseNewApiV2EntitiesPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "tool"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**ToolVersion** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] +**Title** | Pointer to **string** | | [optional] [default to ""] +**BaseScore** | Pointer to **float32** | | [optional] [default to 0.0] +**Severity** | Pointer to [**SeverityType**](SeverityType.md) | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] +**Family** | Pointer to **string** | | [optional] [default to ""] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**ThreatActorTypes** | Pointer to **[]string** | | [optional] [default to []] +**IdentityClass** | Pointer to **string** | | [optional] [default to ""] +**Sectors** | Pointer to **[]string** | | [optional] [default to []] +**ContactInformation** | Pointer to **string** | | [optional] [default to ""] + +## Methods + +### NewResponseNewApiV2EntitiesPost + +`func NewResponseNewApiV2EntitiesPost(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *ResponseNewApiV2EntitiesPost` + +NewResponseNewApiV2EntitiesPost instantiates a new ResponseNewApiV2EntitiesPost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseNewApiV2EntitiesPostWithDefaults + +`func NewResponseNewApiV2EntitiesPostWithDefaults() *ResponseNewApiV2EntitiesPost` + +NewResponseNewApiV2EntitiesPostWithDefaults instantiates a new ResponseNewApiV2EntitiesPost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ResponseNewApiV2EntitiesPost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseNewApiV2EntitiesPost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseNewApiV2EntitiesPost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseNewApiV2EntitiesPost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponseNewApiV2EntitiesPost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseNewApiV2EntitiesPost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseNewApiV2EntitiesPost) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ResponseNewApiV2EntitiesPost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseNewApiV2EntitiesPost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseNewApiV2EntitiesPost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseNewApiV2EntitiesPost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponseNewApiV2EntitiesPost) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponseNewApiV2EntitiesPost) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponseNewApiV2EntitiesPost) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponseNewApiV2EntitiesPost) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseNewApiV2EntitiesPost) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseNewApiV2EntitiesPost) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseNewApiV2EntitiesPost) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseNewApiV2EntitiesPost) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponseNewApiV2EntitiesPost) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponseNewApiV2EntitiesPost) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponseNewApiV2EntitiesPost) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponseNewApiV2EntitiesPost) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *ResponseNewApiV2EntitiesPost) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ResponseNewApiV2EntitiesPost) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ResponseNewApiV2EntitiesPost) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ResponseNewApiV2EntitiesPost) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *ResponseNewApiV2EntitiesPost) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ResponseNewApiV2EntitiesPost) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ResponseNewApiV2EntitiesPost) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ResponseNewApiV2EntitiesPost) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetToolVersion + +`func (o *ResponseNewApiV2EntitiesPost) GetToolVersion() string` + +GetToolVersion returns the ToolVersion field if non-nil, zero value otherwise. + +### GetToolVersionOk + +`func (o *ResponseNewApiV2EntitiesPost) GetToolVersionOk() (*string, bool)` + +GetToolVersionOk returns a tuple with the ToolVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolVersion + +`func (o *ResponseNewApiV2EntitiesPost) SetToolVersion(v string)` + +SetToolVersion sets ToolVersion field to given value. + +### HasToolVersion + +`func (o *ResponseNewApiV2EntitiesPost) HasToolVersion() bool` + +HasToolVersion returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseNewApiV2EntitiesPost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseNewApiV2EntitiesPost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseNewApiV2EntitiesPost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseNewApiV2EntitiesPost) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseNewApiV2EntitiesPost) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseNewApiV2EntitiesPost) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseNewApiV2EntitiesPost) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseNewApiV2EntitiesPost) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseNewApiV2EntitiesPost) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *ResponseNewApiV2EntitiesPost) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *ResponseNewApiV2EntitiesPost) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *ResponseNewApiV2EntitiesPost) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + +### GetTitle + +`func (o *ResponseNewApiV2EntitiesPost) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ResponseNewApiV2EntitiesPost) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *ResponseNewApiV2EntitiesPost) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *ResponseNewApiV2EntitiesPost) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetBaseScore + +`func (o *ResponseNewApiV2EntitiesPost) GetBaseScore() float32` + +GetBaseScore returns the BaseScore field if non-nil, zero value otherwise. + +### GetBaseScoreOk + +`func (o *ResponseNewApiV2EntitiesPost) GetBaseScoreOk() (*float32, bool)` + +GetBaseScoreOk returns a tuple with the BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseScore + +`func (o *ResponseNewApiV2EntitiesPost) SetBaseScore(v float32)` + +SetBaseScore sets BaseScore field to given value. + +### HasBaseScore + +`func (o *ResponseNewApiV2EntitiesPost) HasBaseScore() bool` + +HasBaseScore returns a boolean if a field has been set. + +### GetSeverity + +`func (o *ResponseNewApiV2EntitiesPost) GetSeverity() SeverityType` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *ResponseNewApiV2EntitiesPost) GetSeverityOk() (*SeverityType, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *ResponseNewApiV2EntitiesPost) SetSeverity(v SeverityType)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *ResponseNewApiV2EntitiesPost) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetReference + +`func (o *ResponseNewApiV2EntitiesPost) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *ResponseNewApiV2EntitiesPost) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *ResponseNewApiV2EntitiesPost) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *ResponseNewApiV2EntitiesPost) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetFamily + +`func (o *ResponseNewApiV2EntitiesPost) GetFamily() string` + +GetFamily returns the Family field if non-nil, zero value otherwise. + +### GetFamilyOk + +`func (o *ResponseNewApiV2EntitiesPost) GetFamilyOk() (*string, bool)` + +GetFamilyOk returns a tuple with the Family field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFamily + +`func (o *ResponseNewApiV2EntitiesPost) SetFamily(v string)` + +SetFamily sets Family field to given value. + +### HasFamily + +`func (o *ResponseNewApiV2EntitiesPost) HasFamily() bool` + +HasFamily returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponseNewApiV2EntitiesPost) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponseNewApiV2EntitiesPost) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponseNewApiV2EntitiesPost) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponseNewApiV2EntitiesPost) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *ResponseNewApiV2EntitiesPost) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponseNewApiV2EntitiesPost) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponseNewApiV2EntitiesPost) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponseNewApiV2EntitiesPost) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetThreatActorTypes + +`func (o *ResponseNewApiV2EntitiesPost) GetThreatActorTypes() []string` + +GetThreatActorTypes returns the ThreatActorTypes field if non-nil, zero value otherwise. + +### GetThreatActorTypesOk + +`func (o *ResponseNewApiV2EntitiesPost) GetThreatActorTypesOk() (*[]string, bool)` + +GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreatActorTypes + +`func (o *ResponseNewApiV2EntitiesPost) SetThreatActorTypes(v []string)` + +SetThreatActorTypes sets ThreatActorTypes field to given value. + +### HasThreatActorTypes + +`func (o *ResponseNewApiV2EntitiesPost) HasThreatActorTypes() bool` + +HasThreatActorTypes returns a boolean if a field has been set. + +### GetIdentityClass + +`func (o *ResponseNewApiV2EntitiesPost) GetIdentityClass() string` + +GetIdentityClass returns the IdentityClass field if non-nil, zero value otherwise. + +### GetIdentityClassOk + +`func (o *ResponseNewApiV2EntitiesPost) GetIdentityClassOk() (*string, bool)` + +GetIdentityClassOk returns a tuple with the IdentityClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityClass + +`func (o *ResponseNewApiV2EntitiesPost) SetIdentityClass(v string)` + +SetIdentityClass sets IdentityClass field to given value. + +### HasIdentityClass + +`func (o *ResponseNewApiV2EntitiesPost) HasIdentityClass() bool` + +HasIdentityClass returns a boolean if a field has been set. + +### GetSectors + +`func (o *ResponseNewApiV2EntitiesPost) GetSectors() []string` + +GetSectors returns the Sectors field if non-nil, zero value otherwise. + +### GetSectorsOk + +`func (o *ResponseNewApiV2EntitiesPost) GetSectorsOk() (*[]string, bool)` + +GetSectorsOk returns a tuple with the Sectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSectors + +`func (o *ResponseNewApiV2EntitiesPost) SetSectors(v []string)` + +SetSectors sets Sectors field to given value. + +### HasSectors + +`func (o *ResponseNewApiV2EntitiesPost) HasSectors() bool` + +HasSectors returns a boolean if a field has been set. + +### GetContactInformation + +`func (o *ResponseNewApiV2EntitiesPost) GetContactInformation() string` + +GetContactInformation returns the ContactInformation field if non-nil, zero value otherwise. + +### GetContactInformationOk + +`func (o *ResponseNewApiV2EntitiesPost) GetContactInformationOk() (*string, bool)` + +GetContactInformationOk returns a tuple with the ContactInformation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContactInformation + +`func (o *ResponseNewApiV2EntitiesPost) SetContactInformation(v string)` + +SetContactInformation sets ContactInformation field to given value. + +### HasContactInformation + +`func (o *ResponseNewApiV2EntitiesPost) HasContactInformation() bool` + +HasContactInformation returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseNewApiV2IndicatorsPost.md b/docs/ResponseNewApiV2IndicatorsPost.md new file mode 100644 index 0000000..3a01871 --- /dev/null +++ b/docs/ResponseNewApiV2IndicatorsPost.md @@ -0,0 +1,593 @@ +# ResponseNewApiV2IndicatorsPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "suricata"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Sid** | Pointer to **int32** | | [optional] [default to 0] +**Metadata** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**Sources** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**SupportedOs** | Pointer to **[]string** | | [optional] [default to []] +**QueryType** | **string** | | +**TargetSystems** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewResponseNewApiV2IndicatorsPost + +`func NewResponseNewApiV2IndicatorsPost(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, queryType string, ) *ResponseNewApiV2IndicatorsPost` + +NewResponseNewApiV2IndicatorsPost instantiates a new ResponseNewApiV2IndicatorsPost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseNewApiV2IndicatorsPostWithDefaults + +`func NewResponseNewApiV2IndicatorsPostWithDefaults() *ResponseNewApiV2IndicatorsPost` + +NewResponseNewApiV2IndicatorsPostWithDefaults instantiates a new ResponseNewApiV2IndicatorsPost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResponseNewApiV2IndicatorsPost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseNewApiV2IndicatorsPost) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *ResponseNewApiV2IndicatorsPost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseNewApiV2IndicatorsPost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseNewApiV2IndicatorsPost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseNewApiV2IndicatorsPost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseNewApiV2IndicatorsPost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseNewApiV2IndicatorsPost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseNewApiV2IndicatorsPost) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseNewApiV2IndicatorsPost) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseNewApiV2IndicatorsPost) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponseNewApiV2IndicatorsPost) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponseNewApiV2IndicatorsPost) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponseNewApiV2IndicatorsPost) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *ResponseNewApiV2IndicatorsPost) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *ResponseNewApiV2IndicatorsPost) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *ResponseNewApiV2IndicatorsPost) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *ResponseNewApiV2IndicatorsPost) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *ResponseNewApiV2IndicatorsPost) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *ResponseNewApiV2IndicatorsPost) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *ResponseNewApiV2IndicatorsPost) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *ResponseNewApiV2IndicatorsPost) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *ResponseNewApiV2IndicatorsPost) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *ResponseNewApiV2IndicatorsPost) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *ResponseNewApiV2IndicatorsPost) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *ResponseNewApiV2IndicatorsPost) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *ResponseNewApiV2IndicatorsPost) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *ResponseNewApiV2IndicatorsPost) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ResponseNewApiV2IndicatorsPost) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ResponseNewApiV2IndicatorsPost) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *ResponseNewApiV2IndicatorsPost) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *ResponseNewApiV2IndicatorsPost) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *ResponseNewApiV2IndicatorsPost) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetSid + +`func (o *ResponseNewApiV2IndicatorsPost) GetSid() int32` + +GetSid returns the Sid field if non-nil, zero value otherwise. + +### GetSidOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetSidOk() (*int32, bool)` + +GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSid + +`func (o *ResponseNewApiV2IndicatorsPost) SetSid(v int32)` + +SetSid sets Sid field to given value. + +### HasSid + +`func (o *ResponseNewApiV2IndicatorsPost) HasSid() bool` + +HasSid returns a boolean if a field has been set. + +### GetMetadata + +`func (o *ResponseNewApiV2IndicatorsPost) GetMetadata() []string` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetMetadataOk() (*[]string, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *ResponseNewApiV2IndicatorsPost) SetMetadata(v []string)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *ResponseNewApiV2IndicatorsPost) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetReferences + +`func (o *ResponseNewApiV2IndicatorsPost) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *ResponseNewApiV2IndicatorsPost) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *ResponseNewApiV2IndicatorsPost) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseNewApiV2IndicatorsPost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseNewApiV2IndicatorsPost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseNewApiV2IndicatorsPost) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseNewApiV2IndicatorsPost) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseNewApiV2IndicatorsPost) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseNewApiV2IndicatorsPost) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetSources + +`func (o *ResponseNewApiV2IndicatorsPost) GetSources() []map[string]interface{}` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetSourcesOk() (*[]map[string]interface{}, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *ResponseNewApiV2IndicatorsPost) SetSources(v []map[string]interface{})` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *ResponseNewApiV2IndicatorsPost) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetAliases + +`func (o *ResponseNewApiV2IndicatorsPost) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ResponseNewApiV2IndicatorsPost) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ResponseNewApiV2IndicatorsPost) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetSupportedOs + +`func (o *ResponseNewApiV2IndicatorsPost) GetSupportedOs() []string` + +GetSupportedOs returns the SupportedOs field if non-nil, zero value otherwise. + +### GetSupportedOsOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetSupportedOsOk() (*[]string, bool)` + +GetSupportedOsOk returns a tuple with the SupportedOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedOs + +`func (o *ResponseNewApiV2IndicatorsPost) SetSupportedOs(v []string)` + +SetSupportedOs sets SupportedOs field to given value. + +### HasSupportedOs + +`func (o *ResponseNewApiV2IndicatorsPost) HasSupportedOs() bool` + +HasSupportedOs returns a boolean if a field has been set. + +### GetQueryType + +`func (o *ResponseNewApiV2IndicatorsPost) GetQueryType() string` + +GetQueryType returns the QueryType field if non-nil, zero value otherwise. + +### GetQueryTypeOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetQueryTypeOk() (*string, bool)` + +GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryType + +`func (o *ResponseNewApiV2IndicatorsPost) SetQueryType(v string)` + +SetQueryType sets QueryType field to given value. + + +### GetTargetSystems + +`func (o *ResponseNewApiV2IndicatorsPost) GetTargetSystems() []string` + +GetTargetSystems returns the TargetSystems field if non-nil, zero value otherwise. + +### GetTargetSystemsOk + +`func (o *ResponseNewApiV2IndicatorsPost) GetTargetSystemsOk() (*[]string, bool)` + +GetTargetSystemsOk returns a tuple with the TargetSystems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetSystems + +`func (o *ResponseNewApiV2IndicatorsPost) SetTargetSystems(v []string)` + +SetTargetSystems sets TargetSystems field to given value. + +### HasTargetSystems + +`func (o *ResponseNewApiV2IndicatorsPost) HasTargetSystems() bool` + +HasTargetSystems returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseNewApiV2ObservablesPost.md b/docs/ResponseNewApiV2ObservablesPost.md new file mode 100644 index 0000000..9f943b4 --- /dev/null +++ b/docs/ResponseNewApiV2ObservablesPost.md @@ -0,0 +1,1191 @@ +# ResponseNewApiV2ObservablesPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseNewApiV2ObservablesPost + +`func NewResponseNewApiV2ObservablesPost(value string, id string, tags map[string]TagRelationshipOutput, rootType string, key string, data *os.File, hive RegistryHive, ) *ResponseNewApiV2ObservablesPost` + +NewResponseNewApiV2ObservablesPost instantiates a new ResponseNewApiV2ObservablesPost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseNewApiV2ObservablesPostWithDefaults + +`func NewResponseNewApiV2ObservablesPostWithDefaults() *ResponseNewApiV2ObservablesPost` + +NewResponseNewApiV2ObservablesPostWithDefaults instantiates a new ResponseNewApiV2ObservablesPost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ResponseNewApiV2ObservablesPost) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ResponseNewApiV2ObservablesPost) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ResponseNewApiV2ObservablesPost) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ResponseNewApiV2ObservablesPost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseNewApiV2ObservablesPost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseNewApiV2ObservablesPost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseNewApiV2ObservablesPost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseNewApiV2ObservablesPost) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseNewApiV2ObservablesPost) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseNewApiV2ObservablesPost) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseNewApiV2ObservablesPost) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponseNewApiV2ObservablesPost) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponseNewApiV2ObservablesPost) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponseNewApiV2ObservablesPost) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponseNewApiV2ObservablesPost) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ResponseNewApiV2ObservablesPost) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ResponseNewApiV2ObservablesPost) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ResponseNewApiV2ObservablesPost) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ResponseNewApiV2ObservablesPost) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseNewApiV2ObservablesPost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseNewApiV2ObservablesPost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseNewApiV2ObservablesPost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseNewApiV2ObservablesPost) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseNewApiV2ObservablesPost) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseNewApiV2ObservablesPost) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseNewApiV2ObservablesPost) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseNewApiV2ObservablesPost) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseNewApiV2ObservablesPost) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetLastSeen + +`func (o *ResponseNewApiV2ObservablesPost) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponseNewApiV2ObservablesPost) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponseNewApiV2ObservablesPost) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponseNewApiV2ObservablesPost) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponseNewApiV2ObservablesPost) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponseNewApiV2ObservablesPost) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponseNewApiV2ObservablesPost) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponseNewApiV2ObservablesPost) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *ResponseNewApiV2ObservablesPost) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *ResponseNewApiV2ObservablesPost) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *ResponseNewApiV2ObservablesPost) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *ResponseNewApiV2ObservablesPost) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *ResponseNewApiV2ObservablesPost) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *ResponseNewApiV2ObservablesPost) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *ResponseNewApiV2ObservablesPost) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *ResponseNewApiV2ObservablesPost) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *ResponseNewApiV2ObservablesPost) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *ResponseNewApiV2ObservablesPost) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *ResponseNewApiV2ObservablesPost) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *ResponseNewApiV2ObservablesPost) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *ResponseNewApiV2ObservablesPost) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *ResponseNewApiV2ObservablesPost) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *ResponseNewApiV2ObservablesPost) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *ResponseNewApiV2ObservablesPost) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *ResponseNewApiV2ObservablesPost) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *ResponseNewApiV2ObservablesPost) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *ResponseNewApiV2ObservablesPost) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *ResponseNewApiV2ObservablesPost) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *ResponseNewApiV2ObservablesPost) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *ResponseNewApiV2ObservablesPost) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *ResponseNewApiV2ObservablesPost) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *ResponseNewApiV2ObservablesPost) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetKey + +`func (o *ResponseNewApiV2ObservablesPost) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *ResponseNewApiV2ObservablesPost) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *ResponseNewApiV2ObservablesPost) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *ResponseNewApiV2ObservablesPost) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseNewApiV2ObservablesPost) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseNewApiV2ObservablesPost) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *ResponseNewApiV2ObservablesPost) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *ResponseNewApiV2ObservablesPost) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *ResponseNewApiV2ObservablesPost) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *ResponseNewApiV2ObservablesPost) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *ResponseNewApiV2ObservablesPost) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *ResponseNewApiV2ObservablesPost) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *ResponseNewApiV2ObservablesPost) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCountry + +`func (o *ResponseNewApiV2ObservablesPost) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ResponseNewApiV2ObservablesPost) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ResponseNewApiV2ObservablesPost) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ResponseNewApiV2ObservablesPost) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseNewApiV2ObservablesPost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseNewApiV2ObservablesPost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseNewApiV2ObservablesPost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseNewApiV2ObservablesPost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetVersion + +`func (o *ResponseNewApiV2ObservablesPost) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *ResponseNewApiV2ObservablesPost) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *ResponseNewApiV2ObservablesPost) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *ResponseNewApiV2ObservablesPost) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *ResponseNewApiV2ObservablesPost) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *ResponseNewApiV2ObservablesPost) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *ResponseNewApiV2ObservablesPost) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *ResponseNewApiV2ObservablesPost) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponseNewApiV2ObservablesPost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseNewApiV2ObservablesPost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseNewApiV2ObservablesPost) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseNewApiV2ObservablesPost) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *ResponseNewApiV2ObservablesPost) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ResponseNewApiV2ObservablesPost) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ResponseNewApiV2ObservablesPost) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ResponseNewApiV2ObservablesPost) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *ResponseNewApiV2ObservablesPost) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ResponseNewApiV2ObservablesPost) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ResponseNewApiV2ObservablesPost) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ResponseNewApiV2ObservablesPost) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *ResponseNewApiV2ObservablesPost) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *ResponseNewApiV2ObservablesPost) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *ResponseNewApiV2ObservablesPost) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *ResponseNewApiV2ObservablesPost) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *ResponseNewApiV2ObservablesPost) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *ResponseNewApiV2ObservablesPost) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *ResponseNewApiV2ObservablesPost) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *ResponseNewApiV2ObservablesPost) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *ResponseNewApiV2ObservablesPost) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *ResponseNewApiV2ObservablesPost) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *ResponseNewApiV2ObservablesPost) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *ResponseNewApiV2ObservablesPost) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetUserId + +`func (o *ResponseNewApiV2ObservablesPost) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResponseNewApiV2ObservablesPost) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResponseNewApiV2ObservablesPost) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *ResponseNewApiV2ObservablesPost) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *ResponseNewApiV2ObservablesPost) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *ResponseNewApiV2ObservablesPost) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *ResponseNewApiV2ObservablesPost) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *ResponseNewApiV2ObservablesPost) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *ResponseNewApiV2ObservablesPost) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *ResponseNewApiV2ObservablesPost) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *ResponseNewApiV2ObservablesPost) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *ResponseNewApiV2ObservablesPost) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *ResponseNewApiV2ObservablesPost) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *ResponseNewApiV2ObservablesPost) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *ResponseNewApiV2ObservablesPost) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *ResponseNewApiV2ObservablesPost) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *ResponseNewApiV2ObservablesPost) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *ResponseNewApiV2ObservablesPost) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *ResponseNewApiV2ObservablesPost) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *ResponseNewApiV2ObservablesPost) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *ResponseNewApiV2ObservablesPost) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *ResponseNewApiV2ObservablesPost) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *ResponseNewApiV2ObservablesPost) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *ResponseNewApiV2ObservablesPost) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *ResponseNewApiV2ObservablesPost) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *ResponseNewApiV2ObservablesPost) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *ResponseNewApiV2ObservablesPost) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *ResponseNewApiV2ObservablesPost) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *ResponseNewApiV2ObservablesPost) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *ResponseNewApiV2ObservablesPost) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *ResponseNewApiV2ObservablesPost) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *ResponseNewApiV2ObservablesPost) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *ResponseNewApiV2ObservablesPost) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *ResponseNewApiV2ObservablesPost) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *ResponseNewApiV2ObservablesPost) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *ResponseNewApiV2ObservablesPost) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *ResponseNewApiV2ObservablesPost) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *ResponseNewApiV2ObservablesPost) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *ResponseNewApiV2ObservablesPost) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *ResponseNewApiV2ObservablesPost) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *ResponseNewApiV2ObservablesPost) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *ResponseNewApiV2ObservablesPost) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *ResponseNewApiV2ObservablesPost) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *ResponseNewApiV2ObservablesPost) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *ResponseNewApiV2ObservablesPost) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetCoin + +`func (o *ResponseNewApiV2ObservablesPost) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *ResponseNewApiV2ObservablesPost) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *ResponseNewApiV2ObservablesPost) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *ResponseNewApiV2ObservablesPost) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *ResponseNewApiV2ObservablesPost) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ResponseNewApiV2ObservablesPost) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *ResponseNewApiV2ObservablesPost) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *ResponseNewApiV2ObservablesPost) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseNewExtendedApiV2ObservablesExtendedPost.md b/docs/ResponseNewExtendedApiV2ObservablesExtendedPost.md new file mode 100644 index 0000000..9971844 --- /dev/null +++ b/docs/ResponseNewExtendedApiV2ObservablesExtendedPost.md @@ -0,0 +1,1191 @@ +# ResponseNewExtendedApiV2ObservablesExtendedPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseNewExtendedApiV2ObservablesExtendedPost + +`func NewResponseNewExtendedApiV2ObservablesExtendedPost(value string, id string, tags map[string]TagRelationshipOutput, rootType string, key string, data *os.File, hive RegistryHive, ) *ResponseNewExtendedApiV2ObservablesExtendedPost` + +NewResponseNewExtendedApiV2ObservablesExtendedPost instantiates a new ResponseNewExtendedApiV2ObservablesExtendedPost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseNewExtendedApiV2ObservablesExtendedPostWithDefaults + +`func NewResponseNewExtendedApiV2ObservablesExtendedPostWithDefaults() *ResponseNewExtendedApiV2ObservablesExtendedPost` + +NewResponseNewExtendedApiV2ObservablesExtendedPostWithDefaults instantiates a new ResponseNewExtendedApiV2ObservablesExtendedPost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetLastSeen + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetKey + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCountry + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetVersion + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetUserId + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetCoin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *ResponseNewExtendedApiV2ObservablesExtendedPost) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseNewFromYamlApiV2DfiqFromYamlPost.md b/docs/ResponseNewFromYamlApiV2DfiqFromYamlPost.md new file mode 100644 index 0000000..fdd842d --- /dev/null +++ b/docs/ResponseNewFromYamlApiV2DfiqFromYamlPost.md @@ -0,0 +1,385 @@ +# ResponseNewFromYamlApiV2DfiqFromYamlPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Uuid** | Pointer to **string** | | [optional] +**DfiqId** | Pointer to **string** | | [optional] +**DfiqVersion** | **string** | | +**DfiqTags** | Pointer to **[]string** | | [optional] +**Contributors** | Pointer to **[]string** | | [optional] +**DfiqYaml** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Description** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "scenario"] +**Id** | **string** | | [readonly] +**RootType** | **string** | | [readonly] +**ParentIds** | **[]string** | | +**Approaches** | Pointer to [**[]DFIQApproach**](DFIQApproach.md) | | [optional] [default to []] + +## Methods + +### NewResponseNewFromYamlApiV2DfiqFromYamlPost + +`func NewResponseNewFromYamlApiV2DfiqFromYamlPost(name string, dfiqVersion string, dfiqYaml string, description string, id string, rootType string, parentIds []string, ) *ResponseNewFromYamlApiV2DfiqFromYamlPost` + +NewResponseNewFromYamlApiV2DfiqFromYamlPost instantiates a new ResponseNewFromYamlApiV2DfiqFromYamlPost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseNewFromYamlApiV2DfiqFromYamlPostWithDefaults + +`func NewResponseNewFromYamlApiV2DfiqFromYamlPostWithDefaults() *ResponseNewFromYamlApiV2DfiqFromYamlPost` + +NewResponseNewFromYamlApiV2DfiqFromYamlPostWithDefaults instantiates a new ResponseNewFromYamlApiV2DfiqFromYamlPost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUuid + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetUuidOk() (*string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUuid + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetUuid(v string)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### GetDfiqId + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDfiqId() string` + +GetDfiqId returns the DfiqId field if non-nil, zero value otherwise. + +### GetDfiqIdOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDfiqIdOk() (*string, bool)` + +GetDfiqIdOk returns a tuple with the DfiqId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqId + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetDfiqId(v string)` + +SetDfiqId sets DfiqId field to given value. + +### HasDfiqId + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) HasDfiqId() bool` + +HasDfiqId returns a boolean if a field has been set. + +### GetDfiqVersion + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDfiqVersion() string` + +GetDfiqVersion returns the DfiqVersion field if non-nil, zero value otherwise. + +### GetDfiqVersionOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDfiqVersionOk() (*string, bool)` + +GetDfiqVersionOk returns a tuple with the DfiqVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqVersion + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetDfiqVersion(v string)` + +SetDfiqVersion sets DfiqVersion field to given value. + + +### GetDfiqTags + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDfiqTags() []string` + +GetDfiqTags returns the DfiqTags field if non-nil, zero value otherwise. + +### GetDfiqTagsOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDfiqTagsOk() (*[]string, bool)` + +GetDfiqTagsOk returns a tuple with the DfiqTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqTags + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetDfiqTags(v []string)` + +SetDfiqTags sets DfiqTags field to given value. + +### HasDfiqTags + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) HasDfiqTags() bool` + +HasDfiqTags returns a boolean if a field has been set. + +### GetContributors + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetContributors() []string` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetContributorsOk() (*[]string, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetContributors(v []string)` + +SetContributors sets Contributors field to given value. + +### HasContributors + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) HasContributors() bool` + +HasContributors returns a boolean if a field has been set. + +### GetDfiqYaml + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetCreated + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRootType + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetParentIds + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetParentIds() []string` + +GetParentIds returns the ParentIds field if non-nil, zero value otherwise. + +### GetParentIdsOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetParentIdsOk() (*[]string, bool)` + +GetParentIdsOk returns a tuple with the ParentIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentIds + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetParentIds(v []string)` + +SetParentIds sets ParentIds field to given value. + + +### GetApproaches + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetApproaches() []DFIQApproach` + +GetApproaches returns the Approaches field if non-nil, zero value otherwise. + +### GetApproachesOk + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetApproachesOk() (*[]DFIQApproach, bool)` + +GetApproachesOk returns a tuple with the Approaches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApproaches + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) SetApproaches(v []DFIQApproach)` + +SetApproaches sets Approaches field to given value. + +### HasApproaches + +`func (o *ResponseNewFromYamlApiV2DfiqFromYamlPost) HasApproaches() bool` + +HasApproaches returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponsePatchApiV2DfiqDfiqIdPatch.md b/docs/ResponsePatchApiV2DfiqDfiqIdPatch.md new file mode 100644 index 0000000..0479761 --- /dev/null +++ b/docs/ResponsePatchApiV2DfiqDfiqIdPatch.md @@ -0,0 +1,385 @@ +# ResponsePatchApiV2DfiqDfiqIdPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Uuid** | Pointer to **string** | | [optional] +**DfiqId** | Pointer to **string** | | [optional] +**DfiqVersion** | **string** | | +**DfiqTags** | Pointer to **[]string** | | [optional] +**Contributors** | Pointer to **[]string** | | [optional] +**DfiqYaml** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Description** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "scenario"] +**Id** | **string** | | [readonly] +**RootType** | **string** | | [readonly] +**ParentIds** | **[]string** | | +**Approaches** | Pointer to [**[]DFIQApproach**](DFIQApproach.md) | | [optional] [default to []] + +## Methods + +### NewResponsePatchApiV2DfiqDfiqIdPatch + +`func NewResponsePatchApiV2DfiqDfiqIdPatch(name string, dfiqVersion string, dfiqYaml string, description string, id string, rootType string, parentIds []string, ) *ResponsePatchApiV2DfiqDfiqIdPatch` + +NewResponsePatchApiV2DfiqDfiqIdPatch instantiates a new ResponsePatchApiV2DfiqDfiqIdPatch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePatchApiV2DfiqDfiqIdPatchWithDefaults + +`func NewResponsePatchApiV2DfiqDfiqIdPatchWithDefaults() *ResponsePatchApiV2DfiqDfiqIdPatch` + +NewResponsePatchApiV2DfiqDfiqIdPatchWithDefaults instantiates a new ResponsePatchApiV2DfiqDfiqIdPatch object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUuid + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetUuidOk() (*string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUuid + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetUuid(v string)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### GetDfiqId + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDfiqId() string` + +GetDfiqId returns the DfiqId field if non-nil, zero value otherwise. + +### GetDfiqIdOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDfiqIdOk() (*string, bool)` + +GetDfiqIdOk returns a tuple with the DfiqId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqId + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetDfiqId(v string)` + +SetDfiqId sets DfiqId field to given value. + +### HasDfiqId + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) HasDfiqId() bool` + +HasDfiqId returns a boolean if a field has been set. + +### GetDfiqVersion + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDfiqVersion() string` + +GetDfiqVersion returns the DfiqVersion field if non-nil, zero value otherwise. + +### GetDfiqVersionOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDfiqVersionOk() (*string, bool)` + +GetDfiqVersionOk returns a tuple with the DfiqVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqVersion + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetDfiqVersion(v string)` + +SetDfiqVersion sets DfiqVersion field to given value. + + +### GetDfiqTags + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDfiqTags() []string` + +GetDfiqTags returns the DfiqTags field if non-nil, zero value otherwise. + +### GetDfiqTagsOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDfiqTagsOk() (*[]string, bool)` + +GetDfiqTagsOk returns a tuple with the DfiqTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqTags + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetDfiqTags(v []string)` + +SetDfiqTags sets DfiqTags field to given value. + +### HasDfiqTags + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) HasDfiqTags() bool` + +HasDfiqTags returns a boolean if a field has been set. + +### GetContributors + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetContributors() []string` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetContributorsOk() (*[]string, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetContributors(v []string)` + +SetContributors sets Contributors field to given value. + +### HasContributors + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) HasContributors() bool` + +HasContributors returns a boolean if a field has been set. + +### GetDfiqYaml + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDfiqYaml() string` + +GetDfiqYaml returns the DfiqYaml field if non-nil, zero value otherwise. + +### GetDfiqYamlOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDfiqYamlOk() (*string, bool)` + +GetDfiqYamlOk returns a tuple with the DfiqYaml field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDfiqYaml + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetDfiqYaml(v string)` + +SetDfiqYaml sets DfiqYaml field to given value. + + +### GetCreated + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRootType + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetParentIds + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetParentIds() []string` + +GetParentIds returns the ParentIds field if non-nil, zero value otherwise. + +### GetParentIdsOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetParentIdsOk() (*[]string, bool)` + +GetParentIdsOk returns a tuple with the ParentIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentIds + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetParentIds(v []string)` + +SetParentIds sets ParentIds field to given value. + + +### GetApproaches + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetApproaches() []DFIQApproach` + +GetApproaches returns the Approaches field if non-nil, zero value otherwise. + +### GetApproachesOk + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) GetApproachesOk() (*[]DFIQApproach, bool)` + +GetApproachesOk returns a tuple with the Approaches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApproaches + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) SetApproaches(v []DFIQApproach)` + +SetApproaches sets Approaches field to given value. + +### HasApproaches + +`func (o *ResponsePatchApiV2DfiqDfiqIdPatch) HasApproaches() bool` + +HasApproaches returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponsePatchApiV2EntitiesEntityIdPatch.md b/docs/ResponsePatchApiV2EntitiesEntityIdPatch.md new file mode 100644 index 0000000..3733718 --- /dev/null +++ b/docs/ResponsePatchApiV2EntitiesEntityIdPatch.md @@ -0,0 +1,629 @@ +# ResponsePatchApiV2EntitiesEntityIdPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "tool"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**ToolVersion** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] +**Title** | Pointer to **string** | | [optional] [default to ""] +**BaseScore** | Pointer to **float32** | | [optional] [default to 0.0] +**Severity** | Pointer to [**SeverityType**](SeverityType.md) | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] +**Family** | Pointer to **string** | | [optional] [default to ""] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**ThreatActorTypes** | Pointer to **[]string** | | [optional] [default to []] +**IdentityClass** | Pointer to **string** | | [optional] [default to ""] +**Sectors** | Pointer to **[]string** | | [optional] [default to []] +**ContactInformation** | Pointer to **string** | | [optional] [default to ""] + +## Methods + +### NewResponsePatchApiV2EntitiesEntityIdPatch + +`func NewResponsePatchApiV2EntitiesEntityIdPatch(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *ResponsePatchApiV2EntitiesEntityIdPatch` + +NewResponsePatchApiV2EntitiesEntityIdPatch instantiates a new ResponsePatchApiV2EntitiesEntityIdPatch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePatchApiV2EntitiesEntityIdPatchWithDefaults + +`func NewResponsePatchApiV2EntitiesEntityIdPatchWithDefaults() *ResponsePatchApiV2EntitiesEntityIdPatch` + +NewResponsePatchApiV2EntitiesEntityIdPatchWithDefaults instantiates a new ResponsePatchApiV2EntitiesEntityIdPatch object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetToolVersion + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetToolVersion() string` + +GetToolVersion returns the ToolVersion field if non-nil, zero value otherwise. + +### GetToolVersionOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetToolVersionOk() (*string, bool)` + +GetToolVersionOk returns a tuple with the ToolVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolVersion + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetToolVersion(v string)` + +SetToolVersion sets ToolVersion field to given value. + +### HasToolVersion + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasToolVersion() bool` + +HasToolVersion returns a boolean if a field has been set. + +### GetId + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + +### GetTitle + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetBaseScore + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetBaseScore() float32` + +GetBaseScore returns the BaseScore field if non-nil, zero value otherwise. + +### GetBaseScoreOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetBaseScoreOk() (*float32, bool)` + +GetBaseScoreOk returns a tuple with the BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseScore + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetBaseScore(v float32)` + +SetBaseScore sets BaseScore field to given value. + +### HasBaseScore + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasBaseScore() bool` + +HasBaseScore returns a boolean if a field has been set. + +### GetSeverity + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetSeverity() SeverityType` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetSeverityOk() (*SeverityType, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetSeverity(v SeverityType)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetReference + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetFamily + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetFamily() string` + +GetFamily returns the Family field if non-nil, zero value otherwise. + +### GetFamilyOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetFamilyOk() (*string, bool)` + +GetFamilyOk returns a tuple with the Family field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFamily + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetFamily(v string)` + +SetFamily sets Family field to given value. + +### HasFamily + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasFamily() bool` + +HasFamily returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetThreatActorTypes + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetThreatActorTypes() []string` + +GetThreatActorTypes returns the ThreatActorTypes field if non-nil, zero value otherwise. + +### GetThreatActorTypesOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetThreatActorTypesOk() (*[]string, bool)` + +GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreatActorTypes + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetThreatActorTypes(v []string)` + +SetThreatActorTypes sets ThreatActorTypes field to given value. + +### HasThreatActorTypes + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasThreatActorTypes() bool` + +HasThreatActorTypes returns a boolean if a field has been set. + +### GetIdentityClass + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetIdentityClass() string` + +GetIdentityClass returns the IdentityClass field if non-nil, zero value otherwise. + +### GetIdentityClassOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetIdentityClassOk() (*string, bool)` + +GetIdentityClassOk returns a tuple with the IdentityClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityClass + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetIdentityClass(v string)` + +SetIdentityClass sets IdentityClass field to given value. + +### HasIdentityClass + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasIdentityClass() bool` + +HasIdentityClass returns a boolean if a field has been set. + +### GetSectors + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetSectors() []string` + +GetSectors returns the Sectors field if non-nil, zero value otherwise. + +### GetSectorsOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetSectorsOk() (*[]string, bool)` + +GetSectorsOk returns a tuple with the Sectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSectors + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetSectors(v []string)` + +SetSectors sets Sectors field to given value. + +### HasSectors + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasSectors() bool` + +HasSectors returns a boolean if a field has been set. + +### GetContactInformation + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetContactInformation() string` + +GetContactInformation returns the ContactInformation field if non-nil, zero value otherwise. + +### GetContactInformationOk + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) GetContactInformationOk() (*string, bool)` + +GetContactInformationOk returns a tuple with the ContactInformation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContactInformation + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) SetContactInformation(v string)` + +SetContactInformation sets ContactInformation field to given value. + +### HasContactInformation + +`func (o *ResponsePatchApiV2EntitiesEntityIdPatch) HasContactInformation() bool` + +HasContactInformation returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponsePatchApiV2IndicatorsIndicatorIdPatch.md b/docs/ResponsePatchApiV2IndicatorsIndicatorIdPatch.md new file mode 100644 index 0000000..6bb2109 --- /dev/null +++ b/docs/ResponsePatchApiV2IndicatorsIndicatorIdPatch.md @@ -0,0 +1,593 @@ +# ResponsePatchApiV2IndicatorsIndicatorIdPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "suricata"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Sid** | Pointer to **int32** | | [optional] [default to 0] +**Metadata** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**Sources** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**SupportedOs** | Pointer to **[]string** | | [optional] [default to []] +**QueryType** | **string** | | +**TargetSystems** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewResponsePatchApiV2IndicatorsIndicatorIdPatch + +`func NewResponsePatchApiV2IndicatorsIndicatorIdPatch(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, queryType string, ) *ResponsePatchApiV2IndicatorsIndicatorIdPatch` + +NewResponsePatchApiV2IndicatorsIndicatorIdPatch instantiates a new ResponsePatchApiV2IndicatorsIndicatorIdPatch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePatchApiV2IndicatorsIndicatorIdPatchWithDefaults + +`func NewResponsePatchApiV2IndicatorsIndicatorIdPatchWithDefaults() *ResponsePatchApiV2IndicatorsIndicatorIdPatch` + +NewResponsePatchApiV2IndicatorsIndicatorIdPatchWithDefaults instantiates a new ResponsePatchApiV2IndicatorsIndicatorIdPatch object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetSid + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetSid() int32` + +GetSid returns the Sid field if non-nil, zero value otherwise. + +### GetSidOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetSidOk() (*int32, bool)` + +GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSid + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetSid(v int32)` + +SetSid sets Sid field to given value. + +### HasSid + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasSid() bool` + +HasSid returns a boolean if a field has been set. + +### GetMetadata + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetMetadata() []string` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetMetadataOk() (*[]string, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetMetadata(v []string)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetReferences + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + +### GetId + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetSources + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetSources() []map[string]interface{}` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetSourcesOk() (*[]map[string]interface{}, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetSources(v []map[string]interface{})` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetAliases + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetSupportedOs + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetSupportedOs() []string` + +GetSupportedOs returns the SupportedOs field if non-nil, zero value otherwise. + +### GetSupportedOsOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetSupportedOsOk() (*[]string, bool)` + +GetSupportedOsOk returns a tuple with the SupportedOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedOs + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetSupportedOs(v []string)` + +SetSupportedOs sets SupportedOs field to given value. + +### HasSupportedOs + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasSupportedOs() bool` + +HasSupportedOs returns a boolean if a field has been set. + +### GetQueryType + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetQueryType() string` + +GetQueryType returns the QueryType field if non-nil, zero value otherwise. + +### GetQueryTypeOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetQueryTypeOk() (*string, bool)` + +GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryType + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetQueryType(v string)` + +SetQueryType sets QueryType field to given value. + + +### GetTargetSystems + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetTargetSystems() []string` + +GetTargetSystems returns the TargetSystems field if non-nil, zero value otherwise. + +### GetTargetSystemsOk + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) GetTargetSystemsOk() (*[]string, bool)` + +GetTargetSystemsOk returns a tuple with the TargetSystems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetSystems + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) SetTargetSystems(v []string)` + +SetTargetSystems sets TargetSystems field to given value. + +### HasTargetSystems + +`func (o *ResponsePatchApiV2IndicatorsIndicatorIdPatch) HasTargetSystems() bool` + +HasTargetSystems returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponsePatchApiV2ObservablesObservableIdPatch.md b/docs/ResponsePatchApiV2ObservablesObservableIdPatch.md new file mode 100644 index 0000000..b333c1a --- /dev/null +++ b/docs/ResponsePatchApiV2ObservablesObservableIdPatch.md @@ -0,0 +1,1191 @@ +# ResponsePatchApiV2ObservablesObservableIdPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**LastSeen** | Pointer to **time.Time** | | [optional] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**SerialNumber** | Pointer to **string** | | [optional] +**After** | Pointer to **time.Time** | | [optional] +**Before** | Pointer to **time.Time** | | [optional] +**Fingerprint** | Pointer to **string** | | [optional] +**Key** | **string** | | +**Data** | ***os.File** | | +**Hive** | [**RegistryHive**](RegistryHive.md) | | +**PathFile** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] +**RegitryType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] +**Sha256** | Pointer to **string** | | [optional] +**Md5** | Pointer to **string** | | [optional] +**Sha1** | Pointer to **string** | | [optional] +**MimeType** | Pointer to **string** | | [optional] +**UserId** | Pointer to **string** | | [optional] +**Credential** | Pointer to **string** | | [optional] +**AccountLogin** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] +**IsServiceAccount** | Pointer to **bool** | | [optional] +**IsPrivileged** | Pointer to **bool** | | [optional] +**CanEscalatePrivs** | Pointer to **bool** | | [optional] +**IsDisabled** | Pointer to **bool** | | [optional] +**AccountCreated** | Pointer to **time.Time** | | [optional] +**AccountExpires** | Pointer to **time.Time** | | [optional] +**CredentialLastChanged** | Pointer to **time.Time** | | [optional] +**AccountFirstLogin** | Pointer to **time.Time** | | [optional] +**AccountLastLogin** | Pointer to **time.Time** | | [optional] +**Coin** | Pointer to **string** | | [optional] +**Address** | Pointer to **string** | | [optional] + +## Methods + +### NewResponsePatchApiV2ObservablesObservableIdPatch + +`func NewResponsePatchApiV2ObservablesObservableIdPatch(value string, id string, tags map[string]TagRelationshipOutput, rootType string, key string, data *os.File, hive RegistryHive, ) *ResponsePatchApiV2ObservablesObservableIdPatch` + +NewResponsePatchApiV2ObservablesObservableIdPatch instantiates a new ResponsePatchApiV2ObservablesObservableIdPatch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePatchApiV2ObservablesObservableIdPatchWithDefaults + +`func NewResponsePatchApiV2ObservablesObservableIdPatchWithDefaults() *ResponsePatchApiV2ObservablesObservableIdPatch` + +NewResponsePatchApiV2ObservablesObservableIdPatchWithDefaults instantiates a new ResponsePatchApiV2ObservablesObservableIdPatch object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetLastSeen + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetIssuer + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubject + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetSerialNumber + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSerialNumber() string` + +GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise. + +### GetSerialNumberOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSerialNumberOk() (*string, bool)` + +GetSerialNumberOk returns a tuple with the SerialNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerialNumber + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetSerialNumber(v string)` + +SetSerialNumber sets SerialNumber field to given value. + +### HasSerialNumber + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasSerialNumber() bool` + +HasSerialNumber returns a boolean if a field has been set. + +### GetAfter + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAfter() time.Time` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAfterOk() (*time.Time, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetAfter(v time.Time)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + +### GetBefore + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetBefore() time.Time` + +GetBefore returns the Before field if non-nil, zero value otherwise. + +### GetBeforeOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetBeforeOk() (*time.Time, bool)` + +GetBeforeOk returns a tuple with the Before field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBefore + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetBefore(v time.Time)` + +SetBefore sets Before field to given value. + +### HasBefore + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasBefore() bool` + +HasBefore returns a boolean if a field has been set. + +### GetFingerprint + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetFingerprint() string` + +GetFingerprint returns the Fingerprint field if non-nil, zero value otherwise. + +### GetFingerprintOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetFingerprintOk() (*string, bool)` + +GetFingerprintOk returns a tuple with the Fingerprint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFingerprint + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetFingerprint(v string)` + +SetFingerprint sets Fingerprint field to given value. + +### HasFingerprint + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasFingerprint() bool` + +HasFingerprint returns a boolean if a field has been set. + +### GetKey + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetData + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetData() *os.File` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetDataOk() (**os.File, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetData(v *os.File)` + +SetData sets Data field to given value. + + +### GetHive + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetHive() RegistryHive` + +GetHive returns the Hive field if non-nil, zero value otherwise. + +### GetHiveOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetHiveOk() (*RegistryHive, bool)` + +GetHiveOk returns a tuple with the Hive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHive + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetHive(v RegistryHive)` + +SetHive sets Hive field to given value. + + +### GetPathFile + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetPathFile() string` + +GetPathFile returns the PathFile field if non-nil, zero value otherwise. + +### GetPathFileOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetPathFileOk() (*string, bool)` + +GetPathFileOk returns a tuple with the PathFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathFile + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetPathFile(v string)` + +SetPathFile sets PathFile field to given value. + +### HasPathFile + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasPathFile() bool` + +HasPathFile returns a boolean if a field has been set. + +### GetCountry + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetVersion + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetRegitryType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetRegitryType() string` + +GetRegitryType returns the RegitryType field if non-nil, zero value otherwise. + +### GetRegitryTypeOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetRegitryTypeOk() (*string, bool)` + +GetRegitryTypeOk returns a tuple with the RegitryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegitryType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetRegitryType(v string)` + +SetRegitryType sets RegitryType field to given value. + +### HasRegitryType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasRegitryType() bool` + +HasRegitryType returns a boolean if a field has been set. + +### GetName + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSize + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSha256 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + +### GetMd5 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetMd5() string` + +GetMd5 returns the Md5 field if non-nil, zero value otherwise. + +### GetMd5Ok + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetMd5Ok() (*string, bool)` + +GetMd5Ok returns a tuple with the Md5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMd5 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetMd5(v string)` + +SetMd5 sets Md5 field to given value. + +### HasMd5 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasMd5() bool` + +HasMd5 returns a boolean if a field has been set. + +### GetSha1 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSha1() string` + +GetSha1 returns the Sha1 field if non-nil, zero value otherwise. + +### GetSha1Ok + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetSha1Ok() (*string, bool)` + +GetSha1Ok returns a tuple with the Sha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha1 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetSha1(v string)` + +SetSha1 sets Sha1 field to given value. + +### HasSha1 + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasSha1() bool` + +HasSha1 returns a boolean if a field has been set. + +### GetMimeType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetMimeType() string` + +GetMimeType returns the MimeType field if non-nil, zero value otherwise. + +### GetMimeTypeOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetMimeTypeOk() (*string, bool)` + +GetMimeTypeOk returns a tuple with the MimeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMimeType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetMimeType(v string)` + +SetMimeType sets MimeType field to given value. + +### HasMimeType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasMimeType() bool` + +HasMimeType returns a boolean if a field has been set. + +### GetUserId + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetCredential + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### GetAccountLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### GetAccountType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetIsServiceAccount + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### GetIsPrivileged + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### GetCanEscalatePrivs + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### GetIsDisabled + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### GetAccountCreated + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### GetAccountExpires + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### GetCredentialLastChanged + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### GetAccountFirstLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### GetAccountLastLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### GetCoin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### GetAddress + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *ResponsePatchApiV2ObservablesObservableIdPatch) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseToggleApiV2TasksTaskNameTogglePost.md b/docs/ResponseToggleApiV2TasksTaskNameTogglePost.md new file mode 100644 index 0000000..016a1fc --- /dev/null +++ b/docs/ResponseToggleApiV2TasksTaskNameTogglePost.md @@ -0,0 +1,431 @@ +# ResponseToggleApiV2TasksTaskNameTogglePost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Enabled** | Pointer to **bool** | | [optional] [default to false] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Status** | Pointer to [**TaskStatus**](TaskStatus.md) | | [optional] +**StatusMessage** | Pointer to **string** | | [optional] [default to ""] +**LastRun** | Pointer to **time.Time** | | [optional] +**Frequency** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "feed"] +**Id** | **string** | | [readonly] +**ActsOn** | Pointer to **[]string** | | [optional] [default to []] +**IncludeTags** | Pointer to **[]string** | | [optional] [default to []] +**ExcludeTags** | Pointer to **[]string** | | [optional] [default to []] +**IgnoreTags** | Pointer to **[]string** | | [optional] [default to []] +**FreshTags** | Pointer to **bool** | | [optional] [default to true] +**TemplateName** | **string** | | +**Sha256** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseToggleApiV2TasksTaskNameTogglePost + +`func NewResponseToggleApiV2TasksTaskNameTogglePost(name string, id string, templateName string, ) *ResponseToggleApiV2TasksTaskNameTogglePost` + +NewResponseToggleApiV2TasksTaskNameTogglePost instantiates a new ResponseToggleApiV2TasksTaskNameTogglePost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseToggleApiV2TasksTaskNameTogglePostWithDefaults + +`func NewResponseToggleApiV2TasksTaskNameTogglePostWithDefaults() *ResponseToggleApiV2TasksTaskNameTogglePost` + +NewResponseToggleApiV2TasksTaskNameTogglePostWithDefaults instantiates a new ResponseToggleApiV2TasksTaskNameTogglePost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEnabled + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetDescription + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetStatus() TaskStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetStatusOk() (*TaskStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetStatus(v TaskStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStatusMessage + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetStatusMessage() string` + +GetStatusMessage returns the StatusMessage field if non-nil, zero value otherwise. + +### GetStatusMessageOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetStatusMessageOk() (*string, bool)` + +GetStatusMessageOk returns a tuple with the StatusMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusMessage + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetStatusMessage(v string)` + +SetStatusMessage sets StatusMessage field to given value. + +### HasStatusMessage + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasStatusMessage() bool` + +HasStatusMessage returns a boolean if a field has been set. + +### GetLastRun + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetLastRun() time.Time` + +GetLastRun returns the LastRun field if non-nil, zero value otherwise. + +### GetLastRunOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetLastRunOk() (*time.Time, bool)` + +GetLastRunOk returns a tuple with the LastRun field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastRun + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetLastRun(v time.Time)` + +SetLastRun sets LastRun field to given value. + +### HasLastRun + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasLastRun() bool` + +HasLastRun returns a boolean if a field has been set. + +### GetFrequency + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetFrequency() string` + +GetFrequency returns the Frequency field if non-nil, zero value otherwise. + +### GetFrequencyOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetFrequencyOk() (*string, bool)` + +GetFrequencyOk returns a tuple with the Frequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrequency + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetFrequency(v string)` + +SetFrequency sets Frequency field to given value. + +### HasFrequency + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasFrequency() bool` + +HasFrequency returns a boolean if a field has been set. + +### GetType + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetId(v string)` + +SetId sets Id field to given value. + + +### GetActsOn + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetActsOn() []string` + +GetActsOn returns the ActsOn field if non-nil, zero value otherwise. + +### GetActsOnOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetActsOnOk() (*[]string, bool)` + +GetActsOnOk returns a tuple with the ActsOn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActsOn + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetActsOn(v []string)` + +SetActsOn sets ActsOn field to given value. + +### HasActsOn + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasActsOn() bool` + +HasActsOn returns a boolean if a field has been set. + +### GetIncludeTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetIncludeTags() []string` + +GetIncludeTags returns the IncludeTags field if non-nil, zero value otherwise. + +### GetIncludeTagsOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetIncludeTagsOk() (*[]string, bool)` + +GetIncludeTagsOk returns a tuple with the IncludeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetIncludeTags(v []string)` + +SetIncludeTags sets IncludeTags field to given value. + +### HasIncludeTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasIncludeTags() bool` + +HasIncludeTags returns a boolean if a field has been set. + +### GetExcludeTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetExcludeTags() []string` + +GetExcludeTags returns the ExcludeTags field if non-nil, zero value otherwise. + +### GetExcludeTagsOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetExcludeTagsOk() (*[]string, bool)` + +GetExcludeTagsOk returns a tuple with the ExcludeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetExcludeTags(v []string)` + +SetExcludeTags sets ExcludeTags field to given value. + +### HasExcludeTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasExcludeTags() bool` + +HasExcludeTags returns a boolean if a field has been set. + +### GetIgnoreTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetIgnoreTags() []string` + +GetIgnoreTags returns the IgnoreTags field if non-nil, zero value otherwise. + +### GetIgnoreTagsOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetIgnoreTagsOk() (*[]string, bool)` + +GetIgnoreTagsOk returns a tuple with the IgnoreTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIgnoreTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetIgnoreTags(v []string)` + +SetIgnoreTags sets IgnoreTags field to given value. + +### HasIgnoreTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasIgnoreTags() bool` + +HasIgnoreTags returns a boolean if a field has been set. + +### GetFreshTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetFreshTags() bool` + +GetFreshTags returns the FreshTags field if non-nil, zero value otherwise. + +### GetFreshTagsOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetFreshTagsOk() (*bool, bool)` + +GetFreshTagsOk returns a tuple with the FreshTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFreshTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetFreshTags(v bool)` + +SetFreshTags sets FreshTags field to given value. + +### HasFreshTags + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasFreshTags() bool` + +HasFreshTags returns a boolean if a field has been set. + +### GetTemplateName + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetTemplateName() string` + +GetTemplateName returns the TemplateName field if non-nil, zero value otherwise. + +### GetTemplateNameOk + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetTemplateNameOk() (*string, bool)` + +GetTemplateNameOk returns a tuple with the TemplateName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateName + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetTemplateName(v string)` + +SetTemplateName sets TemplateName field to given value. + + +### GetSha256 + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *ResponseToggleApiV2TasksTaskNameTogglePost) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SHA1Input.md b/docs/SHA1Input.md new file mode 100644 index 0000000..66fdcaa --- /dev/null +++ b/docs/SHA1Input.md @@ -0,0 +1,155 @@ +# SHA1Input + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "sha1"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewSHA1Input + +`func NewSHA1Input(value string, ) *SHA1Input` + +NewSHA1Input instantiates a new SHA1Input object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSHA1InputWithDefaults + +`func NewSHA1InputWithDefaults() *SHA1Input` + +NewSHA1InputWithDefaults instantiates a new SHA1Input object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *SHA1Input) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SHA1Input) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *SHA1Input) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *SHA1Input) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SHA1Input) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SHA1Input) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SHA1Input) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *SHA1Input) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SHA1Input) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SHA1Input) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SHA1Input) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *SHA1Input) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *SHA1Input) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *SHA1Input) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *SHA1Input) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *SHA1Input) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *SHA1Input) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *SHA1Input) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *SHA1Input) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SHA1Output.md b/docs/SHA1Output.md new file mode 100644 index 0000000..7335fa9 --- /dev/null +++ b/docs/SHA1Output.md @@ -0,0 +1,218 @@ +# SHA1Output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "sha1"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewSHA1Output + +`func NewSHA1Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *SHA1Output` + +NewSHA1Output instantiates a new SHA1Output object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSHA1OutputWithDefaults + +`func NewSHA1OutputWithDefaults() *SHA1Output` + +NewSHA1OutputWithDefaults instantiates a new SHA1Output object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *SHA1Output) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SHA1Output) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *SHA1Output) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *SHA1Output) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SHA1Output) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SHA1Output) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SHA1Output) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *SHA1Output) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SHA1Output) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SHA1Output) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SHA1Output) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *SHA1Output) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *SHA1Output) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *SHA1Output) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *SHA1Output) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *SHA1Output) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *SHA1Output) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *SHA1Output) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *SHA1Output) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *SHA1Output) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SHA1Output) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SHA1Output) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *SHA1Output) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *SHA1Output) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *SHA1Output) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *SHA1Output) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *SHA1Output) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *SHA1Output) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SHA256Input.md b/docs/SHA256Input.md new file mode 100644 index 0000000..24428ff --- /dev/null +++ b/docs/SHA256Input.md @@ -0,0 +1,155 @@ +# SHA256Input + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "sha256"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewSHA256Input + +`func NewSHA256Input(value string, ) *SHA256Input` + +NewSHA256Input instantiates a new SHA256Input object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSHA256InputWithDefaults + +`func NewSHA256InputWithDefaults() *SHA256Input` + +NewSHA256InputWithDefaults instantiates a new SHA256Input object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *SHA256Input) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SHA256Input) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *SHA256Input) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *SHA256Input) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SHA256Input) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SHA256Input) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SHA256Input) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *SHA256Input) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SHA256Input) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SHA256Input) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SHA256Input) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *SHA256Input) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *SHA256Input) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *SHA256Input) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *SHA256Input) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *SHA256Input) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *SHA256Input) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *SHA256Input) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *SHA256Input) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SHA256Output.md b/docs/SHA256Output.md new file mode 100644 index 0000000..bad1408 --- /dev/null +++ b/docs/SHA256Output.md @@ -0,0 +1,218 @@ +# SHA256Output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "sha256"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewSHA256Output + +`func NewSHA256Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *SHA256Output` + +NewSHA256Output instantiates a new SHA256Output object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSHA256OutputWithDefaults + +`func NewSHA256OutputWithDefaults() *SHA256Output` + +NewSHA256OutputWithDefaults instantiates a new SHA256Output object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *SHA256Output) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SHA256Output) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *SHA256Output) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *SHA256Output) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SHA256Output) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SHA256Output) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SHA256Output) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *SHA256Output) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SHA256Output) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SHA256Output) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SHA256Output) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *SHA256Output) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *SHA256Output) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *SHA256Output) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *SHA256Output) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *SHA256Output) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *SHA256Output) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *SHA256Output) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *SHA256Output) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *SHA256Output) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SHA256Output) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SHA256Output) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *SHA256Output) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *SHA256Output) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *SHA256Output) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *SHA256Output) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *SHA256Output) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *SHA256Output) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchQuery.md b/docs/SearchQuery.md new file mode 100644 index 0000000..8ab0f40 --- /dev/null +++ b/docs/SearchQuery.md @@ -0,0 +1,30 @@ +# SearchQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewSearchQuery + +`func NewSearchQuery() *SearchQuery` + +NewSearchQuery instantiates a new SearchQuery object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSearchQueryWithDefaults + +`func NewSearchQueryWithDefaults() *SearchQuery` + +NewSearchQueryWithDefaults instantiates a new SearchQuery object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchUserRequest.md b/docs/SearchUserRequest.md new file mode 100644 index 0000000..0602285 --- /dev/null +++ b/docs/SearchUserRequest.md @@ -0,0 +1,103 @@ +# SearchUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | +**Count** | Pointer to **int32** | | [optional] [default to 50] +**Page** | Pointer to **int32** | | [optional] [default to 0] + +## Methods + +### NewSearchUserRequest + +`func NewSearchUserRequest(username string, ) *SearchUserRequest` + +NewSearchUserRequest instantiates a new SearchUserRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSearchUserRequestWithDefaults + +`func NewSearchUserRequestWithDefaults() *SearchUserRequest` + +NewSearchUserRequestWithDefaults instantiates a new SearchUserRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUsername + +`func (o *SearchUserRequest) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *SearchUserRequest) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *SearchUserRequest) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetCount + +`func (o *SearchUserRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *SearchUserRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *SearchUserRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *SearchUserRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetPage + +`func (o *SearchUserRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *SearchUserRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *SearchUserRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *SearchUserRequest) HasPage() bool` + +HasPage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchUserResponse.md b/docs/SearchUserResponse.md new file mode 100644 index 0000000..d1c7eaa --- /dev/null +++ b/docs/SearchUserResponse.md @@ -0,0 +1,72 @@ +# SearchUserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Users** | [**[]User**](User.md) | | +**Total** | **int32** | | + +## Methods + +### NewSearchUserResponse + +`func NewSearchUserResponse(users []User, total int32, ) *SearchUserResponse` + +NewSearchUserResponse instantiates a new SearchUserResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSearchUserResponseWithDefaults + +`func NewSearchUserResponseWithDefaults() *SearchUserResponse` + +NewSearchUserResponseWithDefaults instantiates a new SearchUserResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUsers + +`func (o *SearchUserResponse) GetUsers() []User` + +GetUsers returns the Users field if non-nil, zero value otherwise. + +### GetUsersOk + +`func (o *SearchUserResponse) GetUsersOk() (*[]User, bool)` + +GetUsersOk returns a tuple with the Users field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsers + +`func (o *SearchUserResponse) SetUsers(v []User)` + +SetUsers sets Users field to given value. + + +### GetTotal + +`func (o *SearchUserResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *SearchUserResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *SearchUserResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SeverityType.md b/docs/SeverityType.md new file mode 100644 index 0000000..d0af9c4 --- /dev/null +++ b/docs/SeverityType.md @@ -0,0 +1,19 @@ +# SeverityType + +## Enum + + +* `NONE` (value: `"none"`) + +* `LOW` (value: `"low"`) + +* `MEDIUM` (value: `"medium"`) + +* `HIGH` (value: `"high"`) + +* `CRITICAL` (value: `"critical"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SigmaInput.md b/docs/SigmaInput.md new file mode 100644 index 0000000..3fda3fc --- /dev/null +++ b/docs/SigmaInput.md @@ -0,0 +1,327 @@ +# SigmaInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "sigma"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewSigmaInput + +`func NewSigmaInput(name string, pattern string, diamond DiamondModel, ) *SigmaInput` + +NewSigmaInput instantiates a new SigmaInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSigmaInputWithDefaults + +`func NewSigmaInputWithDefaults() *SigmaInput` + +NewSigmaInputWithDefaults instantiates a new SigmaInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *SigmaInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SigmaInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SigmaInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *SigmaInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SigmaInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SigmaInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SigmaInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *SigmaInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *SigmaInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *SigmaInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *SigmaInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *SigmaInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SigmaInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SigmaInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SigmaInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *SigmaInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *SigmaInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *SigmaInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *SigmaInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *SigmaInput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *SigmaInput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *SigmaInput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *SigmaInput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *SigmaInput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *SigmaInput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *SigmaInput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *SigmaInput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *SigmaInput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *SigmaInput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *SigmaInput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *SigmaInput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *SigmaInput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *SigmaInput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *SigmaInput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *SigmaInput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *SigmaInput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *SigmaInput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *SigmaInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *SigmaInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *SigmaInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *SigmaInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *SigmaInput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *SigmaInput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *SigmaInput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *SigmaInput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SigmaOutput.md b/docs/SigmaOutput.md new file mode 100644 index 0000000..cd77ce8 --- /dev/null +++ b/docs/SigmaOutput.md @@ -0,0 +1,390 @@ +# SigmaOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "sigma"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewSigmaOutput + +`func NewSigmaOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, ) *SigmaOutput` + +NewSigmaOutput instantiates a new SigmaOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSigmaOutputWithDefaults + +`func NewSigmaOutputWithDefaults() *SigmaOutput` + +NewSigmaOutputWithDefaults instantiates a new SigmaOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *SigmaOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SigmaOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SigmaOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *SigmaOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SigmaOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SigmaOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SigmaOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *SigmaOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *SigmaOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *SigmaOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *SigmaOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *SigmaOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SigmaOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SigmaOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SigmaOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *SigmaOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *SigmaOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *SigmaOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *SigmaOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *SigmaOutput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *SigmaOutput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *SigmaOutput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *SigmaOutput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *SigmaOutput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *SigmaOutput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *SigmaOutput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *SigmaOutput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *SigmaOutput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *SigmaOutput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *SigmaOutput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *SigmaOutput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *SigmaOutput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *SigmaOutput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *SigmaOutput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *SigmaOutput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *SigmaOutput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *SigmaOutput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *SigmaOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *SigmaOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *SigmaOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *SigmaOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *SigmaOutput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *SigmaOutput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *SigmaOutput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *SigmaOutput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetId + +`func (o *SigmaOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SigmaOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SigmaOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *SigmaOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *SigmaOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *SigmaOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *SigmaOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *SigmaOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *SigmaOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SsdeepInput.md b/docs/SsdeepInput.md new file mode 100644 index 0000000..808a56d --- /dev/null +++ b/docs/SsdeepInput.md @@ -0,0 +1,155 @@ +# SsdeepInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "ssdeep"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewSsdeepInput + +`func NewSsdeepInput(value string, ) *SsdeepInput` + +NewSsdeepInput instantiates a new SsdeepInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSsdeepInputWithDefaults + +`func NewSsdeepInputWithDefaults() *SsdeepInput` + +NewSsdeepInputWithDefaults instantiates a new SsdeepInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *SsdeepInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SsdeepInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *SsdeepInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *SsdeepInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SsdeepInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SsdeepInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SsdeepInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *SsdeepInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SsdeepInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SsdeepInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SsdeepInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *SsdeepInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *SsdeepInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *SsdeepInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *SsdeepInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *SsdeepInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *SsdeepInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *SsdeepInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *SsdeepInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SsdeepOutput.md b/docs/SsdeepOutput.md new file mode 100644 index 0000000..0a6e3f6 --- /dev/null +++ b/docs/SsdeepOutput.md @@ -0,0 +1,218 @@ +# SsdeepOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "ssdeep"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewSsdeepOutput + +`func NewSsdeepOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *SsdeepOutput` + +NewSsdeepOutput instantiates a new SsdeepOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSsdeepOutputWithDefaults + +`func NewSsdeepOutputWithDefaults() *SsdeepOutput` + +NewSsdeepOutputWithDefaults instantiates a new SsdeepOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *SsdeepOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SsdeepOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *SsdeepOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *SsdeepOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SsdeepOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SsdeepOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SsdeepOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *SsdeepOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SsdeepOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SsdeepOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SsdeepOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *SsdeepOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *SsdeepOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *SsdeepOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *SsdeepOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *SsdeepOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *SsdeepOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *SsdeepOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *SsdeepOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *SsdeepOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SsdeepOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SsdeepOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *SsdeepOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *SsdeepOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *SsdeepOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *SsdeepOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *SsdeepOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *SsdeepOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuricataInput.md b/docs/SuricataInput.md new file mode 100644 index 0000000..becab3e --- /dev/null +++ b/docs/SuricataInput.md @@ -0,0 +1,405 @@ +# SuricataInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "suricata"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Sid** | Pointer to **int32** | | [optional] [default to 0] +**Metadata** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewSuricataInput + +`func NewSuricataInput(name string, pattern string, diamond DiamondModel, ) *SuricataInput` + +NewSuricataInput instantiates a new SuricataInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSuricataInputWithDefaults + +`func NewSuricataInputWithDefaults() *SuricataInput` + +NewSuricataInputWithDefaults instantiates a new SuricataInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *SuricataInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SuricataInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SuricataInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *SuricataInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SuricataInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SuricataInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SuricataInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *SuricataInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *SuricataInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *SuricataInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *SuricataInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *SuricataInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SuricataInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SuricataInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SuricataInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *SuricataInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *SuricataInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *SuricataInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *SuricataInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *SuricataInput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *SuricataInput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *SuricataInput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *SuricataInput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *SuricataInput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *SuricataInput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *SuricataInput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *SuricataInput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *SuricataInput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *SuricataInput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *SuricataInput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *SuricataInput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *SuricataInput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *SuricataInput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *SuricataInput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *SuricataInput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *SuricataInput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *SuricataInput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *SuricataInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *SuricataInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *SuricataInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *SuricataInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *SuricataInput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *SuricataInput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *SuricataInput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *SuricataInput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetSid + +`func (o *SuricataInput) GetSid() int32` + +GetSid returns the Sid field if non-nil, zero value otherwise. + +### GetSidOk + +`func (o *SuricataInput) GetSidOk() (*int32, bool)` + +GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSid + +`func (o *SuricataInput) SetSid(v int32)` + +SetSid sets Sid field to given value. + +### HasSid + +`func (o *SuricataInput) HasSid() bool` + +HasSid returns a boolean if a field has been set. + +### GetMetadata + +`func (o *SuricataInput) GetMetadata() []string` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *SuricataInput) GetMetadataOk() (*[]string, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *SuricataInput) SetMetadata(v []string)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *SuricataInput) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetReferences + +`func (o *SuricataInput) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *SuricataInput) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *SuricataInput) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *SuricataInput) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuricataOutput.md b/docs/SuricataOutput.md new file mode 100644 index 0000000..3efcde8 --- /dev/null +++ b/docs/SuricataOutput.md @@ -0,0 +1,468 @@ +# SuricataOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "suricata"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Sid** | Pointer to **int32** | | [optional] [default to 0] +**Metadata** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewSuricataOutput + +`func NewSuricataOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, ) *SuricataOutput` + +NewSuricataOutput instantiates a new SuricataOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSuricataOutputWithDefaults + +`func NewSuricataOutputWithDefaults() *SuricataOutput` + +NewSuricataOutputWithDefaults instantiates a new SuricataOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *SuricataOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SuricataOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SuricataOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *SuricataOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SuricataOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SuricataOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SuricataOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *SuricataOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *SuricataOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *SuricataOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *SuricataOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *SuricataOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *SuricataOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *SuricataOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *SuricataOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *SuricataOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *SuricataOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *SuricataOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *SuricataOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *SuricataOutput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *SuricataOutput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *SuricataOutput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *SuricataOutput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *SuricataOutput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *SuricataOutput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *SuricataOutput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *SuricataOutput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *SuricataOutput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *SuricataOutput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *SuricataOutput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *SuricataOutput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *SuricataOutput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *SuricataOutput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *SuricataOutput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *SuricataOutput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *SuricataOutput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *SuricataOutput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *SuricataOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *SuricataOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *SuricataOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *SuricataOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *SuricataOutput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *SuricataOutput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *SuricataOutput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *SuricataOutput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetSid + +`func (o *SuricataOutput) GetSid() int32` + +GetSid returns the Sid field if non-nil, zero value otherwise. + +### GetSidOk + +`func (o *SuricataOutput) GetSidOk() (*int32, bool)` + +GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSid + +`func (o *SuricataOutput) SetSid(v int32)` + +SetSid sets Sid field to given value. + +### HasSid + +`func (o *SuricataOutput) HasSid() bool` + +HasSid returns a boolean if a field has been set. + +### GetMetadata + +`func (o *SuricataOutput) GetMetadata() []string` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *SuricataOutput) GetMetadataOk() (*[]string, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *SuricataOutput) SetMetadata(v []string)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *SuricataOutput) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetReferences + +`func (o *SuricataOutput) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *SuricataOutput) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *SuricataOutput) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *SuricataOutput) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + +### GetId + +`func (o *SuricataOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SuricataOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SuricataOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *SuricataOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *SuricataOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *SuricataOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *SuricataOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *SuricataOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *SuricataOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SystemAPI.md b/docs/SystemAPI.md new file mode 100644 index 0000000..83f90e1 --- /dev/null +++ b/docs/SystemAPI.md @@ -0,0 +1,201 @@ +# \SystemAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetConfigApiV2SystemConfigGet**](SystemAPI.md#GetConfigApiV2SystemConfigGet) | **Get** /api/v2/system/config | Get Config +[**GetWorkerStatusApiV2SystemWorkersGet**](SystemAPI.md#GetWorkerStatusApiV2SystemWorkersGet) | **Get** /api/v2/system/workers | Get Worker Status +[**RestartWorkerApiV2SystemRestartworkerWorkerNamePost**](SystemAPI.md#RestartWorkerApiV2SystemRestartworkerWorkerNamePost) | **Post** /api/v2/system/restartworker/{worker_name} | Restart Worker + + + +## GetConfigApiV2SystemConfigGet + +> SystemConfigResponse GetConfigApiV2SystemConfigGet(ctx).Execute() + +Get Config + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemAPI.GetConfigApiV2SystemConfigGet(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.GetConfigApiV2SystemConfigGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetConfigApiV2SystemConfigGet`: SystemConfigResponse + fmt.Fprintf(os.Stdout, "Response from `SystemAPI.GetConfigApiV2SystemConfigGet`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetConfigApiV2SystemConfigGetRequest struct via the builder pattern + + +### Return type + +[**SystemConfigResponse**](SystemConfigResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetWorkerStatusApiV2SystemWorkersGet + +> WorkerStatusResponse GetWorkerStatusApiV2SystemWorkersGet(ctx).Execute() + +Get Worker Status + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemAPI.GetWorkerStatusApiV2SystemWorkersGet(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.GetWorkerStatusApiV2SystemWorkersGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetWorkerStatusApiV2SystemWorkersGet`: WorkerStatusResponse + fmt.Fprintf(os.Stdout, "Response from `SystemAPI.GetWorkerStatusApiV2SystemWorkersGet`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetWorkerStatusApiV2SystemWorkersGetRequest struct via the builder pattern + + +### Return type + +[**WorkerStatusResponse**](WorkerStatusResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RestartWorkerApiV2SystemRestartworkerWorkerNamePost + +> WorkerRestartResponse RestartWorkerApiV2SystemRestartworkerWorkerNamePost(ctx, workerName).Execute() + +Restart Worker + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + workerName := "workerName_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SystemAPI.RestartWorkerApiV2SystemRestartworkerWorkerNamePost(context.Background(), workerName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.RestartWorkerApiV2SystemRestartworkerWorkerNamePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RestartWorkerApiV2SystemRestartworkerWorkerNamePost`: WorkerRestartResponse + fmt.Fprintf(os.Stdout, "Response from `SystemAPI.RestartWorkerApiV2SystemRestartworkerWorkerNamePost`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workerName** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRestartWorkerApiV2SystemRestartworkerWorkerNamePostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**WorkerRestartResponse**](WorkerRestartResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/SystemConfigResponse.md b/docs/SystemConfigResponse.md new file mode 100644 index 0000000..45953ed --- /dev/null +++ b/docs/SystemConfigResponse.md @@ -0,0 +1,72 @@ +# SystemConfigResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Auth** | **map[string]interface{}** | | +**System** | **map[string]interface{}** | | + +## Methods + +### NewSystemConfigResponse + +`func NewSystemConfigResponse(auth map[string]interface{}, system map[string]interface{}, ) *SystemConfigResponse` + +NewSystemConfigResponse instantiates a new SystemConfigResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSystemConfigResponseWithDefaults + +`func NewSystemConfigResponseWithDefaults() *SystemConfigResponse` + +NewSystemConfigResponseWithDefaults instantiates a new SystemConfigResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAuth + +`func (o *SystemConfigResponse) GetAuth() map[string]interface{}` + +GetAuth returns the Auth field if non-nil, zero value otherwise. + +### GetAuthOk + +`func (o *SystemConfigResponse) GetAuthOk() (*map[string]interface{}, bool)` + +GetAuthOk returns a tuple with the Auth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuth + +`func (o *SystemConfigResponse) SetAuth(v map[string]interface{})` + +SetAuth sets Auth field to given value. + + +### GetSystem + +`func (o *SystemConfigResponse) GetSystem() map[string]interface{}` + +GetSystem returns the System field if non-nil, zero value otherwise. + +### GetSystemOk + +`func (o *SystemConfigResponse) GetSystemOk() (*map[string]interface{}, bool)` + +GetSystemOk returns a tuple with the System field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSystem + +`func (o *SystemConfigResponse) SetSystem(v map[string]interface{})` + +SetSystem sets System field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TLSHInput.md b/docs/TLSHInput.md new file mode 100644 index 0000000..13cdfa1 --- /dev/null +++ b/docs/TLSHInput.md @@ -0,0 +1,155 @@ +# TLSHInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "tlsh"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewTLSHInput + +`func NewTLSHInput(value string, ) *TLSHInput` + +NewTLSHInput instantiates a new TLSHInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTLSHInputWithDefaults + +`func NewTLSHInputWithDefaults() *TLSHInput` + +NewTLSHInputWithDefaults instantiates a new TLSHInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *TLSHInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *TLSHInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *TLSHInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *TLSHInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TLSHInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TLSHInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TLSHInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *TLSHInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *TLSHInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *TLSHInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *TLSHInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *TLSHInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *TLSHInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *TLSHInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *TLSHInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *TLSHInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *TLSHInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *TLSHInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *TLSHInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TLSHOutput.md b/docs/TLSHOutput.md new file mode 100644 index 0000000..45d7b3a --- /dev/null +++ b/docs/TLSHOutput.md @@ -0,0 +1,218 @@ +# TLSHOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "tlsh"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewTLSHOutput + +`func NewTLSHOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *TLSHOutput` + +NewTLSHOutput instantiates a new TLSHOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTLSHOutputWithDefaults + +`func NewTLSHOutputWithDefaults() *TLSHOutput` + +NewTLSHOutputWithDefaults instantiates a new TLSHOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *TLSHOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *TLSHOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *TLSHOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *TLSHOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TLSHOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TLSHOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TLSHOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *TLSHOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *TLSHOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *TLSHOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *TLSHOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *TLSHOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *TLSHOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *TLSHOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *TLSHOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *TLSHOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *TLSHOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *TLSHOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *TLSHOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *TLSHOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TLSHOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *TLSHOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *TLSHOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *TLSHOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *TLSHOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *TLSHOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *TLSHOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *TLSHOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Tag.md b/docs/Tag.md new file mode 100644 index 0000000..96beb8f --- /dev/null +++ b/docs/Tag.md @@ -0,0 +1,202 @@ +# Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Count** | Pointer to **int32** | | [optional] [default to 0] +**Created** | Pointer to **time.Time** | | [optional] +**DefaultExpiration** | Pointer to **string** | | [optional] [default to "P90D"] +**Produces** | Pointer to **[]string** | | [optional] [default to []] +**Replaces** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] + +## Methods + +### NewTag + +`func NewTag(name string, id string, ) *Tag` + +NewTag instantiates a new Tag object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTagWithDefaults + +`func NewTagWithDefaults() *Tag` + +NewTagWithDefaults instantiates a new Tag object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Tag) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Tag) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Tag) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCount + +`func (o *Tag) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *Tag) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *Tag) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *Tag) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetCreated + +`func (o *Tag) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Tag) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Tag) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Tag) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetDefaultExpiration + +`func (o *Tag) GetDefaultExpiration() string` + +GetDefaultExpiration returns the DefaultExpiration field if non-nil, zero value otherwise. + +### GetDefaultExpirationOk + +`func (o *Tag) GetDefaultExpirationOk() (*string, bool)` + +GetDefaultExpirationOk returns a tuple with the DefaultExpiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultExpiration + +`func (o *Tag) SetDefaultExpiration(v string)` + +SetDefaultExpiration sets DefaultExpiration field to given value. + +### HasDefaultExpiration + +`func (o *Tag) HasDefaultExpiration() bool` + +HasDefaultExpiration returns a boolean if a field has been set. + +### GetProduces + +`func (o *Tag) GetProduces() []string` + +GetProduces returns the Produces field if non-nil, zero value otherwise. + +### GetProducesOk + +`func (o *Tag) GetProducesOk() (*[]string, bool)` + +GetProducesOk returns a tuple with the Produces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProduces + +`func (o *Tag) SetProduces(v []string)` + +SetProduces sets Produces field to given value. + +### HasProduces + +`func (o *Tag) HasProduces() bool` + +HasProduces returns a boolean if a field has been set. + +### GetReplaces + +`func (o *Tag) GetReplaces() []string` + +GetReplaces returns the Replaces field if non-nil, zero value otherwise. + +### GetReplacesOk + +`func (o *Tag) GetReplacesOk() (*[]string, bool)` + +GetReplacesOk returns a tuple with the Replaces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplaces + +`func (o *Tag) SetReplaces(v []string)` + +SetReplaces sets Replaces field to given value. + +### HasReplaces + +`func (o *Tag) HasReplaces() bool` + +HasReplaces returns a boolean if a field has been set. + +### GetId + +`func (o *Tag) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Tag) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Tag) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TagRelationshipInput.md b/docs/TagRelationshipInput.md new file mode 100644 index 0000000..7aa3e84 --- /dev/null +++ b/docs/TagRelationshipInput.md @@ -0,0 +1,150 @@ +# TagRelationshipInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | +**Target** | **string** | | +**LastSeen** | **time.Time** | | +**Expires** | Pointer to **NullableTime** | | [optional] +**Fresh** | **bool** | | + +## Methods + +### NewTagRelationshipInput + +`func NewTagRelationshipInput(source string, target string, lastSeen time.Time, fresh bool, ) *TagRelationshipInput` + +NewTagRelationshipInput instantiates a new TagRelationshipInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTagRelationshipInputWithDefaults + +`func NewTagRelationshipInputWithDefaults() *TagRelationshipInput` + +NewTagRelationshipInputWithDefaults instantiates a new TagRelationshipInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSource + +`func (o *TagRelationshipInput) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *TagRelationshipInput) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *TagRelationshipInput) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetTarget + +`func (o *TagRelationshipInput) GetTarget() string` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *TagRelationshipInput) GetTargetOk() (*string, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTarget + +`func (o *TagRelationshipInput) SetTarget(v string)` + +SetTarget sets Target field to given value. + + +### GetLastSeen + +`func (o *TagRelationshipInput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *TagRelationshipInput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *TagRelationshipInput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + + +### GetExpires + +`func (o *TagRelationshipInput) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *TagRelationshipInput) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *TagRelationshipInput) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + +### HasExpires + +`func (o *TagRelationshipInput) HasExpires() bool` + +HasExpires returns a boolean if a field has been set. + +### SetExpiresNil + +`func (o *TagRelationshipInput) SetExpiresNil(b bool)` + + SetExpiresNil sets the value for Expires to be an explicit nil + +### UnsetExpires +`func (o *TagRelationshipInput) UnsetExpires()` + +UnsetExpires ensures that no value is present for Expires, not even an explicit nil +### GetFresh + +`func (o *TagRelationshipInput) GetFresh() bool` + +GetFresh returns the Fresh field if non-nil, zero value otherwise. + +### GetFreshOk + +`func (o *TagRelationshipInput) GetFreshOk() (*bool, bool)` + +GetFreshOk returns a tuple with the Fresh field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFresh + +`func (o *TagRelationshipInput) SetFresh(v bool)` + +SetFresh sets Fresh field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TagRelationshipOutput.md b/docs/TagRelationshipOutput.md new file mode 100644 index 0000000..5fc5519 --- /dev/null +++ b/docs/TagRelationshipOutput.md @@ -0,0 +1,171 @@ +# TagRelationshipOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | | +**Target** | **string** | | +**LastSeen** | **time.Time** | | +**Expires** | Pointer to **NullableTime** | | [optional] +**Fresh** | **bool** | | +**Id** | **string** | | [readonly] + +## Methods + +### NewTagRelationshipOutput + +`func NewTagRelationshipOutput(source string, target string, lastSeen time.Time, fresh bool, id string, ) *TagRelationshipOutput` + +NewTagRelationshipOutput instantiates a new TagRelationshipOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTagRelationshipOutputWithDefaults + +`func NewTagRelationshipOutputWithDefaults() *TagRelationshipOutput` + +NewTagRelationshipOutputWithDefaults instantiates a new TagRelationshipOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSource + +`func (o *TagRelationshipOutput) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *TagRelationshipOutput) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *TagRelationshipOutput) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetTarget + +`func (o *TagRelationshipOutput) GetTarget() string` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *TagRelationshipOutput) GetTargetOk() (*string, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTarget + +`func (o *TagRelationshipOutput) SetTarget(v string)` + +SetTarget sets Target field to given value. + + +### GetLastSeen + +`func (o *TagRelationshipOutput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *TagRelationshipOutput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *TagRelationshipOutput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + + +### GetExpires + +`func (o *TagRelationshipOutput) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *TagRelationshipOutput) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *TagRelationshipOutput) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + +### HasExpires + +`func (o *TagRelationshipOutput) HasExpires() bool` + +HasExpires returns a boolean if a field has been set. + +### SetExpiresNil + +`func (o *TagRelationshipOutput) SetExpiresNil(b bool)` + + SetExpiresNil sets the value for Expires to be an explicit nil + +### UnsetExpires +`func (o *TagRelationshipOutput) UnsetExpires()` + +UnsetExpires ensures that no value is present for Expires, not even an explicit nil +### GetFresh + +`func (o *TagRelationshipOutput) GetFresh() bool` + +GetFresh returns the Fresh field if non-nil, zero value otherwise. + +### GetFreshOk + +`func (o *TagRelationshipOutput) GetFreshOk() (*bool, bool)` + +GetFreshOk returns a tuple with the Fresh field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFresh + +`func (o *TagRelationshipOutput) SetFresh(v bool)` + +SetFresh sets Fresh field to given value. + + +### GetId + +`func (o *TagRelationshipOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TagRelationshipOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *TagRelationshipOutput) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TagSearchRequest.md b/docs/TagSearchRequest.md new file mode 100644 index 0000000..d8a9ae8 --- /dev/null +++ b/docs/TagSearchRequest.md @@ -0,0 +1,150 @@ +# TagSearchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to [**Name**](Name.md) | | [optional] +**Produces** | Pointer to **[]string** | | [optional] [default to []] +**Replaces** | Pointer to **[]string** | | [optional] [default to []] +**Count** | **int32** | | +**Page** | **int32** | | + +## Methods + +### NewTagSearchRequest + +`func NewTagSearchRequest(count int32, page int32, ) *TagSearchRequest` + +NewTagSearchRequest instantiates a new TagSearchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTagSearchRequestWithDefaults + +`func NewTagSearchRequestWithDefaults() *TagSearchRequest` + +NewTagSearchRequestWithDefaults instantiates a new TagSearchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *TagSearchRequest) GetName() Name` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TagSearchRequest) GetNameOk() (*Name, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TagSearchRequest) SetName(v Name)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TagSearchRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProduces + +`func (o *TagSearchRequest) GetProduces() []string` + +GetProduces returns the Produces field if non-nil, zero value otherwise. + +### GetProducesOk + +`func (o *TagSearchRequest) GetProducesOk() (*[]string, bool)` + +GetProducesOk returns a tuple with the Produces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProduces + +`func (o *TagSearchRequest) SetProduces(v []string)` + +SetProduces sets Produces field to given value. + +### HasProduces + +`func (o *TagSearchRequest) HasProduces() bool` + +HasProduces returns a boolean if a field has been set. + +### GetReplaces + +`func (o *TagSearchRequest) GetReplaces() []string` + +GetReplaces returns the Replaces field if non-nil, zero value otherwise. + +### GetReplacesOk + +`func (o *TagSearchRequest) GetReplacesOk() (*[]string, bool)` + +GetReplacesOk returns a tuple with the Replaces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplaces + +`func (o *TagSearchRequest) SetReplaces(v []string)` + +SetReplaces sets Replaces field to given value. + +### HasReplaces + +`func (o *TagSearchRequest) HasReplaces() bool` + +HasReplaces returns a boolean if a field has been set. + +### GetCount + +`func (o *TagSearchRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *TagSearchRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *TagSearchRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + + +### GetPage + +`func (o *TagSearchRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *TagSearchRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *TagSearchRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TagSearchResponse.md b/docs/TagSearchResponse.md new file mode 100644 index 0000000..d89bb74 --- /dev/null +++ b/docs/TagSearchResponse.md @@ -0,0 +1,72 @@ +# TagSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | [**[]Tag**](Tag.md) | | +**Total** | **int32** | | + +## Methods + +### NewTagSearchResponse + +`func NewTagSearchResponse(tags []Tag, total int32, ) *TagSearchResponse` + +NewTagSearchResponse instantiates a new TagSearchResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTagSearchResponseWithDefaults + +`func NewTagSearchResponseWithDefaults() *TagSearchResponse` + +NewTagSearchResponseWithDefaults instantiates a new TagSearchResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTags + +`func (o *TagSearchResponse) GetTags() []Tag` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *TagSearchResponse) GetTagsOk() (*[]Tag, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *TagSearchResponse) SetTags(v []Tag)` + +SetTags sets Tags field to given value. + + +### GetTotal + +`func (o *TagSearchResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *TagSearchResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *TagSearchResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TagsAPI.md b/docs/TagsAPI.md new file mode 100644 index 0000000..4c5a437 --- /dev/null +++ b/docs/TagsAPI.md @@ -0,0 +1,422 @@ +# \TagsAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteApiV2TagsTagIdDelete**](TagsAPI.md#DeleteApiV2TagsTagIdDelete) | **Delete** /api/v2/tags/{tag_id} | Delete +[**DetailsApiV2TagsTagIdGet**](TagsAPI.md#DetailsApiV2TagsTagIdGet) | **Get** /api/v2/tags/{tag_id} | Details +[**MergeApiV2TagsMergePost**](TagsAPI.md#MergeApiV2TagsMergePost) | **Post** /api/v2/tags/merge | Merge +[**NewApiV2TagsPost**](TagsAPI.md#NewApiV2TagsPost) | **Post** /api/v2/tags/ | New +[**SearchApiV2TagsSearchPost**](TagsAPI.md#SearchApiV2TagsSearchPost) | **Post** /api/v2/tags/search | Search +[**UpdateApiV2TagsTagIdPut**](TagsAPI.md#UpdateApiV2TagsTagIdPut) | **Put** /api/v2/tags/{tag_id} | Update + + + +## DeleteApiV2TagsTagIdDelete + +> interface{} DeleteApiV2TagsTagIdDelete(ctx, tagId).Execute() + +Delete + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + tagId := "tagId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TagsAPI.DeleteApiV2TagsTagIdDelete(context.Background(), tagId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.DeleteApiV2TagsTagIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApiV2TagsTagIdDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `TagsAPI.DeleteApiV2TagsTagIdDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tagId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApiV2TagsTagIdDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DetailsApiV2TagsTagIdGet + +> Tag DetailsApiV2TagsTagIdGet(ctx, tagId).Execute() + +Details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + tagId := "tagId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TagsAPI.DetailsApiV2TagsTagIdGet(context.Background(), tagId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.DetailsApiV2TagsTagIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailsApiV2TagsTagIdGet`: Tag + fmt.Fprintf(os.Stdout, "Response from `TagsAPI.DetailsApiV2TagsTagIdGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tagId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDetailsApiV2TagsTagIdGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## MergeApiV2TagsMergePost + +> MergeTagResult MergeApiV2TagsMergePost(ctx).MergeTagRequest(mergeTagRequest).Execute() + +Merge + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + mergeTagRequest := *openapiclient.NewMergeTagRequest([]string{"Merge_example"}, "MergeInto_example") // MergeTagRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TagsAPI.MergeApiV2TagsMergePost(context.Background()).MergeTagRequest(mergeTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.MergeApiV2TagsMergePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `MergeApiV2TagsMergePost`: MergeTagResult + fmt.Fprintf(os.Stdout, "Response from `TagsAPI.MergeApiV2TagsMergePost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiMergeApiV2TagsMergePostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergeTagRequest** | [**MergeTagRequest**](MergeTagRequest.md) | | + +### Return type + +[**MergeTagResult**](MergeTagResult.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## NewApiV2TagsPost + +> Tag NewApiV2TagsPost(ctx).NewRequest(newRequest).Execute() + +New + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newRequest := *openapiclient.NewNewRequest("Name_example") // NewRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TagsAPI.NewApiV2TagsPost(context.Background()).NewRequest(newRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.NewApiV2TagsPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `NewApiV2TagsPost`: Tag + fmt.Fprintf(os.Stdout, "Response from `TagsAPI.NewApiV2TagsPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiNewApiV2TagsPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newRequest** | [**NewRequest**](NewRequest.md) | | + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2TagsSearchPost + +> TagSearchResponse SearchApiV2TagsSearchPost(ctx).TagSearchRequest(tagSearchRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + tagSearchRequest := *openapiclient.NewTagSearchRequest(int32(123), int32(123)) // TagSearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TagsAPI.SearchApiV2TagsSearchPost(context.Background()).TagSearchRequest(tagSearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.SearchApiV2TagsSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2TagsSearchPost`: TagSearchResponse + fmt.Fprintf(os.Stdout, "Response from `TagsAPI.SearchApiV2TagsSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2TagsSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tagSearchRequest** | [**TagSearchRequest**](TagSearchRequest.md) | | + +### Return type + +[**TagSearchResponse**](TagSearchResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApiV2TagsTagIdPut + +> Tag UpdateApiV2TagsTagIdPut(ctx, tagId).UpdateRequest(updateRequest).Execute() + +Update + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + tagId := "tagId_example" // string | + updateRequest := *openapiclient.NewUpdateRequest("Name_example") // UpdateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TagsAPI.UpdateApiV2TagsTagIdPut(context.Background(), tagId).UpdateRequest(updateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.UpdateApiV2TagsTagIdPut``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApiV2TagsTagIdPut`: Tag + fmt.Fprintf(os.Stdout, "Response from `TagsAPI.UpdateApiV2TagsTagIdPut`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tagId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateApiV2TagsTagIdPutRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateRequest** | [**UpdateRequest**](UpdateRequest.md) | | + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/TaskParams.md b/docs/TaskParams.md new file mode 100644 index 0000000..2ba718f --- /dev/null +++ b/docs/TaskParams.md @@ -0,0 +1,56 @@ +# TaskParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Params** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewTaskParams + +`func NewTaskParams() *TaskParams` + +NewTaskParams instantiates a new TaskParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTaskParamsWithDefaults + +`func NewTaskParamsWithDefaults() *TaskParams` + +NewTaskParamsWithDefaults instantiates a new TaskParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetParams + +`func (o *TaskParams) GetParams() map[string]interface{}` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *TaskParams) GetParamsOk() (*map[string]interface{}, bool)` + +GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParams + +`func (o *TaskParams) SetParams(v map[string]interface{})` + +SetParams sets Params field to given value. + +### HasParams + +`func (o *TaskParams) HasParams() bool` + +HasParams returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskSearchRequest.md b/docs/TaskSearchRequest.md new file mode 100644 index 0000000..73c83e9 --- /dev/null +++ b/docs/TaskSearchRequest.md @@ -0,0 +1,160 @@ +# TaskSearchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | Pointer to [**map[string]QueryValue**](QueryValue.md) | | [optional] [default to {}] +**Type** | Pointer to [**TaskSearchRequestType**](TaskSearchRequestType.md) | | [optional] +**Sorting** | Pointer to **[][]interface{}** | | [optional] [default to []] +**Count** | Pointer to **int32** | | [optional] [default to 100] +**Page** | Pointer to **int32** | | [optional] [default to 0] + +## Methods + +### NewTaskSearchRequest + +`func NewTaskSearchRequest() *TaskSearchRequest` + +NewTaskSearchRequest instantiates a new TaskSearchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTaskSearchRequestWithDefaults + +`func NewTaskSearchRequestWithDefaults() *TaskSearchRequest` + +NewTaskSearchRequestWithDefaults instantiates a new TaskSearchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *TaskSearchRequest) GetQuery() map[string]QueryValue` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *TaskSearchRequest) GetQueryOk() (*map[string]QueryValue, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *TaskSearchRequest) SetQuery(v map[string]QueryValue)` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *TaskSearchRequest) HasQuery() bool` + +HasQuery returns a boolean if a field has been set. + +### GetType + +`func (o *TaskSearchRequest) GetType() TaskSearchRequestType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TaskSearchRequest) GetTypeOk() (*TaskSearchRequestType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TaskSearchRequest) SetType(v TaskSearchRequestType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TaskSearchRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSorting + +`func (o *TaskSearchRequest) GetSorting() [][]interface{}` + +GetSorting returns the Sorting field if non-nil, zero value otherwise. + +### GetSortingOk + +`func (o *TaskSearchRequest) GetSortingOk() (*[][]interface{}, bool)` + +GetSortingOk returns a tuple with the Sorting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSorting + +`func (o *TaskSearchRequest) SetSorting(v [][]interface{})` + +SetSorting sets Sorting field to given value. + +### HasSorting + +`func (o *TaskSearchRequest) HasSorting() bool` + +HasSorting returns a boolean if a field has been set. + +### GetCount + +`func (o *TaskSearchRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *TaskSearchRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *TaskSearchRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *TaskSearchRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetPage + +`func (o *TaskSearchRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *TaskSearchRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *TaskSearchRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *TaskSearchRequest) HasPage() bool` + +HasPage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskSearchRequestType.md b/docs/TaskSearchRequestType.md new file mode 100644 index 0000000..8d594ba --- /dev/null +++ b/docs/TaskSearchRequestType.md @@ -0,0 +1,30 @@ +# TaskSearchRequestType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewTaskSearchRequestType + +`func NewTaskSearchRequestType() *TaskSearchRequestType` + +NewTaskSearchRequestType instantiates a new TaskSearchRequestType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTaskSearchRequestTypeWithDefaults + +`func NewTaskSearchRequestTypeWithDefaults() *TaskSearchRequestType` + +NewTaskSearchRequestTypeWithDefaults instantiates a new TaskSearchRequestType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskSearchResponse.md b/docs/TaskSearchResponse.md new file mode 100644 index 0000000..76c0678 --- /dev/null +++ b/docs/TaskSearchResponse.md @@ -0,0 +1,72 @@ +# TaskSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tasks** | [**[]TasksInner**](TasksInner.md) | | +**Total** | **int32** | | + +## Methods + +### NewTaskSearchResponse + +`func NewTaskSearchResponse(tasks []TasksInner, total int32, ) *TaskSearchResponse` + +NewTaskSearchResponse instantiates a new TaskSearchResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTaskSearchResponseWithDefaults + +`func NewTaskSearchResponseWithDefaults() *TaskSearchResponse` + +NewTaskSearchResponseWithDefaults instantiates a new TaskSearchResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTasks + +`func (o *TaskSearchResponse) GetTasks() []TasksInner` + +GetTasks returns the Tasks field if non-nil, zero value otherwise. + +### GetTasksOk + +`func (o *TaskSearchResponse) GetTasksOk() (*[]TasksInner, bool)` + +GetTasksOk returns a tuple with the Tasks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTasks + +`func (o *TaskSearchResponse) SetTasks(v []TasksInner)` + +SetTasks sets Tasks field to given value. + + +### GetTotal + +`func (o *TaskSearchResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *TaskSearchResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *TaskSearchResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskStatus.md b/docs/TaskStatus.md new file mode 100644 index 0000000..15760e2 --- /dev/null +++ b/docs/TaskStatus.md @@ -0,0 +1,17 @@ +# TaskStatus + +## Enum + + +* `IDLE` (value: `"idle"`) + +* `RUNNING` (value: `"running"`) + +* `COMPLETED` (value: `"completed"`) + +* `FAILED` (value: `"failed"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskType.md b/docs/TaskType.md new file mode 100644 index 0000000..76ef8e7 --- /dev/null +++ b/docs/TaskType.md @@ -0,0 +1,19 @@ +# TaskType + +## Enum + + +* `FEED` (value: `"feed"`) + +* `ANALYTICS` (value: `"analytics"`) + +* `EXPORT` (value: `"export"`) + +* `ONESHOT` (value: `"oneshot"`) + +* `INLINE` (value: `"inline"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TasksAPI.md b/docs/TasksAPI.md new file mode 100644 index 0000000..6c91acd --- /dev/null +++ b/docs/TasksAPI.md @@ -0,0 +1,501 @@ +# \TasksAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteExportApiV2TasksExportExportNameDelete**](TasksAPI.md#DeleteExportApiV2TasksExportExportNameDelete) | **Delete** /api/v2/tasks/export/{export_name} | Delete Export +[**ExportContentApiV2TasksExportExportIdContentGet**](TasksAPI.md#ExportContentApiV2TasksExportExportIdContentGet) | **Get** /api/v2/tasks/export/{export_id}/content | Export Content +[**NewExportApiV2TasksExportNewPost**](TasksAPI.md#NewExportApiV2TasksExportNewPost) | **Post** /api/v2/tasks/export/new | New Export +[**PatchExportApiV2TasksExportExportNamePatch**](TasksAPI.md#PatchExportApiV2TasksExportExportNamePatch) | **Patch** /api/v2/tasks/export/{export_name} | Patch Export +[**RunApiV2TasksTaskNameRunPost**](TasksAPI.md#RunApiV2TasksTaskNameRunPost) | **Post** /api/v2/tasks/{task_name}/run | Run +[**SearchApiV2TasksSearchPost**](TasksAPI.md#SearchApiV2TasksSearchPost) | **Post** /api/v2/tasks/search | Search +[**ToggleApiV2TasksTaskNameTogglePost**](TasksAPI.md#ToggleApiV2TasksTaskNameTogglePost) | **Post** /api/v2/tasks/{task_name}/toggle | Toggle + + + +## DeleteExportApiV2TasksExportExportNameDelete + +> interface{} DeleteExportApiV2TasksExportExportNameDelete(ctx, exportName).Execute() + +Delete Export + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + exportName := "exportName_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TasksAPI.DeleteExportApiV2TasksExportExportNameDelete(context.Background(), exportName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.DeleteExportApiV2TasksExportExportNameDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteExportApiV2TasksExportExportNameDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `TasksAPI.DeleteExportApiV2TasksExportExportNameDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**exportName** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteExportApiV2TasksExportExportNameDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportContentApiV2TasksExportExportIdContentGet + +> interface{} ExportContentApiV2TasksExportExportIdContentGet(ctx, exportId).Execute() + +Export Content + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + exportId := "exportId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TasksAPI.ExportContentApiV2TasksExportExportIdContentGet(context.Background(), exportId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.ExportContentApiV2TasksExportExportIdContentGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportContentApiV2TasksExportExportIdContentGet`: interface{} + fmt.Fprintf(os.Stdout, "Response from `TasksAPI.ExportContentApiV2TasksExportExportIdContentGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**exportId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportContentApiV2TasksExportExportIdContentGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## NewExportApiV2TasksExportNewPost + +> ExportTaskOutput NewExportApiV2TasksExportNewPost(ctx).NewExportRequest(newExportRequest).Execute() + +New Export + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newExportRequest := *openapiclient.NewNewExportRequest(*openapiclient.NewExportTaskInput("Name_example", "TemplateName_example")) // NewExportRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TasksAPI.NewExportApiV2TasksExportNewPost(context.Background()).NewExportRequest(newExportRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.NewExportApiV2TasksExportNewPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `NewExportApiV2TasksExportNewPost`: ExportTaskOutput + fmt.Fprintf(os.Stdout, "Response from `TasksAPI.NewExportApiV2TasksExportNewPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiNewExportApiV2TasksExportNewPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newExportRequest** | [**NewExportRequest**](NewExportRequest.md) | | + +### Return type + +[**ExportTaskOutput**](ExportTaskOutput.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchExportApiV2TasksExportExportNamePatch + +> ExportTaskOutput PatchExportApiV2TasksExportExportNamePatch(ctx, exportName).PatchExportRequest(patchExportRequest).Execute() + +Patch Export + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + exportName := "exportName_example" // string | + patchExportRequest := *openapiclient.NewPatchExportRequest(*openapiclient.NewExportTaskInput("Name_example", "TemplateName_example")) // PatchExportRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TasksAPI.PatchExportApiV2TasksExportExportNamePatch(context.Background(), exportName).PatchExportRequest(patchExportRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.PatchExportApiV2TasksExportExportNamePatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchExportApiV2TasksExportExportNamePatch`: ExportTaskOutput + fmt.Fprintf(os.Stdout, "Response from `TasksAPI.PatchExportApiV2TasksExportExportNamePatch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**exportName** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchExportApiV2TasksExportExportNamePatchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchExportRequest** | [**PatchExportRequest**](PatchExportRequest.md) | | + +### Return type + +[**ExportTaskOutput**](ExportTaskOutput.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RunApiV2TasksTaskNameRunPost + +> map[string]interface{} RunApiV2TasksTaskNameRunPost(ctx, taskName).TaskParams(taskParams).Execute() + +Run + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + taskName := TODO // interface{} | + taskParams := *openapiclient.NewTaskParams() // TaskParams | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TasksAPI.RunApiV2TasksTaskNameRunPost(context.Background(), taskName).TaskParams(taskParams).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.RunApiV2TasksTaskNameRunPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RunApiV2TasksTaskNameRunPost`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `TasksAPI.RunApiV2TasksTaskNameRunPost`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**taskName** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRunApiV2TasksTaskNameRunPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **taskParams** | [**TaskParams**](TaskParams.md) | | + +### Return type + +**map[string]interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2TasksSearchPost + +> TaskSearchResponse SearchApiV2TasksSearchPost(ctx).TaskSearchRequest(taskSearchRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + taskSearchRequest := *openapiclient.NewTaskSearchRequest() // TaskSearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TasksAPI.SearchApiV2TasksSearchPost(context.Background()).TaskSearchRequest(taskSearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.SearchApiV2TasksSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2TasksSearchPost`: TaskSearchResponse + fmt.Fprintf(os.Stdout, "Response from `TasksAPI.SearchApiV2TasksSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2TasksSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **taskSearchRequest** | [**TaskSearchRequest**](TaskSearchRequest.md) | | + +### Return type + +[**TaskSearchResponse**](TaskSearchResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ToggleApiV2TasksTaskNameTogglePost + +> ResponseToggleApiV2TasksTaskNameTogglePost ToggleApiV2TasksTaskNameTogglePost(ctx, taskName).Execute() + +Toggle + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + taskName := TODO // interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TasksAPI.ToggleApiV2TasksTaskNameTogglePost(context.Background(), taskName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.ToggleApiV2TasksTaskNameTogglePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ToggleApiV2TasksTaskNameTogglePost`: ResponseToggleApiV2TasksTaskNameTogglePost + fmt.Fprintf(os.Stdout, "Response from `TasksAPI.ToggleApiV2TasksTaskNameTogglePost`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**taskName** | [**interface{}**](.md) | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiToggleApiV2TasksTaskNameTogglePostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseToggleApiV2TasksTaskNameTogglePost**](ResponseToggleApiV2TasksTaskNameTogglePost.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/TasksInner.md b/docs/TasksInner.md new file mode 100644 index 0000000..ec5d5ce --- /dev/null +++ b/docs/TasksInner.md @@ -0,0 +1,431 @@ +# TasksInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Enabled** | Pointer to **bool** | | [optional] [default to false] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Status** | Pointer to [**TaskStatus**](TaskStatus.md) | | [optional] +**StatusMessage** | Pointer to **string** | | [optional] [default to ""] +**LastRun** | Pointer to **time.Time** | | [optional] +**Frequency** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "feed"] +**Id** | **string** | | [readonly] +**ActsOn** | Pointer to **[]string** | | [optional] [default to []] +**IncludeTags** | Pointer to **[]string** | | [optional] [default to []] +**ExcludeTags** | Pointer to **[]string** | | [optional] [default to []] +**IgnoreTags** | Pointer to **[]string** | | [optional] [default to []] +**FreshTags** | Pointer to **bool** | | [optional] [default to true] +**TemplateName** | **string** | | +**Sha256** | Pointer to **string** | | [optional] + +## Methods + +### NewTasksInner + +`func NewTasksInner(name string, id string, templateName string, ) *TasksInner` + +NewTasksInner instantiates a new TasksInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTasksInnerWithDefaults + +`func NewTasksInnerWithDefaults() *TasksInner` + +NewTasksInnerWithDefaults instantiates a new TasksInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *TasksInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TasksInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TasksInner) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEnabled + +`func (o *TasksInner) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *TasksInner) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *TasksInner) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *TasksInner) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetDescription + +`func (o *TasksInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TasksInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *TasksInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TasksInner) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *TasksInner) GetStatus() TaskStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *TasksInner) GetStatusOk() (*TaskStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *TasksInner) SetStatus(v TaskStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *TasksInner) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStatusMessage + +`func (o *TasksInner) GetStatusMessage() string` + +GetStatusMessage returns the StatusMessage field if non-nil, zero value otherwise. + +### GetStatusMessageOk + +`func (o *TasksInner) GetStatusMessageOk() (*string, bool)` + +GetStatusMessageOk returns a tuple with the StatusMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusMessage + +`func (o *TasksInner) SetStatusMessage(v string)` + +SetStatusMessage sets StatusMessage field to given value. + +### HasStatusMessage + +`func (o *TasksInner) HasStatusMessage() bool` + +HasStatusMessage returns a boolean if a field has been set. + +### GetLastRun + +`func (o *TasksInner) GetLastRun() time.Time` + +GetLastRun returns the LastRun field if non-nil, zero value otherwise. + +### GetLastRunOk + +`func (o *TasksInner) GetLastRunOk() (*time.Time, bool)` + +GetLastRunOk returns a tuple with the LastRun field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastRun + +`func (o *TasksInner) SetLastRun(v time.Time)` + +SetLastRun sets LastRun field to given value. + +### HasLastRun + +`func (o *TasksInner) HasLastRun() bool` + +HasLastRun returns a boolean if a field has been set. + +### GetFrequency + +`func (o *TasksInner) GetFrequency() string` + +GetFrequency returns the Frequency field if non-nil, zero value otherwise. + +### GetFrequencyOk + +`func (o *TasksInner) GetFrequencyOk() (*string, bool)` + +GetFrequencyOk returns a tuple with the Frequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrequency + +`func (o *TasksInner) SetFrequency(v string)` + +SetFrequency sets Frequency field to given value. + +### HasFrequency + +`func (o *TasksInner) HasFrequency() bool` + +HasFrequency returns a boolean if a field has been set. + +### GetType + +`func (o *TasksInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TasksInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TasksInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TasksInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *TasksInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TasksInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *TasksInner) SetId(v string)` + +SetId sets Id field to given value. + + +### GetActsOn + +`func (o *TasksInner) GetActsOn() []string` + +GetActsOn returns the ActsOn field if non-nil, zero value otherwise. + +### GetActsOnOk + +`func (o *TasksInner) GetActsOnOk() (*[]string, bool)` + +GetActsOnOk returns a tuple with the ActsOn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActsOn + +`func (o *TasksInner) SetActsOn(v []string)` + +SetActsOn sets ActsOn field to given value. + +### HasActsOn + +`func (o *TasksInner) HasActsOn() bool` + +HasActsOn returns a boolean if a field has been set. + +### GetIncludeTags + +`func (o *TasksInner) GetIncludeTags() []string` + +GetIncludeTags returns the IncludeTags field if non-nil, zero value otherwise. + +### GetIncludeTagsOk + +`func (o *TasksInner) GetIncludeTagsOk() (*[]string, bool)` + +GetIncludeTagsOk returns a tuple with the IncludeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeTags + +`func (o *TasksInner) SetIncludeTags(v []string)` + +SetIncludeTags sets IncludeTags field to given value. + +### HasIncludeTags + +`func (o *TasksInner) HasIncludeTags() bool` + +HasIncludeTags returns a boolean if a field has been set. + +### GetExcludeTags + +`func (o *TasksInner) GetExcludeTags() []string` + +GetExcludeTags returns the ExcludeTags field if non-nil, zero value otherwise. + +### GetExcludeTagsOk + +`func (o *TasksInner) GetExcludeTagsOk() (*[]string, bool)` + +GetExcludeTagsOk returns a tuple with the ExcludeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeTags + +`func (o *TasksInner) SetExcludeTags(v []string)` + +SetExcludeTags sets ExcludeTags field to given value. + +### HasExcludeTags + +`func (o *TasksInner) HasExcludeTags() bool` + +HasExcludeTags returns a boolean if a field has been set. + +### GetIgnoreTags + +`func (o *TasksInner) GetIgnoreTags() []string` + +GetIgnoreTags returns the IgnoreTags field if non-nil, zero value otherwise. + +### GetIgnoreTagsOk + +`func (o *TasksInner) GetIgnoreTagsOk() (*[]string, bool)` + +GetIgnoreTagsOk returns a tuple with the IgnoreTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIgnoreTags + +`func (o *TasksInner) SetIgnoreTags(v []string)` + +SetIgnoreTags sets IgnoreTags field to given value. + +### HasIgnoreTags + +`func (o *TasksInner) HasIgnoreTags() bool` + +HasIgnoreTags returns a boolean if a field has been set. + +### GetFreshTags + +`func (o *TasksInner) GetFreshTags() bool` + +GetFreshTags returns the FreshTags field if non-nil, zero value otherwise. + +### GetFreshTagsOk + +`func (o *TasksInner) GetFreshTagsOk() (*bool, bool)` + +GetFreshTagsOk returns a tuple with the FreshTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFreshTags + +`func (o *TasksInner) SetFreshTags(v bool)` + +SetFreshTags sets FreshTags field to given value. + +### HasFreshTags + +`func (o *TasksInner) HasFreshTags() bool` + +HasFreshTags returns a boolean if a field has been set. + +### GetTemplateName + +`func (o *TasksInner) GetTemplateName() string` + +GetTemplateName returns the TemplateName field if non-nil, zero value otherwise. + +### GetTemplateNameOk + +`func (o *TasksInner) GetTemplateNameOk() (*string, bool)` + +GetTemplateNameOk returns a tuple with the TemplateName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateName + +`func (o *TasksInner) SetTemplateName(v string)` + +SetTemplateName sets TemplateName field to given value. + + +### GetSha256 + +`func (o *TasksInner) GetSha256() string` + +GetSha256 returns the Sha256 field if non-nil, zero value otherwise. + +### GetSha256Ok + +`func (o *TasksInner) GetSha256Ok() (*string, bool)` + +GetSha256Ok returns a tuple with the Sha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256 + +`func (o *TasksInner) SetSha256(v string)` + +SetSha256 sets Sha256 field to given value. + +### HasSha256 + +`func (o *TasksInner) HasSha256() bool` + +HasSha256 returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Template.md b/docs/Template.md new file mode 100644 index 0000000..2f724bc --- /dev/null +++ b/docs/Template.md @@ -0,0 +1,72 @@ +# Template + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Template** | **string** | | + +## Methods + +### NewTemplate + +`func NewTemplate(name string, template string, ) *Template` + +NewTemplate instantiates a new Template object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTemplateWithDefaults + +`func NewTemplateWithDefaults() *Template` + +NewTemplateWithDefaults instantiates a new Template object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Template) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Template) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Template) SetName(v string)` + +SetName sets Name field to given value. + + +### GetTemplate + +`func (o *Template) GetTemplate() string` + +GetTemplate returns the Template field if non-nil, zero value otherwise. + +### GetTemplateOk + +`func (o *Template) GetTemplateOk() (*string, bool)` + +GetTemplateOk returns a tuple with the Template field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplate + +`func (o *Template) SetTemplate(v string)` + +SetTemplate sets Template field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateSearchRequest.md b/docs/TemplateSearchRequest.md new file mode 100644 index 0000000..d362a66 --- /dev/null +++ b/docs/TemplateSearchRequest.md @@ -0,0 +1,108 @@ +# TemplateSearchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] [default to ""] +**Count** | Pointer to **int32** | | [optional] [default to 50] +**Page** | Pointer to **int32** | | [optional] [default to 0] + +## Methods + +### NewTemplateSearchRequest + +`func NewTemplateSearchRequest() *TemplateSearchRequest` + +NewTemplateSearchRequest instantiates a new TemplateSearchRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTemplateSearchRequestWithDefaults + +`func NewTemplateSearchRequestWithDefaults() *TemplateSearchRequest` + +NewTemplateSearchRequestWithDefaults instantiates a new TemplateSearchRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *TemplateSearchRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TemplateSearchRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TemplateSearchRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TemplateSearchRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCount + +`func (o *TemplateSearchRequest) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *TemplateSearchRequest) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *TemplateSearchRequest) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *TemplateSearchRequest) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetPage + +`func (o *TemplateSearchRequest) GetPage() int32` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *TemplateSearchRequest) GetPageOk() (*int32, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *TemplateSearchRequest) SetPage(v int32)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *TemplateSearchRequest) HasPage() bool` + +HasPage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateSearchResponse.md b/docs/TemplateSearchResponse.md new file mode 100644 index 0000000..eb43923 --- /dev/null +++ b/docs/TemplateSearchResponse.md @@ -0,0 +1,72 @@ +# TemplateSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Templates** | [**[]Template**](Template.md) | | +**Total** | **int32** | | + +## Methods + +### NewTemplateSearchResponse + +`func NewTemplateSearchResponse(templates []Template, total int32, ) *TemplateSearchResponse` + +NewTemplateSearchResponse instantiates a new TemplateSearchResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTemplateSearchResponseWithDefaults + +`func NewTemplateSearchResponseWithDefaults() *TemplateSearchResponse` + +NewTemplateSearchResponseWithDefaults instantiates a new TemplateSearchResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTemplates + +`func (o *TemplateSearchResponse) GetTemplates() []Template` + +GetTemplates returns the Templates field if non-nil, zero value otherwise. + +### GetTemplatesOk + +`func (o *TemplateSearchResponse) GetTemplatesOk() (*[]Template, bool)` + +GetTemplatesOk returns a tuple with the Templates field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplates + +`func (o *TemplateSearchResponse) SetTemplates(v []Template)` + +SetTemplates sets Templates field to given value. + + +### GetTotal + +`func (o *TemplateSearchResponse) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *TemplateSearchResponse) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *TemplateSearchResponse) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplatesAPI.md b/docs/TemplatesAPI.md new file mode 100644 index 0000000..52f6760 --- /dev/null +++ b/docs/TemplatesAPI.md @@ -0,0 +1,142 @@ +# \TemplatesAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RenderApiV2TemplatesRenderPost**](TemplatesAPI.md#RenderApiV2TemplatesRenderPost) | **Post** /api/v2/templates/render | Render +[**SearchApiV2TemplatesSearchPost**](TemplatesAPI.md#SearchApiV2TemplatesSearchPost) | **Post** /api/v2/templates/search | Search + + + +## RenderApiV2TemplatesRenderPost + +> interface{} RenderApiV2TemplatesRenderPost(ctx).RenderTemplateRequest(renderTemplateRequest).Execute() + +Render + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + renderTemplateRequest := *openapiclient.NewRenderTemplateRequest("TemplateName_example") // RenderTemplateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TemplatesAPI.RenderApiV2TemplatesRenderPost(context.Background()).RenderTemplateRequest(renderTemplateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TemplatesAPI.RenderApiV2TemplatesRenderPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RenderApiV2TemplatesRenderPost`: interface{} + fmt.Fprintf(os.Stdout, "Response from `TemplatesAPI.RenderApiV2TemplatesRenderPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRenderApiV2TemplatesRenderPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **renderTemplateRequest** | [**RenderTemplateRequest**](RenderTemplateRequest.md) | | + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2TemplatesSearchPost + +> TemplateSearchResponse SearchApiV2TemplatesSearchPost(ctx).TemplateSearchRequest(templateSearchRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + templateSearchRequest := *openapiclient.NewTemplateSearchRequest() // TemplateSearchRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TemplatesAPI.SearchApiV2TemplatesSearchPost(context.Background()).TemplateSearchRequest(templateSearchRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TemplatesAPI.SearchApiV2TemplatesSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2TemplatesSearchPost`: TemplateSearchResponse + fmt.Fprintf(os.Stdout, "Response from `TemplatesAPI.SearchApiV2TemplatesSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2TemplatesSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateSearchRequest** | [**TemplateSearchRequest**](TemplateSearchRequest.md) | | + +### Return type + +[**TemplateSearchResponse**](TemplateSearchResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/ThreatActorInput.md b/docs/ThreatActorInput.md new file mode 100644 index 0000000..7104b19 --- /dev/null +++ b/docs/ThreatActorInput.md @@ -0,0 +1,285 @@ +# ThreatActorInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "threat-actor"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ThreatActorTypes** | Pointer to **[]string** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewThreatActorInput + +`func NewThreatActorInput(name string, ) *ThreatActorInput` + +NewThreatActorInput instantiates a new ThreatActorInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewThreatActorInputWithDefaults + +`func NewThreatActorInputWithDefaults() *ThreatActorInput` + +NewThreatActorInputWithDefaults instantiates a new ThreatActorInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ThreatActorInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ThreatActorInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ThreatActorInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ThreatActorInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *ThreatActorInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ThreatActorInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ThreatActorInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ThreatActorInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ThreatActorInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ThreatActorInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ThreatActorInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *ThreatActorInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ThreatActorInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ThreatActorInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ThreatActorInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *ThreatActorInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ThreatActorInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ThreatActorInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ThreatActorInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ThreatActorInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ThreatActorInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ThreatActorInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ThreatActorInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetThreatActorTypes + +`func (o *ThreatActorInput) GetThreatActorTypes() []string` + +GetThreatActorTypes returns the ThreatActorTypes field if non-nil, zero value otherwise. + +### GetThreatActorTypesOk + +`func (o *ThreatActorInput) GetThreatActorTypesOk() (*[]string, bool)` + +GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreatActorTypes + +`func (o *ThreatActorInput) SetThreatActorTypes(v []string)` + +SetThreatActorTypes sets ThreatActorTypes field to given value. + +### HasThreatActorTypes + +`func (o *ThreatActorInput) HasThreatActorTypes() bool` + +HasThreatActorTypes returns a boolean if a field has been set. + +### GetAliases + +`func (o *ThreatActorInput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ThreatActorInput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ThreatActorInput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ThreatActorInput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ThreatActorInput) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ThreatActorInput) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ThreatActorInput) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ThreatActorInput) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *ThreatActorInput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ThreatActorInput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ThreatActorInput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ThreatActorInput) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThreatActorOutput.md b/docs/ThreatActorOutput.md new file mode 100644 index 0000000..af863d1 --- /dev/null +++ b/docs/ThreatActorOutput.md @@ -0,0 +1,369 @@ +# ThreatActorOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "threat-actor"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ThreatActorTypes** | Pointer to **[]string** | | [optional] [default to []] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewThreatActorOutput + +`func NewThreatActorOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *ThreatActorOutput` + +NewThreatActorOutput instantiates a new ThreatActorOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewThreatActorOutputWithDefaults + +`func NewThreatActorOutputWithDefaults() *ThreatActorOutput` + +NewThreatActorOutputWithDefaults instantiates a new ThreatActorOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ThreatActorOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ThreatActorOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ThreatActorOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ThreatActorOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *ThreatActorOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ThreatActorOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ThreatActorOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ThreatActorOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ThreatActorOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ThreatActorOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ThreatActorOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *ThreatActorOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ThreatActorOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ThreatActorOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ThreatActorOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *ThreatActorOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ThreatActorOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ThreatActorOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ThreatActorOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ThreatActorOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ThreatActorOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ThreatActorOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ThreatActorOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetThreatActorTypes + +`func (o *ThreatActorOutput) GetThreatActorTypes() []string` + +GetThreatActorTypes returns the ThreatActorTypes field if non-nil, zero value otherwise. + +### GetThreatActorTypesOk + +`func (o *ThreatActorOutput) GetThreatActorTypesOk() (*[]string, bool)` + +GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreatActorTypes + +`func (o *ThreatActorOutput) SetThreatActorTypes(v []string)` + +SetThreatActorTypes sets ThreatActorTypes field to given value. + +### HasThreatActorTypes + +`func (o *ThreatActorOutput) HasThreatActorTypes() bool` + +HasThreatActorTypes returns a boolean if a field has been set. + +### GetAliases + +`func (o *ThreatActorOutput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ThreatActorOutput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ThreatActorOutput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ThreatActorOutput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *ThreatActorOutput) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *ThreatActorOutput) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *ThreatActorOutput) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *ThreatActorOutput) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *ThreatActorOutput) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *ThreatActorOutput) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *ThreatActorOutput) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *ThreatActorOutput) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetId + +`func (o *ThreatActorOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ThreatActorOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ThreatActorOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ThreatActorOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ThreatActorOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ThreatActorOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ThreatActorOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ThreatActorOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ThreatActorOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *ThreatActorOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *ThreatActorOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *ThreatActorOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ToggleUserRequest.md b/docs/ToggleUserRequest.md new file mode 100644 index 0000000..d05c75b --- /dev/null +++ b/docs/ToggleUserRequest.md @@ -0,0 +1,72 @@ +# ToggleUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **string** | | +**Field** | [**ToggleableField**](ToggleableField.md) | | + +## Methods + +### NewToggleUserRequest + +`func NewToggleUserRequest(userId string, field ToggleableField, ) *ToggleUserRequest` + +NewToggleUserRequest instantiates a new ToggleUserRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewToggleUserRequestWithDefaults + +`func NewToggleUserRequestWithDefaults() *ToggleUserRequest` + +NewToggleUserRequestWithDefaults instantiates a new ToggleUserRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUserId + +`func (o *ToggleUserRequest) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *ToggleUserRequest) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *ToggleUserRequest) SetUserId(v string)` + +SetUserId sets UserId field to given value. + + +### GetField + +`func (o *ToggleUserRequest) GetField() ToggleableField` + +GetField returns the Field field if non-nil, zero value otherwise. + +### GetFieldOk + +`func (o *ToggleUserRequest) GetFieldOk() (*ToggleableField, bool)` + +GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetField + +`func (o *ToggleUserRequest) SetField(v ToggleableField)` + +SetField sets Field field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ToggleableField.md b/docs/ToggleableField.md new file mode 100644 index 0000000..becd7e5 --- /dev/null +++ b/docs/ToggleableField.md @@ -0,0 +1,13 @@ +# ToggleableField + +## Enum + + +* `ENABLED` (value: `"enabled"`) + +* `ADMIN` (value: `"admin"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ToolInput.md b/docs/ToolInput.md new file mode 100644 index 0000000..af00c6a --- /dev/null +++ b/docs/ToolInput.md @@ -0,0 +1,259 @@ +# ToolInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "tool"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**ToolVersion** | Pointer to **string** | | [optional] [default to ""] + +## Methods + +### NewToolInput + +`func NewToolInput(name string, ) *ToolInput` + +NewToolInput instantiates a new ToolInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewToolInputWithDefaults + +`func NewToolInputWithDefaults() *ToolInput` + +NewToolInputWithDefaults instantiates a new ToolInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ToolInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ToolInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ToolInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ToolInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *ToolInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ToolInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ToolInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ToolInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ToolInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ToolInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ToolInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *ToolInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ToolInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ToolInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ToolInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *ToolInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ToolInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ToolInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ToolInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ToolInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ToolInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ToolInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ToolInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *ToolInput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ToolInput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ToolInput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ToolInput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *ToolInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ToolInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ToolInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ToolInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetToolVersion + +`func (o *ToolInput) GetToolVersion() string` + +GetToolVersion returns the ToolVersion field if non-nil, zero value otherwise. + +### GetToolVersionOk + +`func (o *ToolInput) GetToolVersionOk() (*string, bool)` + +GetToolVersionOk returns a tuple with the ToolVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolVersion + +`func (o *ToolInput) SetToolVersion(v string)` + +SetToolVersion sets ToolVersion field to given value. + +### HasToolVersion + +`func (o *ToolInput) HasToolVersion() bool` + +HasToolVersion returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ToolOutput.md b/docs/ToolOutput.md new file mode 100644 index 0000000..0acca8f --- /dev/null +++ b/docs/ToolOutput.md @@ -0,0 +1,343 @@ +# ToolOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "tool"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**ToolVersion** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewToolOutput + +`func NewToolOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *ToolOutput` + +NewToolOutput instantiates a new ToolOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewToolOutputWithDefaults + +`func NewToolOutputWithDefaults() *ToolOutput` + +NewToolOutputWithDefaults instantiates a new ToolOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ToolOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ToolOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ToolOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ToolOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *ToolOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ToolOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ToolOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ToolOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ToolOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ToolOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ToolOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *ToolOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *ToolOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *ToolOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *ToolOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *ToolOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ToolOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ToolOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *ToolOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *ToolOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *ToolOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *ToolOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *ToolOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetAliases + +`func (o *ToolOutput) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *ToolOutput) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *ToolOutput) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *ToolOutput) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *ToolOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *ToolOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *ToolOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *ToolOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetToolVersion + +`func (o *ToolOutput) GetToolVersion() string` + +GetToolVersion returns the ToolVersion field if non-nil, zero value otherwise. + +### GetToolVersionOk + +`func (o *ToolOutput) GetToolVersionOk() (*string, bool)` + +GetToolVersionOk returns a tuple with the ToolVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolVersion + +`func (o *ToolOutput) SetToolVersion(v string)` + +SetToolVersion sets ToolVersion field to given value. + +### HasToolVersion + +`func (o *ToolOutput) HasToolVersion() bool` + +HasToolVersion returns a boolean if a field has been set. + +### GetId + +`func (o *ToolOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ToolOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ToolOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *ToolOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ToolOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ToolOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *ToolOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *ToolOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *ToolOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *ToolOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *ToolOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *ToolOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateRequest.md b/docs/UpdateRequest.md new file mode 100644 index 0000000..132b842 --- /dev/null +++ b/docs/UpdateRequest.md @@ -0,0 +1,129 @@ +# UpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**DefaultExpiration** | Pointer to **string** | | [optional] [default to "P90D"] +**Produces** | Pointer to **[]string** | | [optional] [default to []] +**Replaces** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewUpdateRequest + +`func NewUpdateRequest(name string, ) *UpdateRequest` + +NewUpdateRequest instantiates a new UpdateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateRequestWithDefaults + +`func NewUpdateRequestWithDefaults() *UpdateRequest` + +NewUpdateRequestWithDefaults instantiates a new UpdateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *UpdateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDefaultExpiration + +`func (o *UpdateRequest) GetDefaultExpiration() string` + +GetDefaultExpiration returns the DefaultExpiration field if non-nil, zero value otherwise. + +### GetDefaultExpirationOk + +`func (o *UpdateRequest) GetDefaultExpirationOk() (*string, bool)` + +GetDefaultExpirationOk returns a tuple with the DefaultExpiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultExpiration + +`func (o *UpdateRequest) SetDefaultExpiration(v string)` + +SetDefaultExpiration sets DefaultExpiration field to given value. + +### HasDefaultExpiration + +`func (o *UpdateRequest) HasDefaultExpiration() bool` + +HasDefaultExpiration returns a boolean if a field has been set. + +### GetProduces + +`func (o *UpdateRequest) GetProduces() []string` + +GetProduces returns the Produces field if non-nil, zero value otherwise. + +### GetProducesOk + +`func (o *UpdateRequest) GetProducesOk() (*[]string, bool)` + +GetProducesOk returns a tuple with the Produces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProduces + +`func (o *UpdateRequest) SetProduces(v []string)` + +SetProduces sets Produces field to given value. + +### HasProduces + +`func (o *UpdateRequest) HasProduces() bool` + +HasProduces returns a boolean if a field has been set. + +### GetReplaces + +`func (o *UpdateRequest) GetReplaces() []string` + +GetReplaces returns the Replaces field if non-nil, zero value otherwise. + +### GetReplacesOk + +`func (o *UpdateRequest) GetReplacesOk() (*[]string, bool)` + +GetReplacesOk returns a tuple with the Replaces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplaces + +`func (o *UpdateRequest) SetReplaces(v []string)` + +SetReplaces sets Replaces field to given value. + +### HasReplaces + +`func (o *UpdateRequest) HasReplaces() bool` + +HasReplaces returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UrlInput.md b/docs/UrlInput.md new file mode 100644 index 0000000..f0e44f8 --- /dev/null +++ b/docs/UrlInput.md @@ -0,0 +1,155 @@ +# UrlInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewUrlInput + +`func NewUrlInput(value string, ) *UrlInput` + +NewUrlInput instantiates a new UrlInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUrlInputWithDefaults + +`func NewUrlInputWithDefaults() *UrlInput` + +NewUrlInputWithDefaults instantiates a new UrlInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *UrlInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *UrlInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *UrlInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *UrlInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UrlInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UrlInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UrlInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *UrlInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *UrlInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *UrlInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *UrlInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *UrlInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *UrlInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *UrlInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *UrlInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *UrlInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *UrlInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *UrlInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *UrlInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UrlOutput.md b/docs/UrlOutput.md new file mode 100644 index 0000000..e0b588e --- /dev/null +++ b/docs/UrlOutput.md @@ -0,0 +1,218 @@ +# UrlOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "url"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewUrlOutput + +`func NewUrlOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *UrlOutput` + +NewUrlOutput instantiates a new UrlOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUrlOutputWithDefaults + +`func NewUrlOutputWithDefaults() *UrlOutput` + +NewUrlOutputWithDefaults instantiates a new UrlOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *UrlOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *UrlOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *UrlOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *UrlOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UrlOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UrlOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UrlOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *UrlOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *UrlOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *UrlOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *UrlOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *UrlOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *UrlOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *UrlOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *UrlOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *UrlOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *UrlOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *UrlOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *UrlOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *UrlOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *UrlOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *UrlOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *UrlOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *UrlOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *UrlOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *UrlOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *UrlOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *UrlOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/User.md b/docs/User.md new file mode 100644 index 0000000..e887ef7 --- /dev/null +++ b/docs/User.md @@ -0,0 +1,150 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | +**Enabled** | Pointer to **bool** | | [optional] [default to true] +**Admin** | Pointer to **bool** | | [optional] [default to false] +**ApiKey** | Pointer to **string** | | [optional] +**Id** | **string** | | [readonly] + +## Methods + +### NewUser + +`func NewUser(username string, id string, ) *User` + +NewUser instantiates a new User object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserWithDefaults + +`func NewUserWithDefaults() *User` + +NewUserWithDefaults instantiates a new User object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUsername + +`func (o *User) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *User) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *User) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetEnabled + +`func (o *User) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *User) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *User) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *User) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetAdmin + +`func (o *User) GetAdmin() bool` + +GetAdmin returns the Admin field if non-nil, zero value otherwise. + +### GetAdminOk + +`func (o *User) GetAdminOk() (*bool, bool)` + +GetAdminOk returns a tuple with the Admin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdmin + +`func (o *User) SetAdmin(v bool)` + +SetAdmin sets Admin field to given value. + +### HasAdmin + +`func (o *User) HasAdmin() bool` + +HasAdmin returns a boolean if a field has been set. + +### GetApiKey + +`func (o *User) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *User) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *User) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + +### HasApiKey + +`func (o *User) HasApiKey() bool` + +HasApiKey returns a boolean if a field has been set. + +### GetId + +`func (o *User) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *User) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *User) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAccountInput.md b/docs/UserAccountInput.md new file mode 100644 index 0000000..a0386da --- /dev/null +++ b/docs/UserAccountInput.md @@ -0,0 +1,659 @@ +# UserAccountInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "user_account"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**UserId** | Pointer to **NullableString** | | [optional] +**Credential** | Pointer to **NullableString** | | [optional] +**AccountLogin** | Pointer to **NullableString** | | [optional] +**AccountType** | Pointer to **NullableString** | | [optional] +**DisplayName** | Pointer to **NullableString** | | [optional] +**IsServiceAccount** | Pointer to **NullableBool** | | [optional] +**IsPrivileged** | Pointer to **NullableBool** | | [optional] +**CanEscalatePrivs** | Pointer to **NullableBool** | | [optional] +**IsDisabled** | Pointer to **NullableBool** | | [optional] +**AccountCreated** | Pointer to **NullableTime** | | [optional] +**AccountExpires** | Pointer to **NullableTime** | | [optional] +**CredentialLastChanged** | Pointer to **NullableTime** | | [optional] +**AccountFirstLogin** | Pointer to **NullableTime** | | [optional] +**AccountLastLogin** | Pointer to **NullableTime** | | [optional] + +## Methods + +### NewUserAccountInput + +`func NewUserAccountInput(value string, ) *UserAccountInput` + +NewUserAccountInput instantiates a new UserAccountInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserAccountInputWithDefaults + +`func NewUserAccountInputWithDefaults() *UserAccountInput` + +NewUserAccountInputWithDefaults instantiates a new UserAccountInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *UserAccountInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *UserAccountInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *UserAccountInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *UserAccountInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UserAccountInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UserAccountInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UserAccountInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *UserAccountInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *UserAccountInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *UserAccountInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *UserAccountInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *UserAccountInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *UserAccountInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *UserAccountInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *UserAccountInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *UserAccountInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *UserAccountInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *UserAccountInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *UserAccountInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetUserId + +`func (o *UserAccountInput) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *UserAccountInput) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *UserAccountInput) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *UserAccountInput) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### SetUserIdNil + +`func (o *UserAccountInput) SetUserIdNil(b bool)` + + SetUserIdNil sets the value for UserId to be an explicit nil + +### UnsetUserId +`func (o *UserAccountInput) UnsetUserId()` + +UnsetUserId ensures that no value is present for UserId, not even an explicit nil +### GetCredential + +`func (o *UserAccountInput) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *UserAccountInput) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *UserAccountInput) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *UserAccountInput) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### SetCredentialNil + +`func (o *UserAccountInput) SetCredentialNil(b bool)` + + SetCredentialNil sets the value for Credential to be an explicit nil + +### UnsetCredential +`func (o *UserAccountInput) UnsetCredential()` + +UnsetCredential ensures that no value is present for Credential, not even an explicit nil +### GetAccountLogin + +`func (o *UserAccountInput) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *UserAccountInput) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *UserAccountInput) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *UserAccountInput) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### SetAccountLoginNil + +`func (o *UserAccountInput) SetAccountLoginNil(b bool)` + + SetAccountLoginNil sets the value for AccountLogin to be an explicit nil + +### UnsetAccountLogin +`func (o *UserAccountInput) UnsetAccountLogin()` + +UnsetAccountLogin ensures that no value is present for AccountLogin, not even an explicit nil +### GetAccountType + +`func (o *UserAccountInput) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *UserAccountInput) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *UserAccountInput) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *UserAccountInput) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### SetAccountTypeNil + +`func (o *UserAccountInput) SetAccountTypeNil(b bool)` + + SetAccountTypeNil sets the value for AccountType to be an explicit nil + +### UnsetAccountType +`func (o *UserAccountInput) UnsetAccountType()` + +UnsetAccountType ensures that no value is present for AccountType, not even an explicit nil +### GetDisplayName + +`func (o *UserAccountInput) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *UserAccountInput) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *UserAccountInput) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *UserAccountInput) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### SetDisplayNameNil + +`func (o *UserAccountInput) SetDisplayNameNil(b bool)` + + SetDisplayNameNil sets the value for DisplayName to be an explicit nil + +### UnsetDisplayName +`func (o *UserAccountInput) UnsetDisplayName()` + +UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil +### GetIsServiceAccount + +`func (o *UserAccountInput) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *UserAccountInput) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *UserAccountInput) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *UserAccountInput) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### SetIsServiceAccountNil + +`func (o *UserAccountInput) SetIsServiceAccountNil(b bool)` + + SetIsServiceAccountNil sets the value for IsServiceAccount to be an explicit nil + +### UnsetIsServiceAccount +`func (o *UserAccountInput) UnsetIsServiceAccount()` + +UnsetIsServiceAccount ensures that no value is present for IsServiceAccount, not even an explicit nil +### GetIsPrivileged + +`func (o *UserAccountInput) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *UserAccountInput) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *UserAccountInput) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *UserAccountInput) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### SetIsPrivilegedNil + +`func (o *UserAccountInput) SetIsPrivilegedNil(b bool)` + + SetIsPrivilegedNil sets the value for IsPrivileged to be an explicit nil + +### UnsetIsPrivileged +`func (o *UserAccountInput) UnsetIsPrivileged()` + +UnsetIsPrivileged ensures that no value is present for IsPrivileged, not even an explicit nil +### GetCanEscalatePrivs + +`func (o *UserAccountInput) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *UserAccountInput) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *UserAccountInput) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *UserAccountInput) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### SetCanEscalatePrivsNil + +`func (o *UserAccountInput) SetCanEscalatePrivsNil(b bool)` + + SetCanEscalatePrivsNil sets the value for CanEscalatePrivs to be an explicit nil + +### UnsetCanEscalatePrivs +`func (o *UserAccountInput) UnsetCanEscalatePrivs()` + +UnsetCanEscalatePrivs ensures that no value is present for CanEscalatePrivs, not even an explicit nil +### GetIsDisabled + +`func (o *UserAccountInput) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *UserAccountInput) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *UserAccountInput) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *UserAccountInput) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### SetIsDisabledNil + +`func (o *UserAccountInput) SetIsDisabledNil(b bool)` + + SetIsDisabledNil sets the value for IsDisabled to be an explicit nil + +### UnsetIsDisabled +`func (o *UserAccountInput) UnsetIsDisabled()` + +UnsetIsDisabled ensures that no value is present for IsDisabled, not even an explicit nil +### GetAccountCreated + +`func (o *UserAccountInput) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *UserAccountInput) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *UserAccountInput) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *UserAccountInput) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### SetAccountCreatedNil + +`func (o *UserAccountInput) SetAccountCreatedNil(b bool)` + + SetAccountCreatedNil sets the value for AccountCreated to be an explicit nil + +### UnsetAccountCreated +`func (o *UserAccountInput) UnsetAccountCreated()` + +UnsetAccountCreated ensures that no value is present for AccountCreated, not even an explicit nil +### GetAccountExpires + +`func (o *UserAccountInput) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *UserAccountInput) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *UserAccountInput) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *UserAccountInput) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### SetAccountExpiresNil + +`func (o *UserAccountInput) SetAccountExpiresNil(b bool)` + + SetAccountExpiresNil sets the value for AccountExpires to be an explicit nil + +### UnsetAccountExpires +`func (o *UserAccountInput) UnsetAccountExpires()` + +UnsetAccountExpires ensures that no value is present for AccountExpires, not even an explicit nil +### GetCredentialLastChanged + +`func (o *UserAccountInput) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *UserAccountInput) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *UserAccountInput) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *UserAccountInput) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### SetCredentialLastChangedNil + +`func (o *UserAccountInput) SetCredentialLastChangedNil(b bool)` + + SetCredentialLastChangedNil sets the value for CredentialLastChanged to be an explicit nil + +### UnsetCredentialLastChanged +`func (o *UserAccountInput) UnsetCredentialLastChanged()` + +UnsetCredentialLastChanged ensures that no value is present for CredentialLastChanged, not even an explicit nil +### GetAccountFirstLogin + +`func (o *UserAccountInput) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *UserAccountInput) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *UserAccountInput) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *UserAccountInput) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### SetAccountFirstLoginNil + +`func (o *UserAccountInput) SetAccountFirstLoginNil(b bool)` + + SetAccountFirstLoginNil sets the value for AccountFirstLogin to be an explicit nil + +### UnsetAccountFirstLogin +`func (o *UserAccountInput) UnsetAccountFirstLogin()` + +UnsetAccountFirstLogin ensures that no value is present for AccountFirstLogin, not even an explicit nil +### GetAccountLastLogin + +`func (o *UserAccountInput) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *UserAccountInput) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *UserAccountInput) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *UserAccountInput) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### SetAccountLastLoginNil + +`func (o *UserAccountInput) SetAccountLastLoginNil(b bool)` + + SetAccountLastLoginNil sets the value for AccountLastLogin to be an explicit nil + +### UnsetAccountLastLogin +`func (o *UserAccountInput) UnsetAccountLastLogin()` + +UnsetAccountLastLogin ensures that no value is present for AccountLastLogin, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAccountOutput.md b/docs/UserAccountOutput.md new file mode 100644 index 0000000..9f0b9e2 --- /dev/null +++ b/docs/UserAccountOutput.md @@ -0,0 +1,722 @@ +# UserAccountOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "user_account"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**UserId** | Pointer to **NullableString** | | [optional] +**Credential** | Pointer to **NullableString** | | [optional] +**AccountLogin** | Pointer to **NullableString** | | [optional] +**AccountType** | Pointer to **NullableString** | | [optional] +**DisplayName** | Pointer to **NullableString** | | [optional] +**IsServiceAccount** | Pointer to **NullableBool** | | [optional] +**IsPrivileged** | Pointer to **NullableBool** | | [optional] +**CanEscalatePrivs** | Pointer to **NullableBool** | | [optional] +**IsDisabled** | Pointer to **NullableBool** | | [optional] +**AccountCreated** | Pointer to **NullableTime** | | [optional] +**AccountExpires** | Pointer to **NullableTime** | | [optional] +**CredentialLastChanged** | Pointer to **NullableTime** | | [optional] +**AccountFirstLogin** | Pointer to **NullableTime** | | [optional] +**AccountLastLogin** | Pointer to **NullableTime** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewUserAccountOutput + +`func NewUserAccountOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *UserAccountOutput` + +NewUserAccountOutput instantiates a new UserAccountOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserAccountOutputWithDefaults + +`func NewUserAccountOutputWithDefaults() *UserAccountOutput` + +NewUserAccountOutputWithDefaults instantiates a new UserAccountOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *UserAccountOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *UserAccountOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *UserAccountOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *UserAccountOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UserAccountOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UserAccountOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UserAccountOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *UserAccountOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *UserAccountOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *UserAccountOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *UserAccountOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *UserAccountOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *UserAccountOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *UserAccountOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *UserAccountOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *UserAccountOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *UserAccountOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *UserAccountOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *UserAccountOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetUserId + +`func (o *UserAccountOutput) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *UserAccountOutput) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *UserAccountOutput) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *UserAccountOutput) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### SetUserIdNil + +`func (o *UserAccountOutput) SetUserIdNil(b bool)` + + SetUserIdNil sets the value for UserId to be an explicit nil + +### UnsetUserId +`func (o *UserAccountOutput) UnsetUserId()` + +UnsetUserId ensures that no value is present for UserId, not even an explicit nil +### GetCredential + +`func (o *UserAccountOutput) GetCredential() string` + +GetCredential returns the Credential field if non-nil, zero value otherwise. + +### GetCredentialOk + +`func (o *UserAccountOutput) GetCredentialOk() (*string, bool)` + +GetCredentialOk returns a tuple with the Credential field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredential + +`func (o *UserAccountOutput) SetCredential(v string)` + +SetCredential sets Credential field to given value. + +### HasCredential + +`func (o *UserAccountOutput) HasCredential() bool` + +HasCredential returns a boolean if a field has been set. + +### SetCredentialNil + +`func (o *UserAccountOutput) SetCredentialNil(b bool)` + + SetCredentialNil sets the value for Credential to be an explicit nil + +### UnsetCredential +`func (o *UserAccountOutput) UnsetCredential()` + +UnsetCredential ensures that no value is present for Credential, not even an explicit nil +### GetAccountLogin + +`func (o *UserAccountOutput) GetAccountLogin() string` + +GetAccountLogin returns the AccountLogin field if non-nil, zero value otherwise. + +### GetAccountLoginOk + +`func (o *UserAccountOutput) GetAccountLoginOk() (*string, bool)` + +GetAccountLoginOk returns a tuple with the AccountLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLogin + +`func (o *UserAccountOutput) SetAccountLogin(v string)` + +SetAccountLogin sets AccountLogin field to given value. + +### HasAccountLogin + +`func (o *UserAccountOutput) HasAccountLogin() bool` + +HasAccountLogin returns a boolean if a field has been set. + +### SetAccountLoginNil + +`func (o *UserAccountOutput) SetAccountLoginNil(b bool)` + + SetAccountLoginNil sets the value for AccountLogin to be an explicit nil + +### UnsetAccountLogin +`func (o *UserAccountOutput) UnsetAccountLogin()` + +UnsetAccountLogin ensures that no value is present for AccountLogin, not even an explicit nil +### GetAccountType + +`func (o *UserAccountOutput) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *UserAccountOutput) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *UserAccountOutput) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *UserAccountOutput) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### SetAccountTypeNil + +`func (o *UserAccountOutput) SetAccountTypeNil(b bool)` + + SetAccountTypeNil sets the value for AccountType to be an explicit nil + +### UnsetAccountType +`func (o *UserAccountOutput) UnsetAccountType()` + +UnsetAccountType ensures that no value is present for AccountType, not even an explicit nil +### GetDisplayName + +`func (o *UserAccountOutput) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *UserAccountOutput) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *UserAccountOutput) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *UserAccountOutput) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### SetDisplayNameNil + +`func (o *UserAccountOutput) SetDisplayNameNil(b bool)` + + SetDisplayNameNil sets the value for DisplayName to be an explicit nil + +### UnsetDisplayName +`func (o *UserAccountOutput) UnsetDisplayName()` + +UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil +### GetIsServiceAccount + +`func (o *UserAccountOutput) GetIsServiceAccount() bool` + +GetIsServiceAccount returns the IsServiceAccount field if non-nil, zero value otherwise. + +### GetIsServiceAccountOk + +`func (o *UserAccountOutput) GetIsServiceAccountOk() (*bool, bool)` + +GetIsServiceAccountOk returns a tuple with the IsServiceAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsServiceAccount + +`func (o *UserAccountOutput) SetIsServiceAccount(v bool)` + +SetIsServiceAccount sets IsServiceAccount field to given value. + +### HasIsServiceAccount + +`func (o *UserAccountOutput) HasIsServiceAccount() bool` + +HasIsServiceAccount returns a boolean if a field has been set. + +### SetIsServiceAccountNil + +`func (o *UserAccountOutput) SetIsServiceAccountNil(b bool)` + + SetIsServiceAccountNil sets the value for IsServiceAccount to be an explicit nil + +### UnsetIsServiceAccount +`func (o *UserAccountOutput) UnsetIsServiceAccount()` + +UnsetIsServiceAccount ensures that no value is present for IsServiceAccount, not even an explicit nil +### GetIsPrivileged + +`func (o *UserAccountOutput) GetIsPrivileged() bool` + +GetIsPrivileged returns the IsPrivileged field if non-nil, zero value otherwise. + +### GetIsPrivilegedOk + +`func (o *UserAccountOutput) GetIsPrivilegedOk() (*bool, bool)` + +GetIsPrivilegedOk returns a tuple with the IsPrivileged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrivileged + +`func (o *UserAccountOutput) SetIsPrivileged(v bool)` + +SetIsPrivileged sets IsPrivileged field to given value. + +### HasIsPrivileged + +`func (o *UserAccountOutput) HasIsPrivileged() bool` + +HasIsPrivileged returns a boolean if a field has been set. + +### SetIsPrivilegedNil + +`func (o *UserAccountOutput) SetIsPrivilegedNil(b bool)` + + SetIsPrivilegedNil sets the value for IsPrivileged to be an explicit nil + +### UnsetIsPrivileged +`func (o *UserAccountOutput) UnsetIsPrivileged()` + +UnsetIsPrivileged ensures that no value is present for IsPrivileged, not even an explicit nil +### GetCanEscalatePrivs + +`func (o *UserAccountOutput) GetCanEscalatePrivs() bool` + +GetCanEscalatePrivs returns the CanEscalatePrivs field if non-nil, zero value otherwise. + +### GetCanEscalatePrivsOk + +`func (o *UserAccountOutput) GetCanEscalatePrivsOk() (*bool, bool)` + +GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanEscalatePrivs + +`func (o *UserAccountOutput) SetCanEscalatePrivs(v bool)` + +SetCanEscalatePrivs sets CanEscalatePrivs field to given value. + +### HasCanEscalatePrivs + +`func (o *UserAccountOutput) HasCanEscalatePrivs() bool` + +HasCanEscalatePrivs returns a boolean if a field has been set. + +### SetCanEscalatePrivsNil + +`func (o *UserAccountOutput) SetCanEscalatePrivsNil(b bool)` + + SetCanEscalatePrivsNil sets the value for CanEscalatePrivs to be an explicit nil + +### UnsetCanEscalatePrivs +`func (o *UserAccountOutput) UnsetCanEscalatePrivs()` + +UnsetCanEscalatePrivs ensures that no value is present for CanEscalatePrivs, not even an explicit nil +### GetIsDisabled + +`func (o *UserAccountOutput) GetIsDisabled() bool` + +GetIsDisabled returns the IsDisabled field if non-nil, zero value otherwise. + +### GetIsDisabledOk + +`func (o *UserAccountOutput) GetIsDisabledOk() (*bool, bool)` + +GetIsDisabledOk returns a tuple with the IsDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDisabled + +`func (o *UserAccountOutput) SetIsDisabled(v bool)` + +SetIsDisabled sets IsDisabled field to given value. + +### HasIsDisabled + +`func (o *UserAccountOutput) HasIsDisabled() bool` + +HasIsDisabled returns a boolean if a field has been set. + +### SetIsDisabledNil + +`func (o *UserAccountOutput) SetIsDisabledNil(b bool)` + + SetIsDisabledNil sets the value for IsDisabled to be an explicit nil + +### UnsetIsDisabled +`func (o *UserAccountOutput) UnsetIsDisabled()` + +UnsetIsDisabled ensures that no value is present for IsDisabled, not even an explicit nil +### GetAccountCreated + +`func (o *UserAccountOutput) GetAccountCreated() time.Time` + +GetAccountCreated returns the AccountCreated field if non-nil, zero value otherwise. + +### GetAccountCreatedOk + +`func (o *UserAccountOutput) GetAccountCreatedOk() (*time.Time, bool)` + +GetAccountCreatedOk returns a tuple with the AccountCreated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountCreated + +`func (o *UserAccountOutput) SetAccountCreated(v time.Time)` + +SetAccountCreated sets AccountCreated field to given value. + +### HasAccountCreated + +`func (o *UserAccountOutput) HasAccountCreated() bool` + +HasAccountCreated returns a boolean if a field has been set. + +### SetAccountCreatedNil + +`func (o *UserAccountOutput) SetAccountCreatedNil(b bool)` + + SetAccountCreatedNil sets the value for AccountCreated to be an explicit nil + +### UnsetAccountCreated +`func (o *UserAccountOutput) UnsetAccountCreated()` + +UnsetAccountCreated ensures that no value is present for AccountCreated, not even an explicit nil +### GetAccountExpires + +`func (o *UserAccountOutput) GetAccountExpires() time.Time` + +GetAccountExpires returns the AccountExpires field if non-nil, zero value otherwise. + +### GetAccountExpiresOk + +`func (o *UserAccountOutput) GetAccountExpiresOk() (*time.Time, bool)` + +GetAccountExpiresOk returns a tuple with the AccountExpires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountExpires + +`func (o *UserAccountOutput) SetAccountExpires(v time.Time)` + +SetAccountExpires sets AccountExpires field to given value. + +### HasAccountExpires + +`func (o *UserAccountOutput) HasAccountExpires() bool` + +HasAccountExpires returns a boolean if a field has been set. + +### SetAccountExpiresNil + +`func (o *UserAccountOutput) SetAccountExpiresNil(b bool)` + + SetAccountExpiresNil sets the value for AccountExpires to be an explicit nil + +### UnsetAccountExpires +`func (o *UserAccountOutput) UnsetAccountExpires()` + +UnsetAccountExpires ensures that no value is present for AccountExpires, not even an explicit nil +### GetCredentialLastChanged + +`func (o *UserAccountOutput) GetCredentialLastChanged() time.Time` + +GetCredentialLastChanged returns the CredentialLastChanged field if non-nil, zero value otherwise. + +### GetCredentialLastChangedOk + +`func (o *UserAccountOutput) GetCredentialLastChangedOk() (*time.Time, bool)` + +GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentialLastChanged + +`func (o *UserAccountOutput) SetCredentialLastChanged(v time.Time)` + +SetCredentialLastChanged sets CredentialLastChanged field to given value. + +### HasCredentialLastChanged + +`func (o *UserAccountOutput) HasCredentialLastChanged() bool` + +HasCredentialLastChanged returns a boolean if a field has been set. + +### SetCredentialLastChangedNil + +`func (o *UserAccountOutput) SetCredentialLastChangedNil(b bool)` + + SetCredentialLastChangedNil sets the value for CredentialLastChanged to be an explicit nil + +### UnsetCredentialLastChanged +`func (o *UserAccountOutput) UnsetCredentialLastChanged()` + +UnsetCredentialLastChanged ensures that no value is present for CredentialLastChanged, not even an explicit nil +### GetAccountFirstLogin + +`func (o *UserAccountOutput) GetAccountFirstLogin() time.Time` + +GetAccountFirstLogin returns the AccountFirstLogin field if non-nil, zero value otherwise. + +### GetAccountFirstLoginOk + +`func (o *UserAccountOutput) GetAccountFirstLoginOk() (*time.Time, bool)` + +GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountFirstLogin + +`func (o *UserAccountOutput) SetAccountFirstLogin(v time.Time)` + +SetAccountFirstLogin sets AccountFirstLogin field to given value. + +### HasAccountFirstLogin + +`func (o *UserAccountOutput) HasAccountFirstLogin() bool` + +HasAccountFirstLogin returns a boolean if a field has been set. + +### SetAccountFirstLoginNil + +`func (o *UserAccountOutput) SetAccountFirstLoginNil(b bool)` + + SetAccountFirstLoginNil sets the value for AccountFirstLogin to be an explicit nil + +### UnsetAccountFirstLogin +`func (o *UserAccountOutput) UnsetAccountFirstLogin()` + +UnsetAccountFirstLogin ensures that no value is present for AccountFirstLogin, not even an explicit nil +### GetAccountLastLogin + +`func (o *UserAccountOutput) GetAccountLastLogin() time.Time` + +GetAccountLastLogin returns the AccountLastLogin field if non-nil, zero value otherwise. + +### GetAccountLastLoginOk + +`func (o *UserAccountOutput) GetAccountLastLoginOk() (*time.Time, bool)` + +GetAccountLastLoginOk returns a tuple with the AccountLastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountLastLogin + +`func (o *UserAccountOutput) SetAccountLastLogin(v time.Time)` + +SetAccountLastLogin sets AccountLastLogin field to given value. + +### HasAccountLastLogin + +`func (o *UserAccountOutput) HasAccountLastLogin() bool` + +HasAccountLastLogin returns a boolean if a field has been set. + +### SetAccountLastLoginNil + +`func (o *UserAccountOutput) SetAccountLastLoginNil(b bool)` + + SetAccountLastLoginNil sets the value for AccountLastLogin to be an explicit nil + +### UnsetAccountLastLogin +`func (o *UserAccountOutput) UnsetAccountLastLogin()` + +UnsetAccountLastLogin ensures that no value is present for AccountLastLogin, not even an explicit nil +### GetId + +`func (o *UserAccountOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *UserAccountOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *UserAccountOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *UserAccountOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *UserAccountOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *UserAccountOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *UserAccountOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *UserAccountOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *UserAccountOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAgentInput.md b/docs/UserAgentInput.md new file mode 100644 index 0000000..2e3e95c --- /dev/null +++ b/docs/UserAgentInput.md @@ -0,0 +1,155 @@ +# UserAgentInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "user_agent"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] + +## Methods + +### NewUserAgentInput + +`func NewUserAgentInput(value string, ) *UserAgentInput` + +NewUserAgentInput instantiates a new UserAgentInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserAgentInputWithDefaults + +`func NewUserAgentInputWithDefaults() *UserAgentInput` + +NewUserAgentInputWithDefaults instantiates a new UserAgentInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *UserAgentInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *UserAgentInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *UserAgentInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *UserAgentInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UserAgentInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UserAgentInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UserAgentInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *UserAgentInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *UserAgentInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *UserAgentInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *UserAgentInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *UserAgentInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *UserAgentInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *UserAgentInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *UserAgentInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *UserAgentInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *UserAgentInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *UserAgentInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *UserAgentInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAgentOutput.md b/docs/UserAgentOutput.md new file mode 100644 index 0000000..3c5d6e1 --- /dev/null +++ b/docs/UserAgentOutput.md @@ -0,0 +1,218 @@ +# UserAgentOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "user_agent"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewUserAgentOutput + +`func NewUserAgentOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *UserAgentOutput` + +NewUserAgentOutput instantiates a new UserAgentOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserAgentOutputWithDefaults + +`func NewUserAgentOutputWithDefaults() *UserAgentOutput` + +NewUserAgentOutputWithDefaults instantiates a new UserAgentOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *UserAgentOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *UserAgentOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *UserAgentOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *UserAgentOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UserAgentOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UserAgentOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UserAgentOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *UserAgentOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *UserAgentOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *UserAgentOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *UserAgentOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *UserAgentOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *UserAgentOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *UserAgentOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *UserAgentOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *UserAgentOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *UserAgentOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *UserAgentOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *UserAgentOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *UserAgentOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *UserAgentOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *UserAgentOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *UserAgentOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *UserAgentOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *UserAgentOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *UserAgentOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *UserAgentOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *UserAgentOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsersAPI.md b/docs/UsersAPI.md new file mode 100644 index 0000000..0c8a211 --- /dev/null +++ b/docs/UsersAPI.md @@ -0,0 +1,485 @@ +# \UsersAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateApiV2UsersPost**](UsersAPI.md#CreateApiV2UsersPost) | **Post** /api/v2/users/ | Create +[**DeleteApiV2UsersUserIdDelete**](UsersAPI.md#DeleteApiV2UsersUserIdDelete) | **Delete** /api/v2/users/{user_id} | Delete +[**GetApiV2UsersUserIdGet**](UsersAPI.md#GetApiV2UsersUserIdGet) | **Get** /api/v2/users/{user_id} | Get +[**ResetApiKeyApiV2UsersResetApiKeyPost**](UsersAPI.md#ResetApiKeyApiV2UsersResetApiKeyPost) | **Post** /api/v2/users/reset-api-key | Reset Api Key +[**ResetPasswordApiV2UsersResetPasswordPost**](UsersAPI.md#ResetPasswordApiV2UsersResetPasswordPost) | **Post** /api/v2/users/reset-password | Reset Password +[**SearchApiV2UsersSearchPost**](UsersAPI.md#SearchApiV2UsersSearchPost) | **Post** /api/v2/users/search | Search +[**ToggleApiV2UsersTogglePost**](UsersAPI.md#ToggleApiV2UsersTogglePost) | **Post** /api/v2/users/toggle | Toggle + + + +## CreateApiV2UsersPost + +> User CreateApiV2UsersPost(ctx).NewUserRequest(newUserRequest).Execute() + +Create + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + newUserRequest := *openapiclient.NewNewUserRequest("Username_example", "Password_example", false) // NewUserRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.CreateApiV2UsersPost(context.Background()).NewUserRequest(newUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.CreateApiV2UsersPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateApiV2UsersPost`: User + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.CreateApiV2UsersPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateApiV2UsersPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newUserRequest** | [**NewUserRequest**](NewUserRequest.md) | | + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApiV2UsersUserIdDelete + +> interface{} DeleteApiV2UsersUserIdDelete(ctx, userId).Execute() + +Delete + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + userId := "userId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.DeleteApiV2UsersUserIdDelete(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.DeleteApiV2UsersUserIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApiV2UsersUserIdDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.DeleteApiV2UsersUserIdDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApiV2UsersUserIdDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetApiV2UsersUserIdGet + +> User GetApiV2UsersUserIdGet(ctx, userId).Execute() + +Get + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + userId := "userId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.GetApiV2UsersUserIdGet(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetApiV2UsersUserIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetApiV2UsersUserIdGet`: User + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetApiV2UsersUserIdGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetApiV2UsersUserIdGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ResetApiKeyApiV2UsersResetApiKeyPost + +> User ResetApiKeyApiV2UsersResetApiKeyPost(ctx).ResetApiKeyRequest(resetApiKeyRequest).Execute() + +Reset Api Key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + resetApiKeyRequest := *openapiclient.NewResetApiKeyRequest("UserId_example") // ResetApiKeyRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.ResetApiKeyApiV2UsersResetApiKeyPost(context.Background()).ResetApiKeyRequest(resetApiKeyRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ResetApiKeyApiV2UsersResetApiKeyPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ResetApiKeyApiV2UsersResetApiKeyPost`: User + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ResetApiKeyApiV2UsersResetApiKeyPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiResetApiKeyApiV2UsersResetApiKeyPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resetApiKeyRequest** | [**ResetApiKeyRequest**](ResetApiKeyRequest.md) | | + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ResetPasswordApiV2UsersResetPasswordPost + +> User ResetPasswordApiV2UsersResetPasswordPost(ctx).ResetPasswordRequest(resetPasswordRequest).Execute() + +Reset Password + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + resetPasswordRequest := *openapiclient.NewResetPasswordRequest("UserId_example", "NewPassword_example") // ResetPasswordRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.ResetPasswordApiV2UsersResetPasswordPost(context.Background()).ResetPasswordRequest(resetPasswordRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ResetPasswordApiV2UsersResetPasswordPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ResetPasswordApiV2UsersResetPasswordPost`: User + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ResetPasswordApiV2UsersResetPasswordPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiResetPasswordApiV2UsersResetPasswordPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resetPasswordRequest** | [**ResetPasswordRequest**](ResetPasswordRequest.md) | | + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SearchApiV2UsersSearchPost + +> SearchUserResponse SearchApiV2UsersSearchPost(ctx).SearchUserRequest(searchUserRequest).Execute() + +Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + searchUserRequest := *openapiclient.NewSearchUserRequest("Username_example") // SearchUserRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.SearchApiV2UsersSearchPost(context.Background()).SearchUserRequest(searchUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.SearchApiV2UsersSearchPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchApiV2UsersSearchPost`: SearchUserResponse + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.SearchApiV2UsersSearchPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSearchApiV2UsersSearchPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchUserRequest** | [**SearchUserRequest**](SearchUserRequest.md) | | + +### Return type + +[**SearchUserResponse**](SearchUserResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ToggleApiV2UsersTogglePost + +> User ToggleApiV2UsersTogglePost(ctx).ToggleUserRequest(toggleUserRequest).Execute() + +Toggle + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/yeti-platform/goyeti" +) + +func main() { + toggleUserRequest := *openapiclient.NewToggleUserRequest("UserId_example", openapiclient.ToggleableField("enabled")) // ToggleUserRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.ToggleApiV2UsersTogglePost(context.Background()).ToggleUserRequest(toggleUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ToggleApiV2UsersTogglePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ToggleApiV2UsersTogglePost`: User + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ToggleApiV2UsersTogglePost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiToggleApiV2UsersTogglePostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **toggleUserRequest** | [**ToggleUserRequest**](ToggleUserRequest.md) | | + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [APIKeyCookie](../README.md#APIKeyCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/ValidationError.md b/docs/ValidationError.md new file mode 100644 index 0000000..a32360c --- /dev/null +++ b/docs/ValidationError.md @@ -0,0 +1,93 @@ +# ValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Loc** | [**[]ValidationErrorLocInner**](ValidationErrorLocInner.md) | | +**Msg** | **string** | | +**Type** | **string** | | + +## Methods + +### NewValidationError + +`func NewValidationError(loc []ValidationErrorLocInner, msg string, type_ string, ) *ValidationError` + +NewValidationError instantiates a new ValidationError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewValidationErrorWithDefaults + +`func NewValidationErrorWithDefaults() *ValidationError` + +NewValidationErrorWithDefaults instantiates a new ValidationError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLoc + +`func (o *ValidationError) GetLoc() []ValidationErrorLocInner` + +GetLoc returns the Loc field if non-nil, zero value otherwise. + +### GetLocOk + +`func (o *ValidationError) GetLocOk() (*[]ValidationErrorLocInner, bool)` + +GetLocOk returns a tuple with the Loc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoc + +`func (o *ValidationError) SetLoc(v []ValidationErrorLocInner)` + +SetLoc sets Loc field to given value. + + +### GetMsg + +`func (o *ValidationError) GetMsg() string` + +GetMsg returns the Msg field if non-nil, zero value otherwise. + +### GetMsgOk + +`func (o *ValidationError) GetMsgOk() (*string, bool)` + +GetMsgOk returns a tuple with the Msg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMsg + +`func (o *ValidationError) SetMsg(v string)` + +SetMsg sets Msg field to given value. + + +### GetType + +`func (o *ValidationError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ValidationError) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ValidationError) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ValidationErrorLocInner.md b/docs/ValidationErrorLocInner.md new file mode 100644 index 0000000..0b636b5 --- /dev/null +++ b/docs/ValidationErrorLocInner.md @@ -0,0 +1,30 @@ +# ValidationErrorLocInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewValidationErrorLocInner + +`func NewValidationErrorLocInner() *ValidationErrorLocInner` + +NewValidationErrorLocInner instantiates a new ValidationErrorLocInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewValidationErrorLocInnerWithDefaults + +`func NewValidationErrorLocInnerWithDefaults() *ValidationErrorLocInner` + +NewValidationErrorLocInnerWithDefaults instantiates a new ValidationErrorLocInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VerticesValue.md b/docs/VerticesValue.md new file mode 100644 index 0000000..e8e10ee --- /dev/null +++ b/docs/VerticesValue.md @@ -0,0 +1,1098 @@ +# VerticesValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | **string** | | +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Modified** | Pointer to **time.Time** | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] +**RelatedObservablesCount** | **int32** | | [readonly] +**IdentityClass** | Pointer to **string** | | [optional] [default to ""] +**Sectors** | Pointer to **[]string** | | [optional] [default to []] +**ContactInformation** | Pointer to **string** | | [optional] [default to ""] +**Aliases** | Pointer to **[]string** | | [optional] [default to []] +**FirstSeen** | Pointer to **time.Time** | | [optional] +**LastSeen** | Pointer to **time.Time** | | [optional] +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**ToolVersion** | Pointer to **string** | | [optional] [default to ""] +**ThreatActorTypes** | Pointer to **[]string** | | [optional] [default to []] +**Family** | Pointer to **string** | | [optional] [default to ""] +**Title** | Pointer to **string** | | [optional] [default to ""] +**BaseScore** | Pointer to **float32** | | [optional] [default to 0.0] +**Severity** | Pointer to [**SeverityType**](SeverityType.md) | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**QueryType** | **string** | | +**TargetSystems** | Pointer to **[]string** | | [optional] [default to []] +**Sources** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**SupportedOs** | Pointer to **[]string** | | [optional] [default to []] +**Sid** | Pointer to **int32** | | [optional] [default to 0] +**Metadata** | Pointer to **[]string** | | [optional] [default to []] +**References** | Pointer to **[]string** | | [optional] [default to []] +**Count** | Pointer to **int32** | | [optional] [default to 0] +**DefaultExpiration** | Pointer to **string** | | [optional] [default to "P90D"] +**Produces** | Pointer to **[]string** | | [optional] [default to []] +**Replaces** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewVerticesValue + +`func NewVerticesValue(value string, type_ string, id string, tags map[string]TagRelationshipOutput, rootType string, name string, relatedObservablesCount int32, pattern string, diamond DiamondModel, queryType string, ) *VerticesValue` + +NewVerticesValue instantiates a new VerticesValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVerticesValueWithDefaults + +`func NewVerticesValueWithDefaults() *VerticesValue` + +NewVerticesValueWithDefaults instantiates a new VerticesValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *VerticesValue) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *VerticesValue) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *VerticesValue) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *VerticesValue) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VerticesValue) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VerticesValue) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCreated + +`func (o *VerticesValue) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *VerticesValue) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *VerticesValue) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *VerticesValue) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *VerticesValue) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *VerticesValue) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *VerticesValue) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *VerticesValue) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *VerticesValue) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *VerticesValue) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *VerticesValue) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *VerticesValue) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetId + +`func (o *VerticesValue) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *VerticesValue) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *VerticesValue) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *VerticesValue) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *VerticesValue) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *VerticesValue) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *VerticesValue) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *VerticesValue) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *VerticesValue) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetName + +`func (o *VerticesValue) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *VerticesValue) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *VerticesValue) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *VerticesValue) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *VerticesValue) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *VerticesValue) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *VerticesValue) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetModified + +`func (o *VerticesValue) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *VerticesValue) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *VerticesValue) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *VerticesValue) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetReference + +`func (o *VerticesValue) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *VerticesValue) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *VerticesValue) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *VerticesValue) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetRelatedObservablesCount + +`func (o *VerticesValue) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *VerticesValue) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *VerticesValue) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + +### GetIdentityClass + +`func (o *VerticesValue) GetIdentityClass() string` + +GetIdentityClass returns the IdentityClass field if non-nil, zero value otherwise. + +### GetIdentityClassOk + +`func (o *VerticesValue) GetIdentityClassOk() (*string, bool)` + +GetIdentityClassOk returns a tuple with the IdentityClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityClass + +`func (o *VerticesValue) SetIdentityClass(v string)` + +SetIdentityClass sets IdentityClass field to given value. + +### HasIdentityClass + +`func (o *VerticesValue) HasIdentityClass() bool` + +HasIdentityClass returns a boolean if a field has been set. + +### GetSectors + +`func (o *VerticesValue) GetSectors() []string` + +GetSectors returns the Sectors field if non-nil, zero value otherwise. + +### GetSectorsOk + +`func (o *VerticesValue) GetSectorsOk() (*[]string, bool)` + +GetSectorsOk returns a tuple with the Sectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSectors + +`func (o *VerticesValue) SetSectors(v []string)` + +SetSectors sets Sectors field to given value. + +### HasSectors + +`func (o *VerticesValue) HasSectors() bool` + +HasSectors returns a boolean if a field has been set. + +### GetContactInformation + +`func (o *VerticesValue) GetContactInformation() string` + +GetContactInformation returns the ContactInformation field if non-nil, zero value otherwise. + +### GetContactInformationOk + +`func (o *VerticesValue) GetContactInformationOk() (*string, bool)` + +GetContactInformationOk returns a tuple with the ContactInformation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContactInformation + +`func (o *VerticesValue) SetContactInformation(v string)` + +SetContactInformation sets ContactInformation field to given value. + +### HasContactInformation + +`func (o *VerticesValue) HasContactInformation() bool` + +HasContactInformation returns a boolean if a field has been set. + +### GetAliases + +`func (o *VerticesValue) GetAliases() []string` + +GetAliases returns the Aliases field if non-nil, zero value otherwise. + +### GetAliasesOk + +`func (o *VerticesValue) GetAliasesOk() (*[]string, bool)` + +GetAliasesOk returns a tuple with the Aliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliases + +`func (o *VerticesValue) SetAliases(v []string)` + +SetAliases sets Aliases field to given value. + +### HasAliases + +`func (o *VerticesValue) HasAliases() bool` + +HasAliases returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *VerticesValue) GetFirstSeen() time.Time` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *VerticesValue) GetFirstSeenOk() (*time.Time, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *VerticesValue) SetFirstSeen(v time.Time)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *VerticesValue) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *VerticesValue) GetLastSeen() time.Time` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *VerticesValue) GetLastSeenOk() (*time.Time, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *VerticesValue) SetLastSeen(v time.Time)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *VerticesValue) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetKillChainPhases + +`func (o *VerticesValue) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *VerticesValue) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *VerticesValue) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *VerticesValue) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetToolVersion + +`func (o *VerticesValue) GetToolVersion() string` + +GetToolVersion returns the ToolVersion field if non-nil, zero value otherwise. + +### GetToolVersionOk + +`func (o *VerticesValue) GetToolVersionOk() (*string, bool)` + +GetToolVersionOk returns a tuple with the ToolVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolVersion + +`func (o *VerticesValue) SetToolVersion(v string)` + +SetToolVersion sets ToolVersion field to given value. + +### HasToolVersion + +`func (o *VerticesValue) HasToolVersion() bool` + +HasToolVersion returns a boolean if a field has been set. + +### GetThreatActorTypes + +`func (o *VerticesValue) GetThreatActorTypes() []string` + +GetThreatActorTypes returns the ThreatActorTypes field if non-nil, zero value otherwise. + +### GetThreatActorTypesOk + +`func (o *VerticesValue) GetThreatActorTypesOk() (*[]string, bool)` + +GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreatActorTypes + +`func (o *VerticesValue) SetThreatActorTypes(v []string)` + +SetThreatActorTypes sets ThreatActorTypes field to given value. + +### HasThreatActorTypes + +`func (o *VerticesValue) HasThreatActorTypes() bool` + +HasThreatActorTypes returns a boolean if a field has been set. + +### GetFamily + +`func (o *VerticesValue) GetFamily() string` + +GetFamily returns the Family field if non-nil, zero value otherwise. + +### GetFamilyOk + +`func (o *VerticesValue) GetFamilyOk() (*string, bool)` + +GetFamilyOk returns a tuple with the Family field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFamily + +`func (o *VerticesValue) SetFamily(v string)` + +SetFamily sets Family field to given value. + +### HasFamily + +`func (o *VerticesValue) HasFamily() bool` + +HasFamily returns a boolean if a field has been set. + +### GetTitle + +`func (o *VerticesValue) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *VerticesValue) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *VerticesValue) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *VerticesValue) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetBaseScore + +`func (o *VerticesValue) GetBaseScore() float32` + +GetBaseScore returns the BaseScore field if non-nil, zero value otherwise. + +### GetBaseScoreOk + +`func (o *VerticesValue) GetBaseScoreOk() (*float32, bool)` + +GetBaseScoreOk returns a tuple with the BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseScore + +`func (o *VerticesValue) SetBaseScore(v float32)` + +SetBaseScore sets BaseScore field to given value. + +### HasBaseScore + +`func (o *VerticesValue) HasBaseScore() bool` + +HasBaseScore returns a boolean if a field has been set. + +### GetSeverity + +`func (o *VerticesValue) GetSeverity() SeverityType` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *VerticesValue) GetSeverityOk() (*SeverityType, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *VerticesValue) SetSeverity(v SeverityType)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *VerticesValue) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *VerticesValue) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *VerticesValue) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *VerticesValue) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *VerticesValue) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *VerticesValue) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *VerticesValue) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *VerticesValue) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *VerticesValue) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *VerticesValue) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *VerticesValue) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *VerticesValue) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *VerticesValue) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *VerticesValue) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *VerticesValue) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *VerticesValue) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *VerticesValue) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *VerticesValue) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *VerticesValue) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetRelevantTags + +`func (o *VerticesValue) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *VerticesValue) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *VerticesValue) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *VerticesValue) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetQueryType + +`func (o *VerticesValue) GetQueryType() string` + +GetQueryType returns the QueryType field if non-nil, zero value otherwise. + +### GetQueryTypeOk + +`func (o *VerticesValue) GetQueryTypeOk() (*string, bool)` + +GetQueryTypeOk returns a tuple with the QueryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryType + +`func (o *VerticesValue) SetQueryType(v string)` + +SetQueryType sets QueryType field to given value. + + +### GetTargetSystems + +`func (o *VerticesValue) GetTargetSystems() []string` + +GetTargetSystems returns the TargetSystems field if non-nil, zero value otherwise. + +### GetTargetSystemsOk + +`func (o *VerticesValue) GetTargetSystemsOk() (*[]string, bool)` + +GetTargetSystemsOk returns a tuple with the TargetSystems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetSystems + +`func (o *VerticesValue) SetTargetSystems(v []string)` + +SetTargetSystems sets TargetSystems field to given value. + +### HasTargetSystems + +`func (o *VerticesValue) HasTargetSystems() bool` + +HasTargetSystems returns a boolean if a field has been set. + +### GetSources + +`func (o *VerticesValue) GetSources() []map[string]interface{}` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *VerticesValue) GetSourcesOk() (*[]map[string]interface{}, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *VerticesValue) SetSources(v []map[string]interface{})` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *VerticesValue) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetSupportedOs + +`func (o *VerticesValue) GetSupportedOs() []string` + +GetSupportedOs returns the SupportedOs field if non-nil, zero value otherwise. + +### GetSupportedOsOk + +`func (o *VerticesValue) GetSupportedOsOk() (*[]string, bool)` + +GetSupportedOsOk returns a tuple with the SupportedOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedOs + +`func (o *VerticesValue) SetSupportedOs(v []string)` + +SetSupportedOs sets SupportedOs field to given value. + +### HasSupportedOs + +`func (o *VerticesValue) HasSupportedOs() bool` + +HasSupportedOs returns a boolean if a field has been set. + +### GetSid + +`func (o *VerticesValue) GetSid() int32` + +GetSid returns the Sid field if non-nil, zero value otherwise. + +### GetSidOk + +`func (o *VerticesValue) GetSidOk() (*int32, bool)` + +GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSid + +`func (o *VerticesValue) SetSid(v int32)` + +SetSid sets Sid field to given value. + +### HasSid + +`func (o *VerticesValue) HasSid() bool` + +HasSid returns a boolean if a field has been set. + +### GetMetadata + +`func (o *VerticesValue) GetMetadata() []string` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *VerticesValue) GetMetadataOk() (*[]string, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *VerticesValue) SetMetadata(v []string)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *VerticesValue) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetReferences + +`func (o *VerticesValue) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *VerticesValue) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *VerticesValue) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *VerticesValue) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + +### GetCount + +`func (o *VerticesValue) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *VerticesValue) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *VerticesValue) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *VerticesValue) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetDefaultExpiration + +`func (o *VerticesValue) GetDefaultExpiration() string` + +GetDefaultExpiration returns the DefaultExpiration field if non-nil, zero value otherwise. + +### GetDefaultExpirationOk + +`func (o *VerticesValue) GetDefaultExpirationOk() (*string, bool)` + +GetDefaultExpirationOk returns a tuple with the DefaultExpiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultExpiration + +`func (o *VerticesValue) SetDefaultExpiration(v string)` + +SetDefaultExpiration sets DefaultExpiration field to given value. + +### HasDefaultExpiration + +`func (o *VerticesValue) HasDefaultExpiration() bool` + +HasDefaultExpiration returns a boolean if a field has been set. + +### GetProduces + +`func (o *VerticesValue) GetProduces() []string` + +GetProduces returns the Produces field if non-nil, zero value otherwise. + +### GetProducesOk + +`func (o *VerticesValue) GetProducesOk() (*[]string, bool)` + +GetProducesOk returns a tuple with the Produces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProduces + +`func (o *VerticesValue) SetProduces(v []string)` + +SetProduces sets Produces field to given value. + +### HasProduces + +`func (o *VerticesValue) HasProduces() bool` + +HasProduces returns a boolean if a field has been set. + +### GetReplaces + +`func (o *VerticesValue) GetReplaces() []string` + +GetReplaces returns the Replaces field if non-nil, zero value otherwise. + +### GetReplacesOk + +`func (o *VerticesValue) GetReplacesOk() (*[]string, bool)` + +GetReplacesOk returns a tuple with the Replaces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplaces + +`func (o *VerticesValue) SetReplaces(v []string)` + +SetReplaces sets Replaces field to given value. + +### HasReplaces + +`func (o *VerticesValue) HasReplaces() bool` + +HasReplaces returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VulnerabilityInput.md b/docs/VulnerabilityInput.md new file mode 100644 index 0000000..2c278d6 --- /dev/null +++ b/docs/VulnerabilityInput.md @@ -0,0 +1,285 @@ +# VulnerabilityInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "vulnerability"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Title** | Pointer to **string** | | [optional] [default to ""] +**BaseScore** | Pointer to **float32** | | [optional] [default to 0.0] +**Severity** | Pointer to [**SeverityType**](SeverityType.md) | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] + +## Methods + +### NewVulnerabilityInput + +`func NewVulnerabilityInput(name string, ) *VulnerabilityInput` + +NewVulnerabilityInput instantiates a new VulnerabilityInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityInputWithDefaults + +`func NewVulnerabilityInputWithDefaults() *VulnerabilityInput` + +NewVulnerabilityInputWithDefaults instantiates a new VulnerabilityInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *VulnerabilityInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VulnerabilityInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VulnerabilityInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *VulnerabilityInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *VulnerabilityInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *VulnerabilityInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *VulnerabilityInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *VulnerabilityInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *VulnerabilityInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *VulnerabilityInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *VulnerabilityInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *VulnerabilityInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *VulnerabilityInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *VulnerabilityInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *VulnerabilityInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *VulnerabilityInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *VulnerabilityInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *VulnerabilityInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *VulnerabilityInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *VulnerabilityInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *VulnerabilityInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *VulnerabilityInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *VulnerabilityInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetTitle + +`func (o *VulnerabilityInput) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *VulnerabilityInput) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *VulnerabilityInput) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *VulnerabilityInput) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetBaseScore + +`func (o *VulnerabilityInput) GetBaseScore() float32` + +GetBaseScore returns the BaseScore field if non-nil, zero value otherwise. + +### GetBaseScoreOk + +`func (o *VulnerabilityInput) GetBaseScoreOk() (*float32, bool)` + +GetBaseScoreOk returns a tuple with the BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseScore + +`func (o *VulnerabilityInput) SetBaseScore(v float32)` + +SetBaseScore sets BaseScore field to given value. + +### HasBaseScore + +`func (o *VulnerabilityInput) HasBaseScore() bool` + +HasBaseScore returns a boolean if a field has been set. + +### GetSeverity + +`func (o *VulnerabilityInput) GetSeverity() SeverityType` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *VulnerabilityInput) GetSeverityOk() (*SeverityType, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *VulnerabilityInput) SetSeverity(v SeverityType)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *VulnerabilityInput) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetReference + +`func (o *VulnerabilityInput) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *VulnerabilityInput) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *VulnerabilityInput) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *VulnerabilityInput) HasReference() bool` + +HasReference returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VulnerabilityOutput.md b/docs/VulnerabilityOutput.md new file mode 100644 index 0000000..34c3c1c --- /dev/null +++ b/docs/VulnerabilityOutput.md @@ -0,0 +1,369 @@ +# VulnerabilityOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] [default to "vulnerability"] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] [default to ""] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**Title** | Pointer to **string** | | [optional] [default to ""] +**BaseScore** | Pointer to **float32** | | [optional] [default to 0.0] +**Severity** | Pointer to [**SeverityType**](SeverityType.md) | | [optional] +**Reference** | Pointer to **string** | | [optional] [default to ""] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] +**RelatedObservablesCount** | **int32** | | [readonly] + +## Methods + +### NewVulnerabilityOutput + +`func NewVulnerabilityOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32, ) *VulnerabilityOutput` + +NewVulnerabilityOutput instantiates a new VulnerabilityOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityOutputWithDefaults + +`func NewVulnerabilityOutputWithDefaults() *VulnerabilityOutput` + +NewVulnerabilityOutputWithDefaults instantiates a new VulnerabilityOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *VulnerabilityOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VulnerabilityOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VulnerabilityOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *VulnerabilityOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *VulnerabilityOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *VulnerabilityOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *VulnerabilityOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *VulnerabilityOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *VulnerabilityOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *VulnerabilityOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *VulnerabilityOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetContext + +`func (o *VulnerabilityOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *VulnerabilityOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *VulnerabilityOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *VulnerabilityOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetCreated + +`func (o *VulnerabilityOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *VulnerabilityOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *VulnerabilityOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *VulnerabilityOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *VulnerabilityOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *VulnerabilityOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *VulnerabilityOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *VulnerabilityOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetTitle + +`func (o *VulnerabilityOutput) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *VulnerabilityOutput) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *VulnerabilityOutput) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *VulnerabilityOutput) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetBaseScore + +`func (o *VulnerabilityOutput) GetBaseScore() float32` + +GetBaseScore returns the BaseScore field if non-nil, zero value otherwise. + +### GetBaseScoreOk + +`func (o *VulnerabilityOutput) GetBaseScoreOk() (*float32, bool)` + +GetBaseScoreOk returns a tuple with the BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseScore + +`func (o *VulnerabilityOutput) SetBaseScore(v float32)` + +SetBaseScore sets BaseScore field to given value. + +### HasBaseScore + +`func (o *VulnerabilityOutput) HasBaseScore() bool` + +HasBaseScore returns a boolean if a field has been set. + +### GetSeverity + +`func (o *VulnerabilityOutput) GetSeverity() SeverityType` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *VulnerabilityOutput) GetSeverityOk() (*SeverityType, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *VulnerabilityOutput) SetSeverity(v SeverityType)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *VulnerabilityOutput) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetReference + +`func (o *VulnerabilityOutput) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *VulnerabilityOutput) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *VulnerabilityOutput) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *VulnerabilityOutput) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetId + +`func (o *VulnerabilityOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *VulnerabilityOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *VulnerabilityOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *VulnerabilityOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *VulnerabilityOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *VulnerabilityOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *VulnerabilityOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *VulnerabilityOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *VulnerabilityOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + +### GetRelatedObservablesCount + +`func (o *VulnerabilityOutput) GetRelatedObservablesCount() int32` + +GetRelatedObservablesCount returns the RelatedObservablesCount field if non-nil, zero value otherwise. + +### GetRelatedObservablesCountOk + +`func (o *VulnerabilityOutput) GetRelatedObservablesCountOk() (*int32, bool)` + +GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedObservablesCount + +`func (o *VulnerabilityOutput) SetRelatedObservablesCount(v int32)` + +SetRelatedObservablesCount sets RelatedObservablesCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WalletInput.md b/docs/WalletInput.md new file mode 100644 index 0000000..ddb3c7d --- /dev/null +++ b/docs/WalletInput.md @@ -0,0 +1,227 @@ +# WalletInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "wallet"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Coin** | Pointer to **NullableString** | | [optional] +**Address** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewWalletInput + +`func NewWalletInput(value string, ) *WalletInput` + +NewWalletInput instantiates a new WalletInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWalletInputWithDefaults + +`func NewWalletInputWithDefaults() *WalletInput` + +NewWalletInputWithDefaults instantiates a new WalletInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *WalletInput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *WalletInput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *WalletInput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *WalletInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *WalletInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *WalletInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *WalletInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *WalletInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *WalletInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *WalletInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *WalletInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *WalletInput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *WalletInput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *WalletInput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *WalletInput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *WalletInput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *WalletInput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *WalletInput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *WalletInput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetCoin + +`func (o *WalletInput) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *WalletInput) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *WalletInput) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *WalletInput) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### SetCoinNil + +`func (o *WalletInput) SetCoinNil(b bool)` + + SetCoinNil sets the value for Coin to be an explicit nil + +### UnsetCoin +`func (o *WalletInput) UnsetCoin()` + +UnsetCoin ensures that no value is present for Coin, not even an explicit nil +### GetAddress + +`func (o *WalletInput) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *WalletInput) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *WalletInput) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *WalletInput) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + +### SetAddressNil + +`func (o *WalletInput) SetAddressNil(b bool)` + + SetAddressNil sets the value for Address to be an explicit nil + +### UnsetAddress +`func (o *WalletInput) UnsetAddress()` + +UnsetAddress ensures that no value is present for Address, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WalletOutput.md b/docs/WalletOutput.md new file mode 100644 index 0000000..6330012 --- /dev/null +++ b/docs/WalletOutput.md @@ -0,0 +1,290 @@ +# WalletOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "wallet"] +**Created** | Pointer to **time.Time** | | [optional] +**Context** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**LastAnalysis** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] [default to {}] +**Coin** | Pointer to **NullableString** | | [optional] +**Address** | Pointer to **NullableString** | | [optional] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewWalletOutput + +`func NewWalletOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string, ) *WalletOutput` + +NewWalletOutput instantiates a new WalletOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWalletOutputWithDefaults + +`func NewWalletOutputWithDefaults() *WalletOutput` + +NewWalletOutputWithDefaults instantiates a new WalletOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *WalletOutput) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *WalletOutput) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *WalletOutput) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetType + +`func (o *WalletOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *WalletOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *WalletOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *WalletOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreated + +`func (o *WalletOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *WalletOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *WalletOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *WalletOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetContext + +`func (o *WalletOutput) GetContext() []map[string]interface{}` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *WalletOutput) GetContextOk() (*[]map[string]interface{}, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *WalletOutput) SetContext(v []map[string]interface{})` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *WalletOutput) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetLastAnalysis + +`func (o *WalletOutput) GetLastAnalysis() map[string]time.Time` + +GetLastAnalysis returns the LastAnalysis field if non-nil, zero value otherwise. + +### GetLastAnalysisOk + +`func (o *WalletOutput) GetLastAnalysisOk() (*map[string]time.Time, bool)` + +GetLastAnalysisOk returns a tuple with the LastAnalysis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAnalysis + +`func (o *WalletOutput) SetLastAnalysis(v map[string]time.Time)` + +SetLastAnalysis sets LastAnalysis field to given value. + +### HasLastAnalysis + +`func (o *WalletOutput) HasLastAnalysis() bool` + +HasLastAnalysis returns a boolean if a field has been set. + +### GetCoin + +`func (o *WalletOutput) GetCoin() string` + +GetCoin returns the Coin field if non-nil, zero value otherwise. + +### GetCoinOk + +`func (o *WalletOutput) GetCoinOk() (*string, bool)` + +GetCoinOk returns a tuple with the Coin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCoin + +`func (o *WalletOutput) SetCoin(v string)` + +SetCoin sets Coin field to given value. + +### HasCoin + +`func (o *WalletOutput) HasCoin() bool` + +HasCoin returns a boolean if a field has been set. + +### SetCoinNil + +`func (o *WalletOutput) SetCoinNil(b bool)` + + SetCoinNil sets the value for Coin to be an explicit nil + +### UnsetCoin +`func (o *WalletOutput) UnsetCoin()` + +UnsetCoin ensures that no value is present for Coin, not even an explicit nil +### GetAddress + +`func (o *WalletOutput) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *WalletOutput) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *WalletOutput) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *WalletOutput) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + +### SetAddressNil + +`func (o *WalletOutput) SetAddressNil(b bool)` + + SetAddressNil sets the value for Address to be an explicit nil + +### UnsetAddress +`func (o *WalletOutput) UnsetAddress()` + +UnsetAddress ensures that no value is present for Address, not even an explicit nil +### GetId + +`func (o *WalletOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WalletOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *WalletOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *WalletOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *WalletOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *WalletOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *WalletOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *WalletOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *WalletOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkerRestartResponse.md b/docs/WorkerRestartResponse.md new file mode 100644 index 0000000..7c8a1a5 --- /dev/null +++ b/docs/WorkerRestartResponse.md @@ -0,0 +1,72 @@ +# WorkerRestartResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Successes** | **[]string** | | +**Failures** | **[]string** | | + +## Methods + +### NewWorkerRestartResponse + +`func NewWorkerRestartResponse(successes []string, failures []string, ) *WorkerRestartResponse` + +NewWorkerRestartResponse instantiates a new WorkerRestartResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkerRestartResponseWithDefaults + +`func NewWorkerRestartResponseWithDefaults() *WorkerRestartResponse` + +NewWorkerRestartResponseWithDefaults instantiates a new WorkerRestartResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSuccesses + +`func (o *WorkerRestartResponse) GetSuccesses() []string` + +GetSuccesses returns the Successes field if non-nil, zero value otherwise. + +### GetSuccessesOk + +`func (o *WorkerRestartResponse) GetSuccessesOk() (*[]string, bool)` + +GetSuccessesOk returns a tuple with the Successes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuccesses + +`func (o *WorkerRestartResponse) SetSuccesses(v []string)` + +SetSuccesses sets Successes field to given value. + + +### GetFailures + +`func (o *WorkerRestartResponse) GetFailures() []string` + +GetFailures returns the Failures field if non-nil, zero value otherwise. + +### GetFailuresOk + +`func (o *WorkerRestartResponse) GetFailuresOk() (*[]string, bool)` + +GetFailuresOk returns a tuple with the Failures field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFailures + +`func (o *WorkerRestartResponse) SetFailures(v []string)` + +SetFailures sets Failures field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkerStatusResponse.md b/docs/WorkerStatusResponse.md new file mode 100644 index 0000000..3bcbc74 --- /dev/null +++ b/docs/WorkerStatusResponse.md @@ -0,0 +1,72 @@ +# WorkerStatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Registered** | **map[string][]string** | | +**Active** | **[][]interface{}** | | + +## Methods + +### NewWorkerStatusResponse + +`func NewWorkerStatusResponse(registered map[string][]string, active [][]interface{}, ) *WorkerStatusResponse` + +NewWorkerStatusResponse instantiates a new WorkerStatusResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkerStatusResponseWithDefaults + +`func NewWorkerStatusResponseWithDefaults() *WorkerStatusResponse` + +NewWorkerStatusResponseWithDefaults instantiates a new WorkerStatusResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRegistered + +`func (o *WorkerStatusResponse) GetRegistered() map[string][]string` + +GetRegistered returns the Registered field if non-nil, zero value otherwise. + +### GetRegisteredOk + +`func (o *WorkerStatusResponse) GetRegisteredOk() (*map[string][]string, bool)` + +GetRegisteredOk returns a tuple with the Registered field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegistered + +`func (o *WorkerStatusResponse) SetRegistered(v map[string][]string)` + +SetRegistered sets Registered field to given value. + + +### GetActive + +`func (o *WorkerStatusResponse) GetActive() [][]interface{}` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *WorkerStatusResponse) GetActiveOk() (*[][]interface{}, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *WorkerStatusResponse) SetActive(v [][]interface{})` + +SetActive sets Active field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/YaraInput.md b/docs/YaraInput.md new file mode 100644 index 0000000..b3ea2d9 --- /dev/null +++ b/docs/YaraInput.md @@ -0,0 +1,327 @@ +# YaraInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "yara"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewYaraInput + +`func NewYaraInput(name string, pattern string, diamond DiamondModel, ) *YaraInput` + +NewYaraInput instantiates a new YaraInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewYaraInputWithDefaults + +`func NewYaraInputWithDefaults() *YaraInput` + +NewYaraInputWithDefaults instantiates a new YaraInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *YaraInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *YaraInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *YaraInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *YaraInput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *YaraInput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *YaraInput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *YaraInput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *YaraInput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *YaraInput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *YaraInput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *YaraInput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *YaraInput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *YaraInput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *YaraInput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *YaraInput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *YaraInput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *YaraInput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *YaraInput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *YaraInput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *YaraInput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *YaraInput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *YaraInput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *YaraInput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *YaraInput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *YaraInput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *YaraInput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *YaraInput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *YaraInput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *YaraInput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *YaraInput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *YaraInput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *YaraInput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *YaraInput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *YaraInput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *YaraInput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *YaraInput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *YaraInput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *YaraInput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *YaraInput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *YaraInput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *YaraInput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *YaraInput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *YaraInput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *YaraInput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *YaraInput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/YaraOutput.md b/docs/YaraOutput.md new file mode 100644 index 0000000..10255ff --- /dev/null +++ b/docs/YaraOutput.md @@ -0,0 +1,390 @@ +# YaraOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | Pointer to **string** | | [optional] [default to "yara"] +**Description** | Pointer to **string** | | [optional] [default to ""] +**Created** | Pointer to **time.Time** | | [optional] +**Modified** | Pointer to **time.Time** | | [optional] +**ValidFrom** | Pointer to **time.Time** | | [optional] +**ValidUntil** | Pointer to **time.Time** | | [optional] +**Pattern** | **string** | | +**Location** | Pointer to **string** | | [optional] [default to ""] +**Diamond** | [**DiamondModel**](DiamondModel.md) | | +**KillChainPhases** | Pointer to **[]string** | | [optional] [default to []] +**RelevantTags** | Pointer to **[]string** | | [optional] [default to []] +**Id** | **string** | | [readonly] +**Tags** | [**map[string]TagRelationshipOutput**](TagRelationshipOutput.md) | | [readonly] +**RootType** | **string** | | [readonly] + +## Methods + +### NewYaraOutput + +`func NewYaraOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string, ) *YaraOutput` + +NewYaraOutput instantiates a new YaraOutput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewYaraOutputWithDefaults + +`func NewYaraOutputWithDefaults() *YaraOutput` + +NewYaraOutputWithDefaults instantiates a new YaraOutput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *YaraOutput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *YaraOutput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *YaraOutput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *YaraOutput) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *YaraOutput) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *YaraOutput) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *YaraOutput) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDescription + +`func (o *YaraOutput) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *YaraOutput) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *YaraOutput) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *YaraOutput) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreated + +`func (o *YaraOutput) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *YaraOutput) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *YaraOutput) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *YaraOutput) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetModified + +`func (o *YaraOutput) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *YaraOutput) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *YaraOutput) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *YaraOutput) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetValidFrom + +`func (o *YaraOutput) GetValidFrom() time.Time` + +GetValidFrom returns the ValidFrom field if non-nil, zero value otherwise. + +### GetValidFromOk + +`func (o *YaraOutput) GetValidFromOk() (*time.Time, bool)` + +GetValidFromOk returns a tuple with the ValidFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidFrom + +`func (o *YaraOutput) SetValidFrom(v time.Time)` + +SetValidFrom sets ValidFrom field to given value. + +### HasValidFrom + +`func (o *YaraOutput) HasValidFrom() bool` + +HasValidFrom returns a boolean if a field has been set. + +### GetValidUntil + +`func (o *YaraOutput) GetValidUntil() time.Time` + +GetValidUntil returns the ValidUntil field if non-nil, zero value otherwise. + +### GetValidUntilOk + +`func (o *YaraOutput) GetValidUntilOk() (*time.Time, bool)` + +GetValidUntilOk returns a tuple with the ValidUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidUntil + +`func (o *YaraOutput) SetValidUntil(v time.Time)` + +SetValidUntil sets ValidUntil field to given value. + +### HasValidUntil + +`func (o *YaraOutput) HasValidUntil() bool` + +HasValidUntil returns a boolean if a field has been set. + +### GetPattern + +`func (o *YaraOutput) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *YaraOutput) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *YaraOutput) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetLocation + +`func (o *YaraOutput) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *YaraOutput) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *YaraOutput) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *YaraOutput) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetDiamond + +`func (o *YaraOutput) GetDiamond() DiamondModel` + +GetDiamond returns the Diamond field if non-nil, zero value otherwise. + +### GetDiamondOk + +`func (o *YaraOutput) GetDiamondOk() (*DiamondModel, bool)` + +GetDiamondOk returns a tuple with the Diamond field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiamond + +`func (o *YaraOutput) SetDiamond(v DiamondModel)` + +SetDiamond sets Diamond field to given value. + + +### GetKillChainPhases + +`func (o *YaraOutput) GetKillChainPhases() []string` + +GetKillChainPhases returns the KillChainPhases field if non-nil, zero value otherwise. + +### GetKillChainPhasesOk + +`func (o *YaraOutput) GetKillChainPhasesOk() (*[]string, bool)` + +GetKillChainPhasesOk returns a tuple with the KillChainPhases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKillChainPhases + +`func (o *YaraOutput) SetKillChainPhases(v []string)` + +SetKillChainPhases sets KillChainPhases field to given value. + +### HasKillChainPhases + +`func (o *YaraOutput) HasKillChainPhases() bool` + +HasKillChainPhases returns a boolean if a field has been set. + +### GetRelevantTags + +`func (o *YaraOutput) GetRelevantTags() []string` + +GetRelevantTags returns the RelevantTags field if non-nil, zero value otherwise. + +### GetRelevantTagsOk + +`func (o *YaraOutput) GetRelevantTagsOk() (*[]string, bool)` + +GetRelevantTagsOk returns a tuple with the RelevantTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelevantTags + +`func (o *YaraOutput) SetRelevantTags(v []string)` + +SetRelevantTags sets RelevantTags field to given value. + +### HasRelevantTags + +`func (o *YaraOutput) HasRelevantTags() bool` + +HasRelevantTags returns a boolean if a field has been set. + +### GetId + +`func (o *YaraOutput) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *YaraOutput) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *YaraOutput) SetId(v string)` + +SetId sets Id field to given value. + + +### GetTags + +`func (o *YaraOutput) GetTags() map[string]TagRelationshipOutput` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *YaraOutput) GetTagsOk() (*map[string]TagRelationshipOutput, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *YaraOutput) SetTags(v map[string]TagRelationshipOutput)` + +SetTags sets Tags field to given value. + + +### GetRootType + +`func (o *YaraOutput) GetRootType() string` + +GetRootType returns the RootType field if non-nil, zero value otherwise. + +### GetRootTypeOk + +`func (o *YaraOutput) GetRootTypeOk() (*string, bool)` + +GetRootTypeOk returns a tuple with the RootType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRootType + +`func (o *YaraOutput) SetRootType(v string)` + +SetRootType sets RootType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/observable_test.go b/examples/observable_test.go index 31c6617..a6dd8d0 100644 --- a/examples/observable_test.go +++ b/examples/observable_test.go @@ -1,50 +1,79 @@ -// Description: This is a simple example of how to use the goyeti package to: -// - authenticate with the Yeti platform. -// - do arbitrary queries in the Yeti platform. -// - search for observables in the Yeti platform. -// Note that you need to setup the YETI_URL and YETI_API_KEY environment variables to run this example. package main import ( + "context" "fmt" - "net/http" "os" "github.com/yeti-platform/goyeti" - "github.com/yeti-platform/goyeti/models" + "golang.org/x/oauth2" ) func ExampleObservable() { domain := "email2.elibria.io" - client := goyeti.NewYetiClient( - os.Getenv("YETI_URL"), - 443, - os.Getenv("YETI_API_KEY"), + auth := context.WithValue( + context.Background(), + goyeti.ContextAPIKeys, + map[string]goyeti.APIKey{ + "APIKeyHeader": {Key: os.Getenv("YETI_API_KEY")}, + }, ) - err := client.Init() + cfg := goyeti.NewConfiguration() + cfg.Host = os.Getenv("YETI_URL") + cfg.Scheme = "https" + client := goyeti.NewAPIClient(cfg) + body, resp, err := client.AuthAPI.LoginApiApiV2AuthApiTokenPost(auth).Execute() if err != nil { panic(err) } - whoami, err := client.Query("api/v2/auth/me", http.MethodGet, nil) + if resp.StatusCode != 200 { + panic(fmt.Errorf("Failed to authenticate with status code %d", resp.StatusCode)) + } + + access_token := body.(map[string]interface{})["access_token"].(string) + tokenSource := oauth2.StaticTokenSource(&oauth2.Token{ + AccessToken: access_token, + TokenType: "Bearer", + }) + auth = context.WithValue(context.Background(), goyeti.ContextOAuth2, tokenSource) + + whoami, response, err := client.AuthAPI.MeApiV2AuthMeGet(auth).Execute() if err != nil { panic(err) } - fmt.Printf("Connected: %t\n", whoami["enabled"].(bool)) - query := models.QuerySearch{ - Query: map[string]interface{}{"value": domain}, - Type: "hostname", - Count: 50, - Page: 0, + if response.StatusCode != 200 { + panic(fmt.Errorf("Failed to get user details with status code %d", response.StatusCode)) } - observables, err := client.ObservablesSearch(query) - if err != nil { - panic(err) + _, connected := whoami.GetIdOk() + fmt.Println("Connected:", connected) + + queryType := goyeti.HOSTNAME + observableSearchRequest := goyeti.NewObservableSearchRequest() + observableSearchRequest.SetType( + goyeti.ObservableSearchRequestType{ + ObservableTypeInput: &queryType, + }, + ) + query := map[string]goyeti.QueryValue{ + "value": goyeti.QueryValue{ + String: &domain, + }, } - fmt.Printf("Total observables found %d for domain %s\n", observables.Total, domain) - err = client.Close() + observableSearchRequest.SetQuery(query) + + observableResponse, reponse, err := client.ObservablesAPI.SearchApiV2ObservablesSearchPost(auth).ObservableSearchRequest(*observableSearchRequest).Execute() if err != nil { panic(err) } + if reponse.StatusCode != 200 { + panic(fmt.Errorf("Failed to search observables with status code %d", reponse.StatusCode)) + } + obeservables := observableResponse.GetObservables() + fmt.Printf("Total observables found %d for domain %s\n", len(observableResponse.Observables), domain) + for _, observable := range obeservables { + fmt.Printf("%s created at %s\n", observable.ASNOutput.Value, observable.ASNOutput.Created) + } //Output: Connected: true //Total observables found 1 for domain email2.elibria.io + //email2.elibria.io created at 2024-07-05 13:20:42.782787 +0000 UTC } diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..9227373 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="yeti-platform" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="goyeti" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/go.mod b/go.mod index 3d2ac5e..4290202 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,19 @@ module github.com/yeti-platform/goyeti -go 1.23.1 +go 1.18 require ( - github.com/mitchellh/mapstructure v1.5.0 - github.com/stretchr/testify v1.9.0 - go.uber.org/mock v0.4.0 + github.com/stretchr/testify v1.4.0 + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 + gopkg.in/validator.v2 v2.0.1 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/golang/protobuf v1.4.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect + golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect + google.golang.org/appengine v1.6.6 // indirect + google.golang.org/protobuf v1.25.0 // indirect + gopkg.in/yaml.v2 v2.2.2 // indirect ) diff --git a/go.sum b/go.sum index 59219b7..fb8442d 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,371 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/validator.v2 v2.0.1 h1:xF0KWyGWXm/LM2G1TrEjqOu4pa6coO9AlWSf3msVfDY= +gopkg.in/validator.v2 v2.0.1/go.mod h1:lIUZBlB3Im4s/eYp39Ry/wkR02yOPhZ9IwIRBjuPuG8= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/model_add_context_request.go b/model_add_context_request.go new file mode 100644 index 0000000..cf34754 --- /dev/null +++ b/model_add_context_request.go @@ -0,0 +1,232 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the AddContextRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddContextRequest{} + +// AddContextRequest struct for AddContextRequest +type AddContextRequest struct { + Source string `json:"source"` + Context map[string]interface{} `json:"context"` + SkipCompare []interface{} `json:"skip_compare,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AddContextRequest AddContextRequest + +// NewAddContextRequest instantiates a new AddContextRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddContextRequest(source string, context map[string]interface{}) *AddContextRequest { + this := AddContextRequest{} + this.Source = source + this.Context = context + return &this +} + +// NewAddContextRequestWithDefaults instantiates a new AddContextRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddContextRequestWithDefaults() *AddContextRequest { + this := AddContextRequest{} + return &this +} + +// GetSource returns the Source field value +func (o *AddContextRequest) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *AddContextRequest) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *AddContextRequest) SetSource(v string) { + o.Source = v +} + +// GetContext returns the Context field value +func (o *AddContextRequest) GetContext() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *AddContextRequest) GetContextOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Context, true +} + +// SetContext sets field value +func (o *AddContextRequest) SetContext(v map[string]interface{}) { + o.Context = v +} + +// GetSkipCompare returns the SkipCompare field value if set, zero value otherwise. +func (o *AddContextRequest) GetSkipCompare() []interface{} { + if o == nil || IsNil(o.SkipCompare) { + var ret []interface{} + return ret + } + return o.SkipCompare +} + +// GetSkipCompareOk returns a tuple with the SkipCompare field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddContextRequest) GetSkipCompareOk() ([]interface{}, bool) { + if o == nil || IsNil(o.SkipCompare) { + return nil, false + } + return o.SkipCompare, true +} + +// HasSkipCompare returns a boolean if a field has been set. +func (o *AddContextRequest) HasSkipCompare() bool { + if o != nil && !IsNil(o.SkipCompare) { + return true + } + + return false +} + +// SetSkipCompare gets a reference to the given []interface{} and assigns it to the SkipCompare field. +func (o *AddContextRequest) SetSkipCompare(v []interface{}) { + o.SkipCompare = v +} + +func (o AddContextRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddContextRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source"] = o.Source + toSerialize["context"] = o.Context + if !IsNil(o.SkipCompare) { + toSerialize["skip_compare"] = o.SkipCompare + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AddContextRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source", + "context", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddContextRequest := _AddContextRequest{} + + err = json.Unmarshal(data, &varAddContextRequest) + + if err != nil { + return err + } + + *o = AddContextRequest(varAddContextRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "source") + delete(additionalProperties, "context") + delete(additionalProperties, "skip_compare") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAddContextRequest struct { + value *AddContextRequest + isSet bool +} + +func (v NullableAddContextRequest) Get() *AddContextRequest { + return v.value +} + +func (v *NullableAddContextRequest) Set(val *AddContextRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddContextRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddContextRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddContextRequest(val *AddContextRequest) *NullableAddContextRequest { + return &NullableAddContextRequest{value: val, isSet: true} +} + +func (v NullableAddContextRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddContextRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_add_text_request.go b/model_add_text_request.go new file mode 100644 index 0000000..74ed9c3 --- /dev/null +++ b/model_add_text_request.go @@ -0,0 +1,203 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the AddTextRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddTextRequest{} + +// AddTextRequest struct for AddTextRequest +type AddTextRequest struct { + Tags []string `json:"tags,omitempty"` + Text string `json:"text"` + AdditionalProperties map[string]interface{} +} + +type _AddTextRequest AddTextRequest + +// NewAddTextRequest instantiates a new AddTextRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddTextRequest(text string) *AddTextRequest { + this := AddTextRequest{} + this.Text = text + return &this +} + +// NewAddTextRequestWithDefaults instantiates a new AddTextRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddTextRequestWithDefaults() *AddTextRequest { + this := AddTextRequest{} + return &this +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *AddTextRequest) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddTextRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *AddTextRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *AddTextRequest) SetTags(v []string) { + o.Tags = v +} + +// GetText returns the Text field value +func (o *AddTextRequest) GetText() string { + if o == nil { + var ret string + return ret + } + + return o.Text +} + +// GetTextOk returns a tuple with the Text field value +// and a boolean to check if the value has been set. +func (o *AddTextRequest) GetTextOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Text, true +} + +// SetText sets field value +func (o *AddTextRequest) SetText(v string) { + o.Text = v +} + +func (o AddTextRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddTextRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + toSerialize["text"] = o.Text + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AddTextRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "text", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddTextRequest := _AddTextRequest{} + + err = json.Unmarshal(data, &varAddTextRequest) + + if err != nil { + return err + } + + *o = AddTextRequest(varAddTextRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tags") + delete(additionalProperties, "text") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAddTextRequest struct { + value *AddTextRequest + isSet bool +} + +func (v NullableAddTextRequest) Get() *AddTextRequest { + return v.value +} + +func (v *NullableAddTextRequest) Set(val *AddTextRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddTextRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddTextRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddTextRequest(val *AddTextRequest) *NullableAddTextRequest { + return &NullableAddTextRequest{value: val, isSet: true} +} + +func (v NullableAddTextRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddTextRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_added_inner.go b/model_added_inner.go new file mode 100644 index 0000000..e930f6a --- /dev/null +++ b/model_added_inner.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// AddedInner struct for AddedInner +type AddedInner struct { + ASNOutput *ASNOutput + BICOutput *BICOutput + CIDROutput *CIDROutput + CertificateOutput *CertificateOutput + CommandLineOutput *CommandLineOutput + DockerImageOutput *DockerImageOutput + EmailOutput *EmailOutput + FileOutput *FileOutput + GenericOutput *GenericOutput + HostnameOutput *HostnameOutput + IBANOutput *IBANOutput + IPv4Output *IPv4Output + IPv6Output *IPv6Output + ImphashOutput *ImphashOutput + JA3Output *JA3Output + JARMOutput *JARMOutput + MD5Output *MD5Output + MacAddressOutput *MacAddressOutput + MutexOutput *MutexOutput + NamedPipeOutput *NamedPipeOutput + PackageOutput *PackageOutput + PathOutput *PathOutput + RegistryKeyOutput *RegistryKeyOutput + SHA1Output *SHA1Output + SHA256Output *SHA256Output + SsdeepOutput *SsdeepOutput + TLSHOutput *TLSHOutput + UrlOutput *UrlOutput + UserAccountOutput *UserAccountOutput + UserAgentOutput *UserAgentOutput + WalletOutput *WalletOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *AddedInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNOutput + err = json.Unmarshal(data, &dst.ASNOutput) + if err == nil { + jsonASNOutput, _ := json.Marshal(dst.ASNOutput) + if string(jsonASNOutput) == "{}" { // empty struct + dst.ASNOutput = nil + } else { + return nil // data stored in dst.ASNOutput, return on the first match + } + } else { + dst.ASNOutput = nil + } + + // try to unmarshal JSON data into BICOutput + err = json.Unmarshal(data, &dst.BICOutput) + if err == nil { + jsonBICOutput, _ := json.Marshal(dst.BICOutput) + if string(jsonBICOutput) == "{}" { // empty struct + dst.BICOutput = nil + } else { + return nil // data stored in dst.BICOutput, return on the first match + } + } else { + dst.BICOutput = nil + } + + // try to unmarshal JSON data into CIDROutput + err = json.Unmarshal(data, &dst.CIDROutput) + if err == nil { + jsonCIDROutput, _ := json.Marshal(dst.CIDROutput) + if string(jsonCIDROutput) == "{}" { // empty struct + dst.CIDROutput = nil + } else { + return nil // data stored in dst.CIDROutput, return on the first match + } + } else { + dst.CIDROutput = nil + } + + // try to unmarshal JSON data into CertificateOutput + err = json.Unmarshal(data, &dst.CertificateOutput) + if err == nil { + jsonCertificateOutput, _ := json.Marshal(dst.CertificateOutput) + if string(jsonCertificateOutput) == "{}" { // empty struct + dst.CertificateOutput = nil + } else { + return nil // data stored in dst.CertificateOutput, return on the first match + } + } else { + dst.CertificateOutput = nil + } + + // try to unmarshal JSON data into CommandLineOutput + err = json.Unmarshal(data, &dst.CommandLineOutput) + if err == nil { + jsonCommandLineOutput, _ := json.Marshal(dst.CommandLineOutput) + if string(jsonCommandLineOutput) == "{}" { // empty struct + dst.CommandLineOutput = nil + } else { + return nil // data stored in dst.CommandLineOutput, return on the first match + } + } else { + dst.CommandLineOutput = nil + } + + // try to unmarshal JSON data into DockerImageOutput + err = json.Unmarshal(data, &dst.DockerImageOutput) + if err == nil { + jsonDockerImageOutput, _ := json.Marshal(dst.DockerImageOutput) + if string(jsonDockerImageOutput) == "{}" { // empty struct + dst.DockerImageOutput = nil + } else { + return nil // data stored in dst.DockerImageOutput, return on the first match + } + } else { + dst.DockerImageOutput = nil + } + + // try to unmarshal JSON data into EmailOutput + err = json.Unmarshal(data, &dst.EmailOutput) + if err == nil { + jsonEmailOutput, _ := json.Marshal(dst.EmailOutput) + if string(jsonEmailOutput) == "{}" { // empty struct + dst.EmailOutput = nil + } else { + return nil // data stored in dst.EmailOutput, return on the first match + } + } else { + dst.EmailOutput = nil + } + + // try to unmarshal JSON data into FileOutput + err = json.Unmarshal(data, &dst.FileOutput) + if err == nil { + jsonFileOutput, _ := json.Marshal(dst.FileOutput) + if string(jsonFileOutput) == "{}" { // empty struct + dst.FileOutput = nil + } else { + return nil // data stored in dst.FileOutput, return on the first match + } + } else { + dst.FileOutput = nil + } + + // try to unmarshal JSON data into GenericOutput + err = json.Unmarshal(data, &dst.GenericOutput) + if err == nil { + jsonGenericOutput, _ := json.Marshal(dst.GenericOutput) + if string(jsonGenericOutput) == "{}" { // empty struct + dst.GenericOutput = nil + } else { + return nil // data stored in dst.GenericOutput, return on the first match + } + } else { + dst.GenericOutput = nil + } + + // try to unmarshal JSON data into HostnameOutput + err = json.Unmarshal(data, &dst.HostnameOutput) + if err == nil { + jsonHostnameOutput, _ := json.Marshal(dst.HostnameOutput) + if string(jsonHostnameOutput) == "{}" { // empty struct + dst.HostnameOutput = nil + } else { + return nil // data stored in dst.HostnameOutput, return on the first match + } + } else { + dst.HostnameOutput = nil + } + + // try to unmarshal JSON data into IBANOutput + err = json.Unmarshal(data, &dst.IBANOutput) + if err == nil { + jsonIBANOutput, _ := json.Marshal(dst.IBANOutput) + if string(jsonIBANOutput) == "{}" { // empty struct + dst.IBANOutput = nil + } else { + return nil // data stored in dst.IBANOutput, return on the first match + } + } else { + dst.IBANOutput = nil + } + + // try to unmarshal JSON data into IPv4Output + err = json.Unmarshal(data, &dst.IPv4Output) + if err == nil { + jsonIPv4Output, _ := json.Marshal(dst.IPv4Output) + if string(jsonIPv4Output) == "{}" { // empty struct + dst.IPv4Output = nil + } else { + return nil // data stored in dst.IPv4Output, return on the first match + } + } else { + dst.IPv4Output = nil + } + + // try to unmarshal JSON data into IPv6Output + err = json.Unmarshal(data, &dst.IPv6Output) + if err == nil { + jsonIPv6Output, _ := json.Marshal(dst.IPv6Output) + if string(jsonIPv6Output) == "{}" { // empty struct + dst.IPv6Output = nil + } else { + return nil // data stored in dst.IPv6Output, return on the first match + } + } else { + dst.IPv6Output = nil + } + + // try to unmarshal JSON data into ImphashOutput + err = json.Unmarshal(data, &dst.ImphashOutput) + if err == nil { + jsonImphashOutput, _ := json.Marshal(dst.ImphashOutput) + if string(jsonImphashOutput) == "{}" { // empty struct + dst.ImphashOutput = nil + } else { + return nil // data stored in dst.ImphashOutput, return on the first match + } + } else { + dst.ImphashOutput = nil + } + + // try to unmarshal JSON data into JA3Output + err = json.Unmarshal(data, &dst.JA3Output) + if err == nil { + jsonJA3Output, _ := json.Marshal(dst.JA3Output) + if string(jsonJA3Output) == "{}" { // empty struct + dst.JA3Output = nil + } else { + return nil // data stored in dst.JA3Output, return on the first match + } + } else { + dst.JA3Output = nil + } + + // try to unmarshal JSON data into JARMOutput + err = json.Unmarshal(data, &dst.JARMOutput) + if err == nil { + jsonJARMOutput, _ := json.Marshal(dst.JARMOutput) + if string(jsonJARMOutput) == "{}" { // empty struct + dst.JARMOutput = nil + } else { + return nil // data stored in dst.JARMOutput, return on the first match + } + } else { + dst.JARMOutput = nil + } + + // try to unmarshal JSON data into MD5Output + err = json.Unmarshal(data, &dst.MD5Output) + if err == nil { + jsonMD5Output, _ := json.Marshal(dst.MD5Output) + if string(jsonMD5Output) == "{}" { // empty struct + dst.MD5Output = nil + } else { + return nil // data stored in dst.MD5Output, return on the first match + } + } else { + dst.MD5Output = nil + } + + // try to unmarshal JSON data into MacAddressOutput + err = json.Unmarshal(data, &dst.MacAddressOutput) + if err == nil { + jsonMacAddressOutput, _ := json.Marshal(dst.MacAddressOutput) + if string(jsonMacAddressOutput) == "{}" { // empty struct + dst.MacAddressOutput = nil + } else { + return nil // data stored in dst.MacAddressOutput, return on the first match + } + } else { + dst.MacAddressOutput = nil + } + + // try to unmarshal JSON data into MutexOutput + err = json.Unmarshal(data, &dst.MutexOutput) + if err == nil { + jsonMutexOutput, _ := json.Marshal(dst.MutexOutput) + if string(jsonMutexOutput) == "{}" { // empty struct + dst.MutexOutput = nil + } else { + return nil // data stored in dst.MutexOutput, return on the first match + } + } else { + dst.MutexOutput = nil + } + + // try to unmarshal JSON data into NamedPipeOutput + err = json.Unmarshal(data, &dst.NamedPipeOutput) + if err == nil { + jsonNamedPipeOutput, _ := json.Marshal(dst.NamedPipeOutput) + if string(jsonNamedPipeOutput) == "{}" { // empty struct + dst.NamedPipeOutput = nil + } else { + return nil // data stored in dst.NamedPipeOutput, return on the first match + } + } else { + dst.NamedPipeOutput = nil + } + + // try to unmarshal JSON data into PackageOutput + err = json.Unmarshal(data, &dst.PackageOutput) + if err == nil { + jsonPackageOutput, _ := json.Marshal(dst.PackageOutput) + if string(jsonPackageOutput) == "{}" { // empty struct + dst.PackageOutput = nil + } else { + return nil // data stored in dst.PackageOutput, return on the first match + } + } else { + dst.PackageOutput = nil + } + + // try to unmarshal JSON data into PathOutput + err = json.Unmarshal(data, &dst.PathOutput) + if err == nil { + jsonPathOutput, _ := json.Marshal(dst.PathOutput) + if string(jsonPathOutput) == "{}" { // empty struct + dst.PathOutput = nil + } else { + return nil // data stored in dst.PathOutput, return on the first match + } + } else { + dst.PathOutput = nil + } + + // try to unmarshal JSON data into RegistryKeyOutput + err = json.Unmarshal(data, &dst.RegistryKeyOutput) + if err == nil { + jsonRegistryKeyOutput, _ := json.Marshal(dst.RegistryKeyOutput) + if string(jsonRegistryKeyOutput) == "{}" { // empty struct + dst.RegistryKeyOutput = nil + } else { + return nil // data stored in dst.RegistryKeyOutput, return on the first match + } + } else { + dst.RegistryKeyOutput = nil + } + + // try to unmarshal JSON data into SHA1Output + err = json.Unmarshal(data, &dst.SHA1Output) + if err == nil { + jsonSHA1Output, _ := json.Marshal(dst.SHA1Output) + if string(jsonSHA1Output) == "{}" { // empty struct + dst.SHA1Output = nil + } else { + return nil // data stored in dst.SHA1Output, return on the first match + } + } else { + dst.SHA1Output = nil + } + + // try to unmarshal JSON data into SHA256Output + err = json.Unmarshal(data, &dst.SHA256Output) + if err == nil { + jsonSHA256Output, _ := json.Marshal(dst.SHA256Output) + if string(jsonSHA256Output) == "{}" { // empty struct + dst.SHA256Output = nil + } else { + return nil // data stored in dst.SHA256Output, return on the first match + } + } else { + dst.SHA256Output = nil + } + + // try to unmarshal JSON data into SsdeepOutput + err = json.Unmarshal(data, &dst.SsdeepOutput) + if err == nil { + jsonSsdeepOutput, _ := json.Marshal(dst.SsdeepOutput) + if string(jsonSsdeepOutput) == "{}" { // empty struct + dst.SsdeepOutput = nil + } else { + return nil // data stored in dst.SsdeepOutput, return on the first match + } + } else { + dst.SsdeepOutput = nil + } + + // try to unmarshal JSON data into TLSHOutput + err = json.Unmarshal(data, &dst.TLSHOutput) + if err == nil { + jsonTLSHOutput, _ := json.Marshal(dst.TLSHOutput) + if string(jsonTLSHOutput) == "{}" { // empty struct + dst.TLSHOutput = nil + } else { + return nil // data stored in dst.TLSHOutput, return on the first match + } + } else { + dst.TLSHOutput = nil + } + + // try to unmarshal JSON data into UrlOutput + err = json.Unmarshal(data, &dst.UrlOutput) + if err == nil { + jsonUrlOutput, _ := json.Marshal(dst.UrlOutput) + if string(jsonUrlOutput) == "{}" { // empty struct + dst.UrlOutput = nil + } else { + return nil // data stored in dst.UrlOutput, return on the first match + } + } else { + dst.UrlOutput = nil + } + + // try to unmarshal JSON data into UserAccountOutput + err = json.Unmarshal(data, &dst.UserAccountOutput) + if err == nil { + jsonUserAccountOutput, _ := json.Marshal(dst.UserAccountOutput) + if string(jsonUserAccountOutput) == "{}" { // empty struct + dst.UserAccountOutput = nil + } else { + return nil // data stored in dst.UserAccountOutput, return on the first match + } + } else { + dst.UserAccountOutput = nil + } + + // try to unmarshal JSON data into UserAgentOutput + err = json.Unmarshal(data, &dst.UserAgentOutput) + if err == nil { + jsonUserAgentOutput, _ := json.Marshal(dst.UserAgentOutput) + if string(jsonUserAgentOutput) == "{}" { // empty struct + dst.UserAgentOutput = nil + } else { + return nil // data stored in dst.UserAgentOutput, return on the first match + } + } else { + dst.UserAgentOutput = nil + } + + // try to unmarshal JSON data into WalletOutput + err = json.Unmarshal(data, &dst.WalletOutput) + if err == nil { + jsonWalletOutput, _ := json.Marshal(dst.WalletOutput) + if string(jsonWalletOutput) == "{}" { // empty struct + dst.WalletOutput = nil + } else { + return nil // data stored in dst.WalletOutput, return on the first match + } + } else { + dst.WalletOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(AddedInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src AddedInner) MarshalJSON() ([]byte, error) { + if src.ASNOutput != nil { + return json.Marshal(&src.ASNOutput) + } + + if src.BICOutput != nil { + return json.Marshal(&src.BICOutput) + } + + if src.CIDROutput != nil { + return json.Marshal(&src.CIDROutput) + } + + if src.CertificateOutput != nil { + return json.Marshal(&src.CertificateOutput) + } + + if src.CommandLineOutput != nil { + return json.Marshal(&src.CommandLineOutput) + } + + if src.DockerImageOutput != nil { + return json.Marshal(&src.DockerImageOutput) + } + + if src.EmailOutput != nil { + return json.Marshal(&src.EmailOutput) + } + + if src.FileOutput != nil { + return json.Marshal(&src.FileOutput) + } + + if src.GenericOutput != nil { + return json.Marshal(&src.GenericOutput) + } + + if src.HostnameOutput != nil { + return json.Marshal(&src.HostnameOutput) + } + + if src.IBANOutput != nil { + return json.Marshal(&src.IBANOutput) + } + + if src.IPv4Output != nil { + return json.Marshal(&src.IPv4Output) + } + + if src.IPv6Output != nil { + return json.Marshal(&src.IPv6Output) + } + + if src.ImphashOutput != nil { + return json.Marshal(&src.ImphashOutput) + } + + if src.JA3Output != nil { + return json.Marshal(&src.JA3Output) + } + + if src.JARMOutput != nil { + return json.Marshal(&src.JARMOutput) + } + + if src.MD5Output != nil { + return json.Marshal(&src.MD5Output) + } + + if src.MacAddressOutput != nil { + return json.Marshal(&src.MacAddressOutput) + } + + if src.MutexOutput != nil { + return json.Marshal(&src.MutexOutput) + } + + if src.NamedPipeOutput != nil { + return json.Marshal(&src.NamedPipeOutput) + } + + if src.PackageOutput != nil { + return json.Marshal(&src.PackageOutput) + } + + if src.PathOutput != nil { + return json.Marshal(&src.PathOutput) + } + + if src.RegistryKeyOutput != nil { + return json.Marshal(&src.RegistryKeyOutput) + } + + if src.SHA1Output != nil { + return json.Marshal(&src.SHA1Output) + } + + if src.SHA256Output != nil { + return json.Marshal(&src.SHA256Output) + } + + if src.SsdeepOutput != nil { + return json.Marshal(&src.SsdeepOutput) + } + + if src.TLSHOutput != nil { + return json.Marshal(&src.TLSHOutput) + } + + if src.UrlOutput != nil { + return json.Marshal(&src.UrlOutput) + } + + if src.UserAccountOutput != nil { + return json.Marshal(&src.UserAccountOutput) + } + + if src.UserAgentOutput != nil { + return json.Marshal(&src.UserAgentOutput) + } + + if src.WalletOutput != nil { + return json.Marshal(&src.WalletOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableAddedInner struct { + value *AddedInner + isSet bool +} + +func (v NullableAddedInner) Get() *AddedInner { + return v.value +} + +func (v *NullableAddedInner) Set(val *AddedInner) { + v.value = val + v.isSet = true +} + +func (v NullableAddedInner) IsSet() bool { + return v.isSet +} + +func (v *NullableAddedInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddedInner(val *AddedInner) *NullableAddedInner { + return &NullableAddedInner{value: val, isSet: true} +} + +func (v NullableAddedInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddedInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_analysis_request.go b/model_analysis_request.go new file mode 100644 index 0000000..68e97a8 --- /dev/null +++ b/model_analysis_request.go @@ -0,0 +1,359 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AnalysisRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnalysisRequest{} + +// AnalysisRequest struct for AnalysisRequest +type AnalysisRequest struct { + Observables []string `json:"observables"` + AddTags []string `json:"add_tags,omitempty"` + RegexMatch *bool `json:"regex_match,omitempty"` + AddType NullableObservableTypeInput `json:"add_type,omitempty"` + FetchNeighbors *bool `json:"fetch_neighbors,omitempty"` + AddUnknown *bool `json:"add_unknown,omitempty"` +} + +type _AnalysisRequest AnalysisRequest + +// NewAnalysisRequest instantiates a new AnalysisRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalysisRequest(observables []string) *AnalysisRequest { + this := AnalysisRequest{} + this.Observables = observables + var regexMatch bool = false + this.RegexMatch = ®exMatch + var fetchNeighbors bool = true + this.FetchNeighbors = &fetchNeighbors + var addUnknown bool = false + this.AddUnknown = &addUnknown + return &this +} + +// NewAnalysisRequestWithDefaults instantiates a new AnalysisRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalysisRequestWithDefaults() *AnalysisRequest { + this := AnalysisRequest{} + var regexMatch bool = false + this.RegexMatch = ®exMatch + var fetchNeighbors bool = true + this.FetchNeighbors = &fetchNeighbors + var addUnknown bool = false + this.AddUnknown = &addUnknown + return &this +} + +// GetObservables returns the Observables field value +func (o *AnalysisRequest) GetObservables() []string { + if o == nil { + var ret []string + return ret + } + + return o.Observables +} + +// GetObservablesOk returns a tuple with the Observables field value +// and a boolean to check if the value has been set. +func (o *AnalysisRequest) GetObservablesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Observables, true +} + +// SetObservables sets field value +func (o *AnalysisRequest) SetObservables(v []string) { + o.Observables = v +} + +// GetAddTags returns the AddTags field value if set, zero value otherwise. +func (o *AnalysisRequest) GetAddTags() []string { + if o == nil || IsNil(o.AddTags) { + var ret []string + return ret + } + return o.AddTags +} + +// GetAddTagsOk returns a tuple with the AddTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalysisRequest) GetAddTagsOk() ([]string, bool) { + if o == nil || IsNil(o.AddTags) { + return nil, false + } + return o.AddTags, true +} + +// HasAddTags returns a boolean if a field has been set. +func (o *AnalysisRequest) HasAddTags() bool { + if o != nil && !IsNil(o.AddTags) { + return true + } + + return false +} + +// SetAddTags gets a reference to the given []string and assigns it to the AddTags field. +func (o *AnalysisRequest) SetAddTags(v []string) { + o.AddTags = v +} + +// GetRegexMatch returns the RegexMatch field value if set, zero value otherwise. +func (o *AnalysisRequest) GetRegexMatch() bool { + if o == nil || IsNil(o.RegexMatch) { + var ret bool + return ret + } + return *o.RegexMatch +} + +// GetRegexMatchOk returns a tuple with the RegexMatch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalysisRequest) GetRegexMatchOk() (*bool, bool) { + if o == nil || IsNil(o.RegexMatch) { + return nil, false + } + return o.RegexMatch, true +} + +// HasRegexMatch returns a boolean if a field has been set. +func (o *AnalysisRequest) HasRegexMatch() bool { + if o != nil && !IsNil(o.RegexMatch) { + return true + } + + return false +} + +// SetRegexMatch gets a reference to the given bool and assigns it to the RegexMatch field. +func (o *AnalysisRequest) SetRegexMatch(v bool) { + o.RegexMatch = &v +} + +// GetAddType returns the AddType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnalysisRequest) GetAddType() ObservableTypeInput { + if o == nil || IsNil(o.AddType.Get()) { + var ret ObservableTypeInput + return ret + } + return *o.AddType.Get() +} + +// GetAddTypeOk returns a tuple with the AddType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnalysisRequest) GetAddTypeOk() (*ObservableTypeInput, bool) { + if o == nil { + return nil, false + } + return o.AddType.Get(), o.AddType.IsSet() +} + +// HasAddType returns a boolean if a field has been set. +func (o *AnalysisRequest) HasAddType() bool { + if o != nil && o.AddType.IsSet() { + return true + } + + return false +} + +// SetAddType gets a reference to the given NullableObservableTypeInput and assigns it to the AddType field. +func (o *AnalysisRequest) SetAddType(v ObservableTypeInput) { + o.AddType.Set(&v) +} + +// SetAddTypeNil sets the value for AddType to be an explicit nil +func (o *AnalysisRequest) SetAddTypeNil() { + o.AddType.Set(nil) +} + +// UnsetAddType ensures that no value is present for AddType, not even an explicit nil +func (o *AnalysisRequest) UnsetAddType() { + o.AddType.Unset() +} + +// GetFetchNeighbors returns the FetchNeighbors field value if set, zero value otherwise. +func (o *AnalysisRequest) GetFetchNeighbors() bool { + if o == nil || IsNil(o.FetchNeighbors) { + var ret bool + return ret + } + return *o.FetchNeighbors +} + +// GetFetchNeighborsOk returns a tuple with the FetchNeighbors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalysisRequest) GetFetchNeighborsOk() (*bool, bool) { + if o == nil || IsNil(o.FetchNeighbors) { + return nil, false + } + return o.FetchNeighbors, true +} + +// HasFetchNeighbors returns a boolean if a field has been set. +func (o *AnalysisRequest) HasFetchNeighbors() bool { + if o != nil && !IsNil(o.FetchNeighbors) { + return true + } + + return false +} + +// SetFetchNeighbors gets a reference to the given bool and assigns it to the FetchNeighbors field. +func (o *AnalysisRequest) SetFetchNeighbors(v bool) { + o.FetchNeighbors = &v +} + +// GetAddUnknown returns the AddUnknown field value if set, zero value otherwise. +func (o *AnalysisRequest) GetAddUnknown() bool { + if o == nil || IsNil(o.AddUnknown) { + var ret bool + return ret + } + return *o.AddUnknown +} + +// GetAddUnknownOk returns a tuple with the AddUnknown field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalysisRequest) GetAddUnknownOk() (*bool, bool) { + if o == nil || IsNil(o.AddUnknown) { + return nil, false + } + return o.AddUnknown, true +} + +// HasAddUnknown returns a boolean if a field has been set. +func (o *AnalysisRequest) HasAddUnknown() bool { + if o != nil && !IsNil(o.AddUnknown) { + return true + } + + return false +} + +// SetAddUnknown gets a reference to the given bool and assigns it to the AddUnknown field. +func (o *AnalysisRequest) SetAddUnknown(v bool) { + o.AddUnknown = &v +} + +func (o AnalysisRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnalysisRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["observables"] = o.Observables + if !IsNil(o.AddTags) { + toSerialize["add_tags"] = o.AddTags + } + if !IsNil(o.RegexMatch) { + toSerialize["regex_match"] = o.RegexMatch + } + if o.AddType.IsSet() { + toSerialize["add_type"] = o.AddType.Get() + } + if !IsNil(o.FetchNeighbors) { + toSerialize["fetch_neighbors"] = o.FetchNeighbors + } + if !IsNil(o.AddUnknown) { + toSerialize["add_unknown"] = o.AddUnknown + } + return toSerialize, nil +} + +func (o *AnalysisRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "observables", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnalysisRequest := _AnalysisRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnalysisRequest) + + if err != nil { + return err + } + + *o = AnalysisRequest(varAnalysisRequest) + + return err +} + +type NullableAnalysisRequest struct { + value *AnalysisRequest + isSet bool +} + +func (v NullableAnalysisRequest) Get() *AnalysisRequest { + return v.value +} + +func (v *NullableAnalysisRequest) Set(val *AnalysisRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAnalysisRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalysisRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalysisRequest(val *AnalysisRequest) *NullableAnalysisRequest { + return &NullableAnalysisRequest{value: val, isSet: true} +} + +func (v NullableAnalysisRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnalysisRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_analysis_response.go b/model_analysis_response.go new file mode 100644 index 0000000..6bcda64 --- /dev/null +++ b/model_analysis_response.go @@ -0,0 +1,268 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AnalysisResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnalysisResponse{} + +// AnalysisResponse struct for AnalysisResponse +type AnalysisResponse struct { + Entities [][]interface{} `json:"entities"` + Observables [][]interface{} `json:"observables"` + Known []Observable `json:"known"` + Matches [][]interface{} `json:"matches"` + Unknown []string `json:"unknown"` +} + +type _AnalysisResponse AnalysisResponse + +// NewAnalysisResponse instantiates a new AnalysisResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalysisResponse(entities [][]interface{}, observables [][]interface{}, known []Observable, matches [][]interface{}, unknown []string) *AnalysisResponse { + this := AnalysisResponse{} + this.Entities = entities + this.Observables = observables + this.Known = known + this.Matches = matches + this.Unknown = unknown + return &this +} + +// NewAnalysisResponseWithDefaults instantiates a new AnalysisResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalysisResponseWithDefaults() *AnalysisResponse { + this := AnalysisResponse{} + return &this +} + +// GetEntities returns the Entities field value +func (o *AnalysisResponse) GetEntities() [][]interface{} { + if o == nil { + var ret [][]interface{} + return ret + } + + return o.Entities +} + +// GetEntitiesOk returns a tuple with the Entities field value +// and a boolean to check if the value has been set. +func (o *AnalysisResponse) GetEntitiesOk() ([][]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Entities, true +} + +// SetEntities sets field value +func (o *AnalysisResponse) SetEntities(v [][]interface{}) { + o.Entities = v +} + +// GetObservables returns the Observables field value +func (o *AnalysisResponse) GetObservables() [][]interface{} { + if o == nil { + var ret [][]interface{} + return ret + } + + return o.Observables +} + +// GetObservablesOk returns a tuple with the Observables field value +// and a boolean to check if the value has been set. +func (o *AnalysisResponse) GetObservablesOk() ([][]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Observables, true +} + +// SetObservables sets field value +func (o *AnalysisResponse) SetObservables(v [][]interface{}) { + o.Observables = v +} + +// GetKnown returns the Known field value +func (o *AnalysisResponse) GetKnown() []Observable { + if o == nil { + var ret []Observable + return ret + } + + return o.Known +} + +// GetKnownOk returns a tuple with the Known field value +// and a boolean to check if the value has been set. +func (o *AnalysisResponse) GetKnownOk() ([]Observable, bool) { + if o == nil { + return nil, false + } + return o.Known, true +} + +// SetKnown sets field value +func (o *AnalysisResponse) SetKnown(v []Observable) { + o.Known = v +} + +// GetMatches returns the Matches field value +func (o *AnalysisResponse) GetMatches() [][]interface{} { + if o == nil { + var ret [][]interface{} + return ret + } + + return o.Matches +} + +// GetMatchesOk returns a tuple with the Matches field value +// and a boolean to check if the value has been set. +func (o *AnalysisResponse) GetMatchesOk() ([][]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Matches, true +} + +// SetMatches sets field value +func (o *AnalysisResponse) SetMatches(v [][]interface{}) { + o.Matches = v +} + +// GetUnknown returns the Unknown field value +func (o *AnalysisResponse) GetUnknown() []string { + if o == nil { + var ret []string + return ret + } + + return o.Unknown +} + +// GetUnknownOk returns a tuple with the Unknown field value +// and a boolean to check if the value has been set. +func (o *AnalysisResponse) GetUnknownOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Unknown, true +} + +// SetUnknown sets field value +func (o *AnalysisResponse) SetUnknown(v []string) { + o.Unknown = v +} + +func (o AnalysisResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnalysisResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["entities"] = o.Entities + toSerialize["observables"] = o.Observables + toSerialize["known"] = o.Known + toSerialize["matches"] = o.Matches + toSerialize["unknown"] = o.Unknown + return toSerialize, nil +} + +func (o *AnalysisResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "entities", + "observables", + "known", + "matches", + "unknown", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnalysisResponse := _AnalysisResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnalysisResponse) + + if err != nil { + return err + } + + *o = AnalysisResponse(varAnalysisResponse) + + return err +} + +type NullableAnalysisResponse struct { + value *AnalysisResponse + isSet bool +} + +func (v NullableAnalysisResponse) Get() *AnalysisResponse { + return v.value +} + +func (v *NullableAnalysisResponse) Set(val *AnalysisResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnalysisResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalysisResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalysisResponse(val *AnalysisResponse) *NullableAnalysisResponse { + return &NullableAnalysisResponse{value: val, isSet: true} +} + +func (v NullableAnalysisResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnalysisResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_analytics_task.go b/model_analytics_task.go new file mode 100644 index 0000000..cefa5e8 --- /dev/null +++ b/model_analytics_task.go @@ -0,0 +1,511 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the AnalyticsTask type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnalyticsTask{} + +// AnalyticsTask struct for AnalyticsTask +type AnalyticsTask struct { + Name string `json:"name"` + Enabled *bool `json:"enabled,omitempty"` + Description *string `json:"description,omitempty"` + Status *TaskStatus `json:"status,omitempty"` + StatusMessage *string `json:"status_message,omitempty"` + LastRun NullableTime `json:"last_run,omitempty"` + Frequency NullableString `json:"frequency,omitempty"` + ActsOn []string `json:"acts_on,omitempty"` + Type *string `json:"type,omitempty"` + Id string `json:"id"` +} + +type _AnalyticsTask AnalyticsTask + +// NewAnalyticsTask instantiates a new AnalyticsTask object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsTask(name string, id string) *AnalyticsTask { + this := AnalyticsTask{} + this.Name = name + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "analytics" + this.Type = &type_ + this.Id = id + return &this +} + +// NewAnalyticsTaskWithDefaults instantiates a new AnalyticsTask object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsTaskWithDefaults() *AnalyticsTask { + this := AnalyticsTask{} + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "analytics" + this.Type = &type_ + return &this +} + +// GetName returns the Name field value +func (o *AnalyticsTask) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnalyticsTask) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnalyticsTask) SetName(v string) { + o.Name = v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *AnalyticsTask) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsTask) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *AnalyticsTask) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *AnalyticsTask) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AnalyticsTask) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsTask) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnalyticsTask) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AnalyticsTask) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AnalyticsTask) GetStatus() TaskStatus { + if o == nil || IsNil(o.Status) { + var ret TaskStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsTask) GetStatusOk() (*TaskStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AnalyticsTask) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given TaskStatus and assigns it to the Status field. +func (o *AnalyticsTask) SetStatus(v TaskStatus) { + o.Status = &v +} + +// GetStatusMessage returns the StatusMessage field value if set, zero value otherwise. +func (o *AnalyticsTask) GetStatusMessage() string { + if o == nil || IsNil(o.StatusMessage) { + var ret string + return ret + } + return *o.StatusMessage +} + +// GetStatusMessageOk returns a tuple with the StatusMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsTask) GetStatusMessageOk() (*string, bool) { + if o == nil || IsNil(o.StatusMessage) { + return nil, false + } + return o.StatusMessage, true +} + +// HasStatusMessage returns a boolean if a field has been set. +func (o *AnalyticsTask) HasStatusMessage() bool { + if o != nil && !IsNil(o.StatusMessage) { + return true + } + + return false +} + +// SetStatusMessage gets a reference to the given string and assigns it to the StatusMessage field. +func (o *AnalyticsTask) SetStatusMessage(v string) { + o.StatusMessage = &v +} + +// GetLastRun returns the LastRun field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnalyticsTask) GetLastRun() time.Time { + if o == nil || IsNil(o.LastRun.Get()) { + var ret time.Time + return ret + } + return *o.LastRun.Get() +} + +// GetLastRunOk returns a tuple with the LastRun field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnalyticsTask) GetLastRunOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRun.Get(), o.LastRun.IsSet() +} + +// HasLastRun returns a boolean if a field has been set. +func (o *AnalyticsTask) HasLastRun() bool { + if o != nil && o.LastRun.IsSet() { + return true + } + + return false +} + +// SetLastRun gets a reference to the given NullableTime and assigns it to the LastRun field. +func (o *AnalyticsTask) SetLastRun(v time.Time) { + o.LastRun.Set(&v) +} + +// SetLastRunNil sets the value for LastRun to be an explicit nil +func (o *AnalyticsTask) SetLastRunNil() { + o.LastRun.Set(nil) +} + +// UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +func (o *AnalyticsTask) UnsetLastRun() { + o.LastRun.Unset() +} + +// GetFrequency returns the Frequency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnalyticsTask) GetFrequency() string { + if o == nil || IsNil(o.Frequency.Get()) { + var ret string + return ret + } + return *o.Frequency.Get() +} + +// GetFrequencyOk returns a tuple with the Frequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnalyticsTask) GetFrequencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Frequency.Get(), o.Frequency.IsSet() +} + +// HasFrequency returns a boolean if a field has been set. +func (o *AnalyticsTask) HasFrequency() bool { + if o != nil && o.Frequency.IsSet() { + return true + } + + return false +} + +// SetFrequency gets a reference to the given NullableString and assigns it to the Frequency field. +func (o *AnalyticsTask) SetFrequency(v string) { + o.Frequency.Set(&v) +} + +// SetFrequencyNil sets the value for Frequency to be an explicit nil +func (o *AnalyticsTask) SetFrequencyNil() { + o.Frequency.Set(nil) +} + +// UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +func (o *AnalyticsTask) UnsetFrequency() { + o.Frequency.Unset() +} + +// GetActsOn returns the ActsOn field value if set, zero value otherwise. +func (o *AnalyticsTask) GetActsOn() []string { + if o == nil || IsNil(o.ActsOn) { + var ret []string + return ret + } + return o.ActsOn +} + +// GetActsOnOk returns a tuple with the ActsOn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsTask) GetActsOnOk() ([]string, bool) { + if o == nil || IsNil(o.ActsOn) { + return nil, false + } + return o.ActsOn, true +} + +// HasActsOn returns a boolean if a field has been set. +func (o *AnalyticsTask) HasActsOn() bool { + if o != nil && !IsNil(o.ActsOn) { + return true + } + + return false +} + +// SetActsOn gets a reference to the given []string and assigns it to the ActsOn field. +func (o *AnalyticsTask) SetActsOn(v []string) { + o.ActsOn = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *AnalyticsTask) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsTask) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *AnalyticsTask) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *AnalyticsTask) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value +func (o *AnalyticsTask) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *AnalyticsTask) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AnalyticsTask) SetId(v string) { + o.Id = v +} + +func (o AnalyticsTask) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnalyticsTask) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusMessage) { + toSerialize["status_message"] = o.StatusMessage + } + if o.LastRun.IsSet() { + toSerialize["last_run"] = o.LastRun.Get() + } + if o.Frequency.IsSet() { + toSerialize["frequency"] = o.Frequency.Get() + } + if !IsNil(o.ActsOn) { + toSerialize["acts_on"] = o.ActsOn + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *AnalyticsTask) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnalyticsTask := _AnalyticsTask{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnalyticsTask) + + if err != nil { + return err + } + + *o = AnalyticsTask(varAnalyticsTask) + + return err +} + +type NullableAnalyticsTask struct { + value *AnalyticsTask + isSet bool +} + +func (v NullableAnalyticsTask) Get() *AnalyticsTask { + return v.value +} + +func (v *NullableAnalyticsTask) Set(val *AnalyticsTask) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsTask) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsTask) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsTask(val *AnalyticsTask) *NullableAnalyticsTask { + return &NullableAnalyticsTask{value: val, isSet: true} +} + +func (v NullableAnalyticsTask) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnalyticsTask) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_asn_input.go b/model_asn_input.go new file mode 100644 index 0000000..4a0ffc7 --- /dev/null +++ b/model_asn_input.go @@ -0,0 +1,399 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ASNInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ASNInput{} + +// ASNInput struct for ASNInput +type ASNInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Country NullableString `json:"country,omitempty"` + Description NullableString `json:"description,omitempty"` +} + +type _ASNInput ASNInput + +// NewASNInput instantiates a new ASNInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewASNInput(value string) *ASNInput { + this := ASNInput{} + this.Value = value + var type_ string = "asn" + this.Type = &type_ + return &this +} + +// NewASNInputWithDefaults instantiates a new ASNInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewASNInputWithDefaults() *ASNInput { + this := ASNInput{} + var type_ string = "asn" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *ASNInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *ASNInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *ASNInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ASNInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ASNInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ASNInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ASNInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ASNInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ASNInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ASNInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ASNInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *ASNInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ASNInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *ASNInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *ASNInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *ASNInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ASNInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *ASNInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *ASNInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ASNInput) GetCountry() string { + if o == nil || IsNil(o.Country.Get()) { + var ret string + return ret + } + return *o.Country.Get() +} + +// GetCountryOk returns a tuple with the Country field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ASNInput) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Country.Get(), o.Country.IsSet() +} + +// HasCountry returns a boolean if a field has been set. +func (o *ASNInput) HasCountry() bool { + if o != nil && o.Country.IsSet() { + return true + } + + return false +} + +// SetCountry gets a reference to the given NullableString and assigns it to the Country field. +func (o *ASNInput) SetCountry(v string) { + o.Country.Set(&v) +} + +// SetCountryNil sets the value for Country to be an explicit nil +func (o *ASNInput) SetCountryNil() { + o.Country.Set(nil) +} + +// UnsetCountry ensures that no value is present for Country, not even an explicit nil +func (o *ASNInput) UnsetCountry() { + o.Country.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ASNInput) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ASNInput) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ASNInput) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ASNInput) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ASNInput) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ASNInput) UnsetDescription() { + o.Description.Unset() +} + +func (o ASNInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ASNInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if o.Country.IsSet() { + toSerialize["country"] = o.Country.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + return toSerialize, nil +} + +func (o *ASNInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varASNInput := _ASNInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varASNInput) + + if err != nil { + return err + } + + *o = ASNInput(varASNInput) + + return err +} + +type NullableASNInput struct { + value *ASNInput + isSet bool +} + +func (v NullableASNInput) Get() *ASNInput { + return v.value +} + +func (v *NullableASNInput) Set(val *ASNInput) { + v.value = val + v.isSet = true +} + +func (v NullableASNInput) IsSet() bool { + return v.isSet +} + +func (v *NullableASNInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableASNInput(val *ASNInput) *NullableASNInput { + return &NullableASNInput{value: val, isSet: true} +} + +func (v NullableASNInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableASNInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_asn_output.go b/model_asn_output.go new file mode 100644 index 0000000..00c132f --- /dev/null +++ b/model_asn_output.go @@ -0,0 +1,483 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ASNOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ASNOutput{} + +// ASNOutput struct for ASNOutput +type ASNOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Country NullableString `json:"country,omitempty"` + Description NullableString `json:"description,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _ASNOutput ASNOutput + +// NewASNOutput instantiates a new ASNOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewASNOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *ASNOutput { + this := ASNOutput{} + this.Value = value + var type_ string = "asn" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewASNOutputWithDefaults instantiates a new ASNOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewASNOutputWithDefaults() *ASNOutput { + this := ASNOutput{} + var type_ string = "asn" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *ASNOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *ASNOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *ASNOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ASNOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ASNOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ASNOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ASNOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ASNOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ASNOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ASNOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ASNOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *ASNOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ASNOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *ASNOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *ASNOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *ASNOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ASNOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *ASNOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *ASNOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ASNOutput) GetCountry() string { + if o == nil || IsNil(o.Country.Get()) { + var ret string + return ret + } + return *o.Country.Get() +} + +// GetCountryOk returns a tuple with the Country field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ASNOutput) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Country.Get(), o.Country.IsSet() +} + +// HasCountry returns a boolean if a field has been set. +func (o *ASNOutput) HasCountry() bool { + if o != nil && o.Country.IsSet() { + return true + } + + return false +} + +// SetCountry gets a reference to the given NullableString and assigns it to the Country field. +func (o *ASNOutput) SetCountry(v string) { + o.Country.Set(&v) +} + +// SetCountryNil sets the value for Country to be an explicit nil +func (o *ASNOutput) SetCountryNil() { + o.Country.Set(nil) +} + +// UnsetCountry ensures that no value is present for Country, not even an explicit nil +func (o *ASNOutput) UnsetCountry() { + o.Country.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ASNOutput) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ASNOutput) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ASNOutput) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ASNOutput) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ASNOutput) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ASNOutput) UnsetDescription() { + o.Description.Unset() +} + +// GetId returns the Id field value +func (o *ASNOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ASNOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ASNOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *ASNOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *ASNOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *ASNOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *ASNOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *ASNOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *ASNOutput) SetRootType(v string) { + o.RootType = v +} + +func (o ASNOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ASNOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if o.Country.IsSet() { + toSerialize["country"] = o.Country.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *ASNOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varASNOutput := _ASNOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varASNOutput) + + if err != nil { + return err + } + + *o = ASNOutput(varASNOutput) + + return err +} + +type NullableASNOutput struct { + value *ASNOutput + isSet bool +} + +func (v NullableASNOutput) Get() *ASNOutput { + return v.value +} + +func (v *NullableASNOutput) Set(val *ASNOutput) { + v.value = val + v.isSet = true +} + +func (v NullableASNOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableASNOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableASNOutput(val *ASNOutput) *NullableASNOutput { + return &NullableASNOutput{value: val, isSet: true} +} + +func (v NullableASNOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableASNOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_attack_pattern_input.go b/model_attack_pattern_input.go new file mode 100644 index 0000000..d00d0ff --- /dev/null +++ b/model_attack_pattern_input.go @@ -0,0 +1,417 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the AttackPatternInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackPatternInput{} + +// AttackPatternInput struct for AttackPatternInput +type AttackPatternInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Aliases []string `json:"aliases,omitempty"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` +} + +type _AttackPatternInput AttackPatternInput + +// NewAttackPatternInput instantiates a new AttackPatternInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAttackPatternInput(name string) *AttackPatternInput { + this := AttackPatternInput{} + var type_ string = "attack-pattern" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + return &this +} + +// NewAttackPatternInputWithDefaults instantiates a new AttackPatternInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAttackPatternInputWithDefaults() *AttackPatternInput { + this := AttackPatternInput{} + var type_ string = "attack-pattern" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *AttackPatternInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *AttackPatternInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *AttackPatternInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *AttackPatternInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AttackPatternInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AttackPatternInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AttackPatternInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AttackPatternInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AttackPatternInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *AttackPatternInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *AttackPatternInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *AttackPatternInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *AttackPatternInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *AttackPatternInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *AttackPatternInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *AttackPatternInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *AttackPatternInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *AttackPatternInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *AttackPatternInput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternInput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *AttackPatternInput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *AttackPatternInput) SetAliases(v []string) { + o.Aliases = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *AttackPatternInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *AttackPatternInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *AttackPatternInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +func (o AttackPatternInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackPatternInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + return toSerialize, nil +} + +func (o *AttackPatternInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAttackPatternInput := _AttackPatternInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAttackPatternInput) + + if err != nil { + return err + } + + *o = AttackPatternInput(varAttackPatternInput) + + return err +} + +type NullableAttackPatternInput struct { + value *AttackPatternInput + isSet bool +} + +func (v NullableAttackPatternInput) Get() *AttackPatternInput { + return v.value +} + +func (v *NullableAttackPatternInput) Set(val *AttackPatternInput) { + v.value = val + v.isSet = true +} + +func (v NullableAttackPatternInput) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackPatternInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackPatternInput(val *AttackPatternInput) *NullableAttackPatternInput { + return &NullableAttackPatternInput{value: val, isSet: true} +} + +func (v NullableAttackPatternInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackPatternInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_attack_pattern_output.go b/model_attack_pattern_output.go new file mode 100644 index 0000000..15bce94 --- /dev/null +++ b/model_attack_pattern_output.go @@ -0,0 +1,529 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the AttackPatternOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackPatternOutput{} + +// AttackPatternOutput struct for AttackPatternOutput +type AttackPatternOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Aliases []string `json:"aliases,omitempty"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _AttackPatternOutput AttackPatternOutput + +// NewAttackPatternOutput instantiates a new AttackPatternOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAttackPatternOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *AttackPatternOutput { + this := AttackPatternOutput{} + var type_ string = "attack-pattern" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewAttackPatternOutputWithDefaults instantiates a new AttackPatternOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAttackPatternOutputWithDefaults() *AttackPatternOutput { + this := AttackPatternOutput{} + var type_ string = "attack-pattern" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *AttackPatternOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *AttackPatternOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *AttackPatternOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *AttackPatternOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AttackPatternOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AttackPatternOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AttackPatternOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AttackPatternOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *AttackPatternOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *AttackPatternOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *AttackPatternOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *AttackPatternOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *AttackPatternOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *AttackPatternOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *AttackPatternOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *AttackPatternOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *AttackPatternOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *AttackPatternOutput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *AttackPatternOutput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *AttackPatternOutput) SetAliases(v []string) { + o.Aliases = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *AttackPatternOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *AttackPatternOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *AttackPatternOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetId returns the Id field value +func (o *AttackPatternOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AttackPatternOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *AttackPatternOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *AttackPatternOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *AttackPatternOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *AttackPatternOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *AttackPatternOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *AttackPatternOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *AttackPatternOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o AttackPatternOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackPatternOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *AttackPatternOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAttackPatternOutput := _AttackPatternOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAttackPatternOutput) + + if err != nil { + return err + } + + *o = AttackPatternOutput(varAttackPatternOutput) + + return err +} + +type NullableAttackPatternOutput struct { + value *AttackPatternOutput + isSet bool +} + +func (v NullableAttackPatternOutput) Get() *AttackPatternOutput { + return v.value +} + +func (v *NullableAttackPatternOutput) Set(val *AttackPatternOutput) { + v.value = val + v.isSet = true +} + +func (v NullableAttackPatternOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackPatternOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackPatternOutput(val *AttackPatternOutput) *NullableAttackPatternOutput { + return &NullableAttackPatternOutput{value: val, isSet: true} +} + +func (v NullableAttackPatternOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackPatternOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_bic_input.go b/model_bic_input.go new file mode 100644 index 0000000..90ff41f --- /dev/null +++ b/model_bic_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the BICInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BICInput{} + +// BICInput struct for BICInput +type BICInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _BICInput BICInput + +// NewBICInput instantiates a new BICInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBICInput(value string) *BICInput { + this := BICInput{} + this.Value = value + var type_ string = "bic" + this.Type = &type_ + return &this +} + +// NewBICInputWithDefaults instantiates a new BICInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBICInputWithDefaults() *BICInput { + this := BICInput{} + var type_ string = "bic" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *BICInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *BICInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *BICInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *BICInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BICInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *BICInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *BICInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *BICInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BICInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *BICInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *BICInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *BICInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BICInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *BICInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *BICInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *BICInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BICInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *BICInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *BICInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o BICInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BICInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *BICInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBICInput := _BICInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBICInput) + + if err != nil { + return err + } + + *o = BICInput(varBICInput) + + return err +} + +type NullableBICInput struct { + value *BICInput + isSet bool +} + +func (v NullableBICInput) Get() *BICInput { + return v.value +} + +func (v *NullableBICInput) Set(val *BICInput) { + v.value = val + v.isSet = true +} + +func (v NullableBICInput) IsSet() bool { + return v.isSet +} + +func (v *NullableBICInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBICInput(val *BICInput) *NullableBICInput { + return &NullableBICInput{value: val, isSet: true} +} + +func (v NullableBICInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBICInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_bic_output.go b/model_bic_output.go new file mode 100644 index 0000000..124517d --- /dev/null +++ b/model_bic_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the BICOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BICOutput{} + +// BICOutput struct for BICOutput +type BICOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _BICOutput BICOutput + +// NewBICOutput instantiates a new BICOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBICOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *BICOutput { + this := BICOutput{} + this.Value = value + var type_ string = "bic" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewBICOutputWithDefaults instantiates a new BICOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBICOutputWithDefaults() *BICOutput { + this := BICOutput{} + var type_ string = "bic" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *BICOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *BICOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *BICOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *BICOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BICOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *BICOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *BICOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *BICOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BICOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *BICOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *BICOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *BICOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BICOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *BICOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *BICOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *BICOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BICOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *BICOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *BICOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *BICOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *BICOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *BICOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *BICOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *BICOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *BICOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *BICOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *BICOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *BICOutput) SetRootType(v string) { + o.RootType = v +} + +func (o BICOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BICOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *BICOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBICOutput := _BICOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBICOutput) + + if err != nil { + return err + } + + *o = BICOutput(varBICOutput) + + return err +} + +type NullableBICOutput struct { + value *BICOutput + isSet bool +} + +func (v NullableBICOutput) Get() *BICOutput { + return v.value +} + +func (v *NullableBICOutput) Set(val *BICOutput) { + v.value = val + v.isSet = true +} + +func (v NullableBICOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableBICOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBICOutput(val *BICOutput) *NullableBICOutput { + return &NullableBICOutput{value: val, isSet: true} +} + +func (v NullableBICOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBICOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_bulk_observable_add_response.go b/model_bulk_observable_add_response.go new file mode 100644 index 0000000..1a52d88 --- /dev/null +++ b/model_bulk_observable_add_response.go @@ -0,0 +1,190 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the BulkObservableAddResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkObservableAddResponse{} + +// BulkObservableAddResponse struct for BulkObservableAddResponse +type BulkObservableAddResponse struct { + Added []AddedInner `json:"added,omitempty"` + Failed []string `json:"failed,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _BulkObservableAddResponse BulkObservableAddResponse + +// NewBulkObservableAddResponse instantiates a new BulkObservableAddResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkObservableAddResponse() *BulkObservableAddResponse { + this := BulkObservableAddResponse{} + return &this +} + +// NewBulkObservableAddResponseWithDefaults instantiates a new BulkObservableAddResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkObservableAddResponseWithDefaults() *BulkObservableAddResponse { + this := BulkObservableAddResponse{} + return &this +} + +// GetAdded returns the Added field value if set, zero value otherwise. +func (o *BulkObservableAddResponse) GetAdded() []AddedInner { + if o == nil || IsNil(o.Added) { + var ret []AddedInner + return ret + } + return o.Added +} + +// GetAddedOk returns a tuple with the Added field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkObservableAddResponse) GetAddedOk() ([]AddedInner, bool) { + if o == nil || IsNil(o.Added) { + return nil, false + } + return o.Added, true +} + +// HasAdded returns a boolean if a field has been set. +func (o *BulkObservableAddResponse) HasAdded() bool { + if o != nil && !IsNil(o.Added) { + return true + } + + return false +} + +// SetAdded gets a reference to the given []AddedInner and assigns it to the Added field. +func (o *BulkObservableAddResponse) SetAdded(v []AddedInner) { + o.Added = v +} + +// GetFailed returns the Failed field value if set, zero value otherwise. +func (o *BulkObservableAddResponse) GetFailed() []string { + if o == nil || IsNil(o.Failed) { + var ret []string + return ret + } + return o.Failed +} + +// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkObservableAddResponse) GetFailedOk() ([]string, bool) { + if o == nil || IsNil(o.Failed) { + return nil, false + } + return o.Failed, true +} + +// HasFailed returns a boolean if a field has been set. +func (o *BulkObservableAddResponse) HasFailed() bool { + if o != nil && !IsNil(o.Failed) { + return true + } + + return false +} + +// SetFailed gets a reference to the given []string and assigns it to the Failed field. +func (o *BulkObservableAddResponse) SetFailed(v []string) { + o.Failed = v +} + +func (o BulkObservableAddResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkObservableAddResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Added) { + toSerialize["added"] = o.Added + } + if !IsNil(o.Failed) { + toSerialize["failed"] = o.Failed + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *BulkObservableAddResponse) UnmarshalJSON(data []byte) (err error) { + varBulkObservableAddResponse := _BulkObservableAddResponse{} + + err = json.Unmarshal(data, &varBulkObservableAddResponse) + + if err != nil { + return err + } + + *o = BulkObservableAddResponse(varBulkObservableAddResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "added") + delete(additionalProperties, "failed") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBulkObservableAddResponse struct { + value *BulkObservableAddResponse + isSet bool +} + +func (v NullableBulkObservableAddResponse) Get() *BulkObservableAddResponse { + return v.value +} + +func (v *NullableBulkObservableAddResponse) Set(val *BulkObservableAddResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBulkObservableAddResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkObservableAddResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkObservableAddResponse(val *BulkObservableAddResponse) *NullableBulkObservableAddResponse { + return &NullableBulkObservableAddResponse{value: val, isSet: true} +} + +func (v NullableBulkObservableAddResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkObservableAddResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_campaign_input.go b/model_campaign_input.go new file mode 100644 index 0000000..717f871 --- /dev/null +++ b/model_campaign_input.go @@ -0,0 +1,453 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CampaignInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CampaignInput{} + +// CampaignInput struct for CampaignInput +type CampaignInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Aliases []string `json:"aliases,omitempty"` + FirstSeen *time.Time `json:"first_seen,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` +} + +type _CampaignInput CampaignInput + +// NewCampaignInput instantiates a new CampaignInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCampaignInput(name string) *CampaignInput { + this := CampaignInput{} + var type_ string = "campaign" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + return &this +} + +// NewCampaignInputWithDefaults instantiates a new CampaignInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCampaignInputWithDefaults() *CampaignInput { + this := CampaignInput{} + var type_ string = "campaign" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CampaignInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CampaignInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CampaignInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *CampaignInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CampaignInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CampaignInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CampaignInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CampaignInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CampaignInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CampaignInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CampaignInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CampaignInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CampaignInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CampaignInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *CampaignInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *CampaignInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *CampaignInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *CampaignInput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *CampaignInput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *CampaignInput) SetAliases(v []string) { + o.Aliases = v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *CampaignInput) GetFirstSeen() time.Time { + if o == nil || IsNil(o.FirstSeen) { + var ret time.Time + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetFirstSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *CampaignInput) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given time.Time and assigns it to the FirstSeen field. +func (o *CampaignInput) SetFirstSeen(v time.Time) { + o.FirstSeen = &v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *CampaignInput) GetLastSeen() time.Time { + if o == nil || IsNil(o.LastSeen) { + var ret time.Time + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignInput) GetLastSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *CampaignInput) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given time.Time and assigns it to the LastSeen field. +func (o *CampaignInput) SetLastSeen(v time.Time) { + o.LastSeen = &v +} + +func (o CampaignInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CampaignInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + return toSerialize, nil +} + +func (o *CampaignInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCampaignInput := _CampaignInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCampaignInput) + + if err != nil { + return err + } + + *o = CampaignInput(varCampaignInput) + + return err +} + +type NullableCampaignInput struct { + value *CampaignInput + isSet bool +} + +func (v NullableCampaignInput) Get() *CampaignInput { + return v.value +} + +func (v *NullableCampaignInput) Set(val *CampaignInput) { + v.value = val + v.isSet = true +} + +func (v NullableCampaignInput) IsSet() bool { + return v.isSet +} + +func (v *NullableCampaignInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCampaignInput(val *CampaignInput) *NullableCampaignInput { + return &NullableCampaignInput{value: val, isSet: true} +} + +func (v NullableCampaignInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCampaignInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_campaign_output.go b/model_campaign_output.go new file mode 100644 index 0000000..c7923ac --- /dev/null +++ b/model_campaign_output.go @@ -0,0 +1,565 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CampaignOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CampaignOutput{} + +// CampaignOutput struct for CampaignOutput +type CampaignOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Aliases []string `json:"aliases,omitempty"` + FirstSeen *time.Time `json:"first_seen,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _CampaignOutput CampaignOutput + +// NewCampaignOutput instantiates a new CampaignOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCampaignOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *CampaignOutput { + this := CampaignOutput{} + var type_ string = "campaign" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewCampaignOutputWithDefaults instantiates a new CampaignOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCampaignOutputWithDefaults() *CampaignOutput { + this := CampaignOutput{} + var type_ string = "campaign" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CampaignOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CampaignOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CampaignOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *CampaignOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CampaignOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CampaignOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CampaignOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CampaignOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CampaignOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CampaignOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CampaignOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CampaignOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CampaignOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CampaignOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *CampaignOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *CampaignOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *CampaignOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *CampaignOutput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *CampaignOutput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *CampaignOutput) SetAliases(v []string) { + o.Aliases = v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *CampaignOutput) GetFirstSeen() time.Time { + if o == nil || IsNil(o.FirstSeen) { + var ret time.Time + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetFirstSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *CampaignOutput) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given time.Time and assigns it to the FirstSeen field. +func (o *CampaignOutput) SetFirstSeen(v time.Time) { + o.FirstSeen = &v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *CampaignOutput) GetLastSeen() time.Time { + if o == nil || IsNil(o.LastSeen) { + var ret time.Time + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetLastSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *CampaignOutput) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given time.Time and assigns it to the LastSeen field. +func (o *CampaignOutput) SetLastSeen(v time.Time) { + o.LastSeen = &v +} + +// GetId returns the Id field value +func (o *CampaignOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CampaignOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *CampaignOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *CampaignOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *CampaignOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *CampaignOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *CampaignOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *CampaignOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *CampaignOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o CampaignOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CampaignOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *CampaignOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCampaignOutput := _CampaignOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCampaignOutput) + + if err != nil { + return err + } + + *o = CampaignOutput(varCampaignOutput) + + return err +} + +type NullableCampaignOutput struct { + value *CampaignOutput + isSet bool +} + +func (v NullableCampaignOutput) Get() *CampaignOutput { + return v.value +} + +func (v *NullableCampaignOutput) Set(val *CampaignOutput) { + v.value = val + v.isSet = true +} + +func (v NullableCampaignOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableCampaignOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCampaignOutput(val *CampaignOutput) *NullableCampaignOutput { + return &NullableCampaignOutput{value: val, isSet: true} +} + +func (v NullableCampaignOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCampaignOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_certificate_input.go b/model_certificate_input.go new file mode 100644 index 0000000..b4b7e21 --- /dev/null +++ b/model_certificate_input.go @@ -0,0 +1,659 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CertificateInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateInput{} + +// CertificateInput This is the schema for the Certificate observable type. Attributes: last_seen: the last time the certificate was seen. first_seen: the first time the certificate was seen. issuer: the issuer of the certificate. subject: the certificate subject. serial_number: the certificate serial. after: the date after which the certificate is valid. before: the date before which the certificate is valid. fingerprint: the certificate fingerprint. +type CertificateInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` + FirstSeen *time.Time `json:"first_seen,omitempty"` + Issuer NullableString `json:"issuer,omitempty"` + Subject NullableString `json:"subject,omitempty"` + SerialNumber NullableString `json:"serial_number,omitempty"` + After NullableTime `json:"after,omitempty"` + Before NullableTime `json:"before,omitempty"` + Fingerprint NullableString `json:"fingerprint,omitempty"` +} + +type _CertificateInput CertificateInput + +// NewCertificateInput instantiates a new CertificateInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificateInput(value string) *CertificateInput { + this := CertificateInput{} + this.Value = value + var type_ string = "certificate" + this.Type = &type_ + return &this +} + +// NewCertificateInputWithDefaults instantiates a new CertificateInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateInputWithDefaults() *CertificateInput { + this := CertificateInput{} + var type_ string = "certificate" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *CertificateInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CertificateInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CertificateInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CertificateInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CertificateInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CertificateInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CertificateInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CertificateInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CertificateInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CertificateInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CertificateInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CertificateInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *CertificateInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *CertificateInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *CertificateInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *CertificateInput) GetLastSeen() time.Time { + if o == nil || IsNil(o.LastSeen) { + var ret time.Time + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateInput) GetLastSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *CertificateInput) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given time.Time and assigns it to the LastSeen field. +func (o *CertificateInput) SetLastSeen(v time.Time) { + o.LastSeen = &v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *CertificateInput) GetFirstSeen() time.Time { + if o == nil || IsNil(o.FirstSeen) { + var ret time.Time + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateInput) GetFirstSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *CertificateInput) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given time.Time and assigns it to the FirstSeen field. +func (o *CertificateInput) SetFirstSeen(v time.Time) { + o.FirstSeen = &v +} + +// GetIssuer returns the Issuer field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateInput) GetIssuer() string { + if o == nil || IsNil(o.Issuer.Get()) { + var ret string + return ret + } + return *o.Issuer.Get() +} + +// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateInput) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Issuer.Get(), o.Issuer.IsSet() +} + +// HasIssuer returns a boolean if a field has been set. +func (o *CertificateInput) HasIssuer() bool { + if o != nil && o.Issuer.IsSet() { + return true + } + + return false +} + +// SetIssuer gets a reference to the given NullableString and assigns it to the Issuer field. +func (o *CertificateInput) SetIssuer(v string) { + o.Issuer.Set(&v) +} + +// SetIssuerNil sets the value for Issuer to be an explicit nil +func (o *CertificateInput) SetIssuerNil() { + o.Issuer.Set(nil) +} + +// UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +func (o *CertificateInput) UnsetIssuer() { + o.Issuer.Unset() +} + +// GetSubject returns the Subject field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateInput) GetSubject() string { + if o == nil || IsNil(o.Subject.Get()) { + var ret string + return ret + } + return *o.Subject.Get() +} + +// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateInput) GetSubjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Subject.Get(), o.Subject.IsSet() +} + +// HasSubject returns a boolean if a field has been set. +func (o *CertificateInput) HasSubject() bool { + if o != nil && o.Subject.IsSet() { + return true + } + + return false +} + +// SetSubject gets a reference to the given NullableString and assigns it to the Subject field. +func (o *CertificateInput) SetSubject(v string) { + o.Subject.Set(&v) +} + +// SetSubjectNil sets the value for Subject to be an explicit nil +func (o *CertificateInput) SetSubjectNil() { + o.Subject.Set(nil) +} + +// UnsetSubject ensures that no value is present for Subject, not even an explicit nil +func (o *CertificateInput) UnsetSubject() { + o.Subject.Unset() +} + +// GetSerialNumber returns the SerialNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateInput) GetSerialNumber() string { + if o == nil || IsNil(o.SerialNumber.Get()) { + var ret string + return ret + } + return *o.SerialNumber.Get() +} + +// GetSerialNumberOk returns a tuple with the SerialNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateInput) GetSerialNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SerialNumber.Get(), o.SerialNumber.IsSet() +} + +// HasSerialNumber returns a boolean if a field has been set. +func (o *CertificateInput) HasSerialNumber() bool { + if o != nil && o.SerialNumber.IsSet() { + return true + } + + return false +} + +// SetSerialNumber gets a reference to the given NullableString and assigns it to the SerialNumber field. +func (o *CertificateInput) SetSerialNumber(v string) { + o.SerialNumber.Set(&v) +} + +// SetSerialNumberNil sets the value for SerialNumber to be an explicit nil +func (o *CertificateInput) SetSerialNumberNil() { + o.SerialNumber.Set(nil) +} + +// UnsetSerialNumber ensures that no value is present for SerialNumber, not even an explicit nil +func (o *CertificateInput) UnsetSerialNumber() { + o.SerialNumber.Unset() +} + +// GetAfter returns the After field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateInput) GetAfter() time.Time { + if o == nil || IsNil(o.After.Get()) { + var ret time.Time + return ret + } + return *o.After.Get() +} + +// GetAfterOk returns a tuple with the After field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateInput) GetAfterOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.After.Get(), o.After.IsSet() +} + +// HasAfter returns a boolean if a field has been set. +func (o *CertificateInput) HasAfter() bool { + if o != nil && o.After.IsSet() { + return true + } + + return false +} + +// SetAfter gets a reference to the given NullableTime and assigns it to the After field. +func (o *CertificateInput) SetAfter(v time.Time) { + o.After.Set(&v) +} + +// SetAfterNil sets the value for After to be an explicit nil +func (o *CertificateInput) SetAfterNil() { + o.After.Set(nil) +} + +// UnsetAfter ensures that no value is present for After, not even an explicit nil +func (o *CertificateInput) UnsetAfter() { + o.After.Unset() +} + +// GetBefore returns the Before field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateInput) GetBefore() time.Time { + if o == nil || IsNil(o.Before.Get()) { + var ret time.Time + return ret + } + return *o.Before.Get() +} + +// GetBeforeOk returns a tuple with the Before field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateInput) GetBeforeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Before.Get(), o.Before.IsSet() +} + +// HasBefore returns a boolean if a field has been set. +func (o *CertificateInput) HasBefore() bool { + if o != nil && o.Before.IsSet() { + return true + } + + return false +} + +// SetBefore gets a reference to the given NullableTime and assigns it to the Before field. +func (o *CertificateInput) SetBefore(v time.Time) { + o.Before.Set(&v) +} + +// SetBeforeNil sets the value for Before to be an explicit nil +func (o *CertificateInput) SetBeforeNil() { + o.Before.Set(nil) +} + +// UnsetBefore ensures that no value is present for Before, not even an explicit nil +func (o *CertificateInput) UnsetBefore() { + o.Before.Unset() +} + +// GetFingerprint returns the Fingerprint field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateInput) GetFingerprint() string { + if o == nil || IsNil(o.Fingerprint.Get()) { + var ret string + return ret + } + return *o.Fingerprint.Get() +} + +// GetFingerprintOk returns a tuple with the Fingerprint field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateInput) GetFingerprintOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Fingerprint.Get(), o.Fingerprint.IsSet() +} + +// HasFingerprint returns a boolean if a field has been set. +func (o *CertificateInput) HasFingerprint() bool { + if o != nil && o.Fingerprint.IsSet() { + return true + } + + return false +} + +// SetFingerprint gets a reference to the given NullableString and assigns it to the Fingerprint field. +func (o *CertificateInput) SetFingerprint(v string) { + o.Fingerprint.Set(&v) +} + +// SetFingerprintNil sets the value for Fingerprint to be an explicit nil +func (o *CertificateInput) SetFingerprintNil() { + o.Fingerprint.Set(nil) +} + +// UnsetFingerprint ensures that no value is present for Fingerprint, not even an explicit nil +func (o *CertificateInput) UnsetFingerprint() { + o.Fingerprint.Unset() +} + +func (o CertificateInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if o.Issuer.IsSet() { + toSerialize["issuer"] = o.Issuer.Get() + } + if o.Subject.IsSet() { + toSerialize["subject"] = o.Subject.Get() + } + if o.SerialNumber.IsSet() { + toSerialize["serial_number"] = o.SerialNumber.Get() + } + if o.After.IsSet() { + toSerialize["after"] = o.After.Get() + } + if o.Before.IsSet() { + toSerialize["before"] = o.Before.Get() + } + if o.Fingerprint.IsSet() { + toSerialize["fingerprint"] = o.Fingerprint.Get() + } + return toSerialize, nil +} + +func (o *CertificateInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificateInput := _CertificateInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificateInput) + + if err != nil { + return err + } + + *o = CertificateInput(varCertificateInput) + + return err +} + +type NullableCertificateInput struct { + value *CertificateInput + isSet bool +} + +func (v NullableCertificateInput) Get() *CertificateInput { + return v.value +} + +func (v *NullableCertificateInput) Set(val *CertificateInput) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateInput) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateInput(val *CertificateInput) *NullableCertificateInput { + return &NullableCertificateInput{value: val, isSet: true} +} + +func (v NullableCertificateInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_certificate_output.go b/model_certificate_output.go new file mode 100644 index 0000000..8399ecf --- /dev/null +++ b/model_certificate_output.go @@ -0,0 +1,743 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CertificateOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateOutput{} + +// CertificateOutput This is the schema for the Certificate observable type. Attributes: last_seen: the last time the certificate was seen. first_seen: the first time the certificate was seen. issuer: the issuer of the certificate. subject: the certificate subject. serial_number: the certificate serial. after: the date after which the certificate is valid. before: the date before which the certificate is valid. fingerprint: the certificate fingerprint. +type CertificateOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` + FirstSeen *time.Time `json:"first_seen,omitempty"` + Issuer NullableString `json:"issuer,omitempty"` + Subject NullableString `json:"subject,omitempty"` + SerialNumber NullableString `json:"serial_number,omitempty"` + After NullableTime `json:"after,omitempty"` + Before NullableTime `json:"before,omitempty"` + Fingerprint NullableString `json:"fingerprint,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _CertificateOutput CertificateOutput + +// NewCertificateOutput instantiates a new CertificateOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificateOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *CertificateOutput { + this := CertificateOutput{} + this.Value = value + var type_ string = "certificate" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewCertificateOutputWithDefaults instantiates a new CertificateOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateOutputWithDefaults() *CertificateOutput { + this := CertificateOutput{} + var type_ string = "certificate" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *CertificateOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CertificateOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CertificateOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CertificateOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CertificateOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CertificateOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CertificateOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CertificateOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CertificateOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CertificateOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CertificateOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *CertificateOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *CertificateOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *CertificateOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *CertificateOutput) GetLastSeen() time.Time { + if o == nil || IsNil(o.LastSeen) { + var ret time.Time + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetLastSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *CertificateOutput) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given time.Time and assigns it to the LastSeen field. +func (o *CertificateOutput) SetLastSeen(v time.Time) { + o.LastSeen = &v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *CertificateOutput) GetFirstSeen() time.Time { + if o == nil || IsNil(o.FirstSeen) { + var ret time.Time + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetFirstSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *CertificateOutput) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given time.Time and assigns it to the FirstSeen field. +func (o *CertificateOutput) SetFirstSeen(v time.Time) { + o.FirstSeen = &v +} + +// GetIssuer returns the Issuer field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateOutput) GetIssuer() string { + if o == nil || IsNil(o.Issuer.Get()) { + var ret string + return ret + } + return *o.Issuer.Get() +} + +// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateOutput) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Issuer.Get(), o.Issuer.IsSet() +} + +// HasIssuer returns a boolean if a field has been set. +func (o *CertificateOutput) HasIssuer() bool { + if o != nil && o.Issuer.IsSet() { + return true + } + + return false +} + +// SetIssuer gets a reference to the given NullableString and assigns it to the Issuer field. +func (o *CertificateOutput) SetIssuer(v string) { + o.Issuer.Set(&v) +} + +// SetIssuerNil sets the value for Issuer to be an explicit nil +func (o *CertificateOutput) SetIssuerNil() { + o.Issuer.Set(nil) +} + +// UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +func (o *CertificateOutput) UnsetIssuer() { + o.Issuer.Unset() +} + +// GetSubject returns the Subject field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateOutput) GetSubject() string { + if o == nil || IsNil(o.Subject.Get()) { + var ret string + return ret + } + return *o.Subject.Get() +} + +// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateOutput) GetSubjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Subject.Get(), o.Subject.IsSet() +} + +// HasSubject returns a boolean if a field has been set. +func (o *CertificateOutput) HasSubject() bool { + if o != nil && o.Subject.IsSet() { + return true + } + + return false +} + +// SetSubject gets a reference to the given NullableString and assigns it to the Subject field. +func (o *CertificateOutput) SetSubject(v string) { + o.Subject.Set(&v) +} + +// SetSubjectNil sets the value for Subject to be an explicit nil +func (o *CertificateOutput) SetSubjectNil() { + o.Subject.Set(nil) +} + +// UnsetSubject ensures that no value is present for Subject, not even an explicit nil +func (o *CertificateOutput) UnsetSubject() { + o.Subject.Unset() +} + +// GetSerialNumber returns the SerialNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateOutput) GetSerialNumber() string { + if o == nil || IsNil(o.SerialNumber.Get()) { + var ret string + return ret + } + return *o.SerialNumber.Get() +} + +// GetSerialNumberOk returns a tuple with the SerialNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateOutput) GetSerialNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SerialNumber.Get(), o.SerialNumber.IsSet() +} + +// HasSerialNumber returns a boolean if a field has been set. +func (o *CertificateOutput) HasSerialNumber() bool { + if o != nil && o.SerialNumber.IsSet() { + return true + } + + return false +} + +// SetSerialNumber gets a reference to the given NullableString and assigns it to the SerialNumber field. +func (o *CertificateOutput) SetSerialNumber(v string) { + o.SerialNumber.Set(&v) +} + +// SetSerialNumberNil sets the value for SerialNumber to be an explicit nil +func (o *CertificateOutput) SetSerialNumberNil() { + o.SerialNumber.Set(nil) +} + +// UnsetSerialNumber ensures that no value is present for SerialNumber, not even an explicit nil +func (o *CertificateOutput) UnsetSerialNumber() { + o.SerialNumber.Unset() +} + +// GetAfter returns the After field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateOutput) GetAfter() time.Time { + if o == nil || IsNil(o.After.Get()) { + var ret time.Time + return ret + } + return *o.After.Get() +} + +// GetAfterOk returns a tuple with the After field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateOutput) GetAfterOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.After.Get(), o.After.IsSet() +} + +// HasAfter returns a boolean if a field has been set. +func (o *CertificateOutput) HasAfter() bool { + if o != nil && o.After.IsSet() { + return true + } + + return false +} + +// SetAfter gets a reference to the given NullableTime and assigns it to the After field. +func (o *CertificateOutput) SetAfter(v time.Time) { + o.After.Set(&v) +} + +// SetAfterNil sets the value for After to be an explicit nil +func (o *CertificateOutput) SetAfterNil() { + o.After.Set(nil) +} + +// UnsetAfter ensures that no value is present for After, not even an explicit nil +func (o *CertificateOutput) UnsetAfter() { + o.After.Unset() +} + +// GetBefore returns the Before field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateOutput) GetBefore() time.Time { + if o == nil || IsNil(o.Before.Get()) { + var ret time.Time + return ret + } + return *o.Before.Get() +} + +// GetBeforeOk returns a tuple with the Before field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateOutput) GetBeforeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Before.Get(), o.Before.IsSet() +} + +// HasBefore returns a boolean if a field has been set. +func (o *CertificateOutput) HasBefore() bool { + if o != nil && o.Before.IsSet() { + return true + } + + return false +} + +// SetBefore gets a reference to the given NullableTime and assigns it to the Before field. +func (o *CertificateOutput) SetBefore(v time.Time) { + o.Before.Set(&v) +} + +// SetBeforeNil sets the value for Before to be an explicit nil +func (o *CertificateOutput) SetBeforeNil() { + o.Before.Set(nil) +} + +// UnsetBefore ensures that no value is present for Before, not even an explicit nil +func (o *CertificateOutput) UnsetBefore() { + o.Before.Unset() +} + +// GetFingerprint returns the Fingerprint field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateOutput) GetFingerprint() string { + if o == nil || IsNil(o.Fingerprint.Get()) { + var ret string + return ret + } + return *o.Fingerprint.Get() +} + +// GetFingerprintOk returns a tuple with the Fingerprint field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateOutput) GetFingerprintOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Fingerprint.Get(), o.Fingerprint.IsSet() +} + +// HasFingerprint returns a boolean if a field has been set. +func (o *CertificateOutput) HasFingerprint() bool { + if o != nil && o.Fingerprint.IsSet() { + return true + } + + return false +} + +// SetFingerprint gets a reference to the given NullableString and assigns it to the Fingerprint field. +func (o *CertificateOutput) SetFingerprint(v string) { + o.Fingerprint.Set(&v) +} + +// SetFingerprintNil sets the value for Fingerprint to be an explicit nil +func (o *CertificateOutput) SetFingerprintNil() { + o.Fingerprint.Set(nil) +} + +// UnsetFingerprint ensures that no value is present for Fingerprint, not even an explicit nil +func (o *CertificateOutput) UnsetFingerprint() { + o.Fingerprint.Unset() +} + +// GetId returns the Id field value +func (o *CertificateOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CertificateOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *CertificateOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *CertificateOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *CertificateOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *CertificateOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *CertificateOutput) SetRootType(v string) { + o.RootType = v +} + +func (o CertificateOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if o.Issuer.IsSet() { + toSerialize["issuer"] = o.Issuer.Get() + } + if o.Subject.IsSet() { + toSerialize["subject"] = o.Subject.Get() + } + if o.SerialNumber.IsSet() { + toSerialize["serial_number"] = o.SerialNumber.Get() + } + if o.After.IsSet() { + toSerialize["after"] = o.After.Get() + } + if o.Before.IsSet() { + toSerialize["before"] = o.Before.Get() + } + if o.Fingerprint.IsSet() { + toSerialize["fingerprint"] = o.Fingerprint.Get() + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *CertificateOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificateOutput := _CertificateOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificateOutput) + + if err != nil { + return err + } + + *o = CertificateOutput(varCertificateOutput) + + return err +} + +type NullableCertificateOutput struct { + value *CertificateOutput + isSet bool +} + +func (v NullableCertificateOutput) Get() *CertificateOutput { + return v.value +} + +func (v *NullableCertificateOutput) Set(val *CertificateOutput) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateOutput(val *CertificateOutput) *NullableCertificateOutput { + return &NullableCertificateOutput{value: val, isSet: true} +} + +func (v NullableCertificateOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_cidr_input.go b/model_cidr_input.go new file mode 100644 index 0000000..d4939d6 --- /dev/null +++ b/model_cidr_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CIDRInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CIDRInput{} + +// CIDRInput struct for CIDRInput +type CIDRInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _CIDRInput CIDRInput + +// NewCIDRInput instantiates a new CIDRInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCIDRInput(value string) *CIDRInput { + this := CIDRInput{} + this.Value = value + var type_ string = "cidr" + this.Type = &type_ + return &this +} + +// NewCIDRInputWithDefaults instantiates a new CIDRInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCIDRInputWithDefaults() *CIDRInput { + this := CIDRInput{} + var type_ string = "cidr" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *CIDRInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CIDRInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CIDRInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CIDRInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CIDRInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CIDRInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CIDRInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CIDRInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CIDRInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CIDRInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CIDRInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CIDRInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CIDRInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CIDRInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CIDRInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *CIDRInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CIDRInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *CIDRInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *CIDRInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o CIDRInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CIDRInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *CIDRInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCIDRInput := _CIDRInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCIDRInput) + + if err != nil { + return err + } + + *o = CIDRInput(varCIDRInput) + + return err +} + +type NullableCIDRInput struct { + value *CIDRInput + isSet bool +} + +func (v NullableCIDRInput) Get() *CIDRInput { + return v.value +} + +func (v *NullableCIDRInput) Set(val *CIDRInput) { + v.value = val + v.isSet = true +} + +func (v NullableCIDRInput) IsSet() bool { + return v.isSet +} + +func (v *NullableCIDRInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCIDRInput(val *CIDRInput) *NullableCIDRInput { + return &NullableCIDRInput{value: val, isSet: true} +} + +func (v NullableCIDRInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCIDRInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_cidr_output.go b/model_cidr_output.go new file mode 100644 index 0000000..3367211 --- /dev/null +++ b/model_cidr_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CIDROutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CIDROutput{} + +// CIDROutput struct for CIDROutput +type CIDROutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _CIDROutput CIDROutput + +// NewCIDROutput instantiates a new CIDROutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCIDROutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *CIDROutput { + this := CIDROutput{} + this.Value = value + var type_ string = "cidr" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewCIDROutputWithDefaults instantiates a new CIDROutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCIDROutputWithDefaults() *CIDROutput { + this := CIDROutput{} + var type_ string = "cidr" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *CIDROutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CIDROutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CIDROutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CIDROutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CIDROutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CIDROutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CIDROutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CIDROutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CIDROutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CIDROutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CIDROutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CIDROutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CIDROutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CIDROutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CIDROutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *CIDROutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CIDROutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *CIDROutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *CIDROutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *CIDROutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CIDROutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CIDROutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *CIDROutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *CIDROutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *CIDROutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *CIDROutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *CIDROutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *CIDROutput) SetRootType(v string) { + o.RootType = v +} + +func (o CIDROutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CIDROutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *CIDROutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCIDROutput := _CIDROutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCIDROutput) + + if err != nil { + return err + } + + *o = CIDROutput(varCIDROutput) + + return err +} + +type NullableCIDROutput struct { + value *CIDROutput + isSet bool +} + +func (v NullableCIDROutput) Get() *CIDROutput { + return v.value +} + +func (v *NullableCIDROutput) Set(val *CIDROutput) { + v.value = val + v.isSet = true +} + +func (v NullableCIDROutput) IsSet() bool { + return v.isSet +} + +func (v *NullableCIDROutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCIDROutput(val *CIDROutput) *NullableCIDROutput { + return &NullableCIDROutput{value: val, isSet: true} +} + +func (v NullableCIDROutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCIDROutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_command_line_input.go b/model_command_line_input.go new file mode 100644 index 0000000..4fa756b --- /dev/null +++ b/model_command_line_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CommandLineInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CommandLineInput{} + +// CommandLineInput struct for CommandLineInput +type CommandLineInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _CommandLineInput CommandLineInput + +// NewCommandLineInput instantiates a new CommandLineInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCommandLineInput(value string) *CommandLineInput { + this := CommandLineInput{} + this.Value = value + var type_ string = "command_line" + this.Type = &type_ + return &this +} + +// NewCommandLineInputWithDefaults instantiates a new CommandLineInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCommandLineInputWithDefaults() *CommandLineInput { + this := CommandLineInput{} + var type_ string = "command_line" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *CommandLineInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CommandLineInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CommandLineInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CommandLineInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandLineInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CommandLineInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CommandLineInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CommandLineInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandLineInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CommandLineInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CommandLineInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CommandLineInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandLineInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CommandLineInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CommandLineInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *CommandLineInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandLineInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *CommandLineInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *CommandLineInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o CommandLineInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CommandLineInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *CommandLineInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCommandLineInput := _CommandLineInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCommandLineInput) + + if err != nil { + return err + } + + *o = CommandLineInput(varCommandLineInput) + + return err +} + +type NullableCommandLineInput struct { + value *CommandLineInput + isSet bool +} + +func (v NullableCommandLineInput) Get() *CommandLineInput { + return v.value +} + +func (v *NullableCommandLineInput) Set(val *CommandLineInput) { + v.value = val + v.isSet = true +} + +func (v NullableCommandLineInput) IsSet() bool { + return v.isSet +} + +func (v *NullableCommandLineInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCommandLineInput(val *CommandLineInput) *NullableCommandLineInput { + return &NullableCommandLineInput{value: val, isSet: true} +} + +func (v NullableCommandLineInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCommandLineInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_command_line_output.go b/model_command_line_output.go new file mode 100644 index 0000000..6aa4911 --- /dev/null +++ b/model_command_line_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CommandLineOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CommandLineOutput{} + +// CommandLineOutput struct for CommandLineOutput +type CommandLineOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _CommandLineOutput CommandLineOutput + +// NewCommandLineOutput instantiates a new CommandLineOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCommandLineOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *CommandLineOutput { + this := CommandLineOutput{} + this.Value = value + var type_ string = "command_line" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewCommandLineOutputWithDefaults instantiates a new CommandLineOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCommandLineOutputWithDefaults() *CommandLineOutput { + this := CommandLineOutput{} + var type_ string = "command_line" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *CommandLineOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CommandLineOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CommandLineOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CommandLineOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandLineOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CommandLineOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CommandLineOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CommandLineOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandLineOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CommandLineOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CommandLineOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CommandLineOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandLineOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CommandLineOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CommandLineOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *CommandLineOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandLineOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *CommandLineOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *CommandLineOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *CommandLineOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CommandLineOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CommandLineOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *CommandLineOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *CommandLineOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *CommandLineOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *CommandLineOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *CommandLineOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *CommandLineOutput) SetRootType(v string) { + o.RootType = v +} + +func (o CommandLineOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CommandLineOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *CommandLineOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCommandLineOutput := _CommandLineOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCommandLineOutput) + + if err != nil { + return err + } + + *o = CommandLineOutput(varCommandLineOutput) + + return err +} + +type NullableCommandLineOutput struct { + value *CommandLineOutput + isSet bool +} + +func (v NullableCommandLineOutput) Get() *CommandLineOutput { + return v.value +} + +func (v *NullableCommandLineOutput) Set(val *CommandLineOutput) { + v.value = val + v.isSet = true +} + +func (v NullableCommandLineOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableCommandLineOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCommandLineOutput(val *CommandLineOutput) *NullableCommandLineOutput { + return &NullableCommandLineOutput{value: val, isSet: true} +} + +func (v NullableCommandLineOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCommandLineOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_company_input.go b/model_company_input.go new file mode 100644 index 0000000..7ee2735 --- /dev/null +++ b/model_company_input.go @@ -0,0 +1,345 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CompanyInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompanyInput{} + +// CompanyInput struct for CompanyInput +type CompanyInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` +} + +type _CompanyInput CompanyInput + +// NewCompanyInput instantiates a new CompanyInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompanyInput(name string) *CompanyInput { + this := CompanyInput{} + var type_ string = "company" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + return &this +} + +// NewCompanyInputWithDefaults instantiates a new CompanyInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompanyInputWithDefaults() *CompanyInput { + this := CompanyInput{} + var type_ string = "company" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CompanyInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CompanyInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CompanyInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *CompanyInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CompanyInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CompanyInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CompanyInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CompanyInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CompanyInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CompanyInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CompanyInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CompanyInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CompanyInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CompanyInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CompanyInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *CompanyInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *CompanyInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *CompanyInput) SetModified(v time.Time) { + o.Modified = &v +} + +func (o CompanyInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompanyInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + return toSerialize, nil +} + +func (o *CompanyInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompanyInput := _CompanyInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompanyInput) + + if err != nil { + return err + } + + *o = CompanyInput(varCompanyInput) + + return err +} + +type NullableCompanyInput struct { + value *CompanyInput + isSet bool +} + +func (v NullableCompanyInput) Get() *CompanyInput { + return v.value +} + +func (v *NullableCompanyInput) Set(val *CompanyInput) { + v.value = val + v.isSet = true +} + +func (v NullableCompanyInput) IsSet() bool { + return v.isSet +} + +func (v *NullableCompanyInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompanyInput(val *CompanyInput) *NullableCompanyInput { + return &NullableCompanyInput{value: val, isSet: true} +} + +func (v NullableCompanyInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompanyInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_company_output.go b/model_company_output.go new file mode 100644 index 0000000..d4ee9c4 --- /dev/null +++ b/model_company_output.go @@ -0,0 +1,457 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CompanyOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompanyOutput{} + +// CompanyOutput struct for CompanyOutput +type CompanyOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _CompanyOutput CompanyOutput + +// NewCompanyOutput instantiates a new CompanyOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompanyOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *CompanyOutput { + this := CompanyOutput{} + var type_ string = "company" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewCompanyOutputWithDefaults instantiates a new CompanyOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompanyOutputWithDefaults() *CompanyOutput { + this := CompanyOutput{} + var type_ string = "company" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CompanyOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CompanyOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CompanyOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *CompanyOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CompanyOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CompanyOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CompanyOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CompanyOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CompanyOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CompanyOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CompanyOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CompanyOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CompanyOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CompanyOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *CompanyOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *CompanyOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *CompanyOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetId returns the Id field value +func (o *CompanyOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CompanyOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *CompanyOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *CompanyOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *CompanyOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *CompanyOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *CompanyOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *CompanyOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *CompanyOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o CompanyOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompanyOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *CompanyOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompanyOutput := _CompanyOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompanyOutput) + + if err != nil { + return err + } + + *o = CompanyOutput(varCompanyOutput) + + return err +} + +type NullableCompanyOutput struct { + value *CompanyOutput + isSet bool +} + +func (v NullableCompanyOutput) Get() *CompanyOutput { + return v.value +} + +func (v *NullableCompanyOutput) Set(val *CompanyOutput) { + v.value = val + v.isSet = true +} + +func (v NullableCompanyOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableCompanyOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompanyOutput(val *CompanyOutput) *NullableCompanyOutput { + return &NullableCompanyOutput{value: val, isSet: true} +} + +func (v NullableCompanyOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompanyOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_course_of_action_input.go b/model_course_of_action_input.go new file mode 100644 index 0000000..a4cce21 --- /dev/null +++ b/model_course_of_action_input.go @@ -0,0 +1,345 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CourseOfActionInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CourseOfActionInput{} + +// CourseOfActionInput struct for CourseOfActionInput +type CourseOfActionInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` +} + +type _CourseOfActionInput CourseOfActionInput + +// NewCourseOfActionInput instantiates a new CourseOfActionInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCourseOfActionInput(name string) *CourseOfActionInput { + this := CourseOfActionInput{} + var type_ string = "course-of-action" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + return &this +} + +// NewCourseOfActionInputWithDefaults instantiates a new CourseOfActionInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCourseOfActionInputWithDefaults() *CourseOfActionInput { + this := CourseOfActionInput{} + var type_ string = "course-of-action" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CourseOfActionInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CourseOfActionInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CourseOfActionInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *CourseOfActionInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CourseOfActionInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CourseOfActionInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CourseOfActionInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CourseOfActionInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CourseOfActionInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CourseOfActionInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CourseOfActionInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CourseOfActionInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CourseOfActionInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CourseOfActionInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CourseOfActionInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *CourseOfActionInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *CourseOfActionInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *CourseOfActionInput) SetModified(v time.Time) { + o.Modified = &v +} + +func (o CourseOfActionInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CourseOfActionInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + return toSerialize, nil +} + +func (o *CourseOfActionInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCourseOfActionInput := _CourseOfActionInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCourseOfActionInput) + + if err != nil { + return err + } + + *o = CourseOfActionInput(varCourseOfActionInput) + + return err +} + +type NullableCourseOfActionInput struct { + value *CourseOfActionInput + isSet bool +} + +func (v NullableCourseOfActionInput) Get() *CourseOfActionInput { + return v.value +} + +func (v *NullableCourseOfActionInput) Set(val *CourseOfActionInput) { + v.value = val + v.isSet = true +} + +func (v NullableCourseOfActionInput) IsSet() bool { + return v.isSet +} + +func (v *NullableCourseOfActionInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCourseOfActionInput(val *CourseOfActionInput) *NullableCourseOfActionInput { + return &NullableCourseOfActionInput{value: val, isSet: true} +} + +func (v NullableCourseOfActionInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCourseOfActionInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_course_of_action_output.go b/model_course_of_action_output.go new file mode 100644 index 0000000..dfb536f --- /dev/null +++ b/model_course_of_action_output.go @@ -0,0 +1,457 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CourseOfActionOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CourseOfActionOutput{} + +// CourseOfActionOutput struct for CourseOfActionOutput +type CourseOfActionOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _CourseOfActionOutput CourseOfActionOutput + +// NewCourseOfActionOutput instantiates a new CourseOfActionOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCourseOfActionOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *CourseOfActionOutput { + this := CourseOfActionOutput{} + var type_ string = "course-of-action" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewCourseOfActionOutputWithDefaults instantiates a new CourseOfActionOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCourseOfActionOutputWithDefaults() *CourseOfActionOutput { + this := CourseOfActionOutput{} + var type_ string = "course-of-action" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CourseOfActionOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CourseOfActionOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CourseOfActionOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *CourseOfActionOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CourseOfActionOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CourseOfActionOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CourseOfActionOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CourseOfActionOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *CourseOfActionOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *CourseOfActionOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *CourseOfActionOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *CourseOfActionOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *CourseOfActionOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *CourseOfActionOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *CourseOfActionOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *CourseOfActionOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *CourseOfActionOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetId returns the Id field value +func (o *CourseOfActionOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CourseOfActionOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *CourseOfActionOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *CourseOfActionOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *CourseOfActionOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *CourseOfActionOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *CourseOfActionOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *CourseOfActionOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *CourseOfActionOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o CourseOfActionOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CourseOfActionOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *CourseOfActionOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCourseOfActionOutput := _CourseOfActionOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCourseOfActionOutput) + + if err != nil { + return err + } + + *o = CourseOfActionOutput(varCourseOfActionOutput) + + return err +} + +type NullableCourseOfActionOutput struct { + value *CourseOfActionOutput + isSet bool +} + +func (v NullableCourseOfActionOutput) Get() *CourseOfActionOutput { + return v.value +} + +func (v *NullableCourseOfActionOutput) Set(val *CourseOfActionOutput) { + v.value = val + v.isSet = true +} + +func (v NullableCourseOfActionOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableCourseOfActionOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCourseOfActionOutput(val *CourseOfActionOutput) *NullableCourseOfActionOutput { + return &NullableCourseOfActionOutput{value: val, isSet: true} +} + +func (v NullableCourseOfActionOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCourseOfActionOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_delete_context_request.go b/model_delete_context_request.go new file mode 100644 index 0000000..47399a7 --- /dev/null +++ b/model_delete_context_request.go @@ -0,0 +1,232 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the DeleteContextRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeleteContextRequest{} + +// DeleteContextRequest struct for DeleteContextRequest +type DeleteContextRequest struct { + Source string `json:"source"` + Context map[string]interface{} `json:"context"` + SkipCompare []interface{} `json:"skip_compare,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DeleteContextRequest DeleteContextRequest + +// NewDeleteContextRequest instantiates a new DeleteContextRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeleteContextRequest(source string, context map[string]interface{}) *DeleteContextRequest { + this := DeleteContextRequest{} + this.Source = source + this.Context = context + return &this +} + +// NewDeleteContextRequestWithDefaults instantiates a new DeleteContextRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeleteContextRequestWithDefaults() *DeleteContextRequest { + this := DeleteContextRequest{} + return &this +} + +// GetSource returns the Source field value +func (o *DeleteContextRequest) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *DeleteContextRequest) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *DeleteContextRequest) SetSource(v string) { + o.Source = v +} + +// GetContext returns the Context field value +func (o *DeleteContextRequest) GetContext() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *DeleteContextRequest) GetContextOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Context, true +} + +// SetContext sets field value +func (o *DeleteContextRequest) SetContext(v map[string]interface{}) { + o.Context = v +} + +// GetSkipCompare returns the SkipCompare field value if set, zero value otherwise. +func (o *DeleteContextRequest) GetSkipCompare() []interface{} { + if o == nil || IsNil(o.SkipCompare) { + var ret []interface{} + return ret + } + return o.SkipCompare +} + +// GetSkipCompareOk returns a tuple with the SkipCompare field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeleteContextRequest) GetSkipCompareOk() ([]interface{}, bool) { + if o == nil || IsNil(o.SkipCompare) { + return nil, false + } + return o.SkipCompare, true +} + +// HasSkipCompare returns a boolean if a field has been set. +func (o *DeleteContextRequest) HasSkipCompare() bool { + if o != nil && !IsNil(o.SkipCompare) { + return true + } + + return false +} + +// SetSkipCompare gets a reference to the given []interface{} and assigns it to the SkipCompare field. +func (o *DeleteContextRequest) SetSkipCompare(v []interface{}) { + o.SkipCompare = v +} + +func (o DeleteContextRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeleteContextRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source"] = o.Source + toSerialize["context"] = o.Context + if !IsNil(o.SkipCompare) { + toSerialize["skip_compare"] = o.SkipCompare + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DeleteContextRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source", + "context", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeleteContextRequest := _DeleteContextRequest{} + + err = json.Unmarshal(data, &varDeleteContextRequest) + + if err != nil { + return err + } + + *o = DeleteContextRequest(varDeleteContextRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "source") + delete(additionalProperties, "context") + delete(additionalProperties, "skip_compare") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDeleteContextRequest struct { + value *DeleteContextRequest + isSet bool +} + +func (v NullableDeleteContextRequest) Get() *DeleteContextRequest { + return v.value +} + +func (v *NullableDeleteContextRequest) Set(val *DeleteContextRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDeleteContextRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDeleteContextRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeleteContextRequest(val *DeleteContextRequest) *NullableDeleteContextRequest { + return &NullableDeleteContextRequest{value: val, isSet: true} +} + +func (v NullableDeleteContextRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeleteContextRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_approach.go b/model_dfiq_approach.go new file mode 100644 index 0000000..aa9f21d --- /dev/null +++ b/model_dfiq_approach.go @@ -0,0 +1,339 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DFIQApproach type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQApproach{} + +// DFIQApproach struct for DFIQApproach +type DFIQApproach struct { + Name string `json:"name"` + Description string `json:"description"` + Tags []string `json:"tags,omitempty"` + References []string `json:"references,omitempty"` + Notes NullableDFIQApproachNotes `json:"notes,omitempty"` + Steps []DFIQApproachStep `json:"steps,omitempty"` +} + +type _DFIQApproach DFIQApproach + +// NewDFIQApproach instantiates a new DFIQApproach object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQApproach(name string, description string) *DFIQApproach { + this := DFIQApproach{} + this.Name = name + this.Description = description + return &this +} + +// NewDFIQApproachWithDefaults instantiates a new DFIQApproach object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQApproachWithDefaults() *DFIQApproach { + this := DFIQApproach{} + return &this +} + +// GetName returns the Name field value +func (o *DFIQApproach) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DFIQApproach) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DFIQApproach) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *DFIQApproach) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *DFIQApproach) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *DFIQApproach) SetDescription(v string) { + o.Description = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *DFIQApproach) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQApproach) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *DFIQApproach) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *DFIQApproach) SetTags(v []string) { + o.Tags = v +} + +// GetReferences returns the References field value if set, zero value otherwise. +func (o *DFIQApproach) GetReferences() []string { + if o == nil || IsNil(o.References) { + var ret []string + return ret + } + return o.References +} + +// GetReferencesOk returns a tuple with the References field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQApproach) GetReferencesOk() ([]string, bool) { + if o == nil || IsNil(o.References) { + return nil, false + } + return o.References, true +} + +// HasReferences returns a boolean if a field has been set. +func (o *DFIQApproach) HasReferences() bool { + if o != nil && !IsNil(o.References) { + return true + } + + return false +} + +// SetReferences gets a reference to the given []string and assigns it to the References field. +func (o *DFIQApproach) SetReferences(v []string) { + o.References = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQApproach) GetNotes() DFIQApproachNotes { + if o == nil || IsNil(o.Notes.Get()) { + var ret DFIQApproachNotes + return ret + } + return *o.Notes.Get() +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQApproach) GetNotesOk() (*DFIQApproachNotes, bool) { + if o == nil { + return nil, false + } + return o.Notes.Get(), o.Notes.IsSet() +} + +// HasNotes returns a boolean if a field has been set. +func (o *DFIQApproach) HasNotes() bool { + if o != nil && o.Notes.IsSet() { + return true + } + + return false +} + +// SetNotes gets a reference to the given NullableDFIQApproachNotes and assigns it to the Notes field. +func (o *DFIQApproach) SetNotes(v DFIQApproachNotes) { + o.Notes.Set(&v) +} + +// SetNotesNil sets the value for Notes to be an explicit nil +func (o *DFIQApproach) SetNotesNil() { + o.Notes.Set(nil) +} + +// UnsetNotes ensures that no value is present for Notes, not even an explicit nil +func (o *DFIQApproach) UnsetNotes() { + o.Notes.Unset() +} + +// GetSteps returns the Steps field value if set, zero value otherwise. +func (o *DFIQApproach) GetSteps() []DFIQApproachStep { + if o == nil || IsNil(o.Steps) { + var ret []DFIQApproachStep + return ret + } + return o.Steps +} + +// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQApproach) GetStepsOk() ([]DFIQApproachStep, bool) { + if o == nil || IsNil(o.Steps) { + return nil, false + } + return o.Steps, true +} + +// HasSteps returns a boolean if a field has been set. +func (o *DFIQApproach) HasSteps() bool { + if o != nil && !IsNil(o.Steps) { + return true + } + + return false +} + +// SetSteps gets a reference to the given []DFIQApproachStep and assigns it to the Steps field. +func (o *DFIQApproach) SetSteps(v []DFIQApproachStep) { + o.Steps = v +} + +func (o DFIQApproach) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQApproach) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.References) { + toSerialize["references"] = o.References + } + if o.Notes.IsSet() { + toSerialize["notes"] = o.Notes.Get() + } + if !IsNil(o.Steps) { + toSerialize["steps"] = o.Steps + } + return toSerialize, nil +} + +func (o *DFIQApproach) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQApproach := _DFIQApproach{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDFIQApproach) + + if err != nil { + return err + } + + *o = DFIQApproach(varDFIQApproach) + + return err +} + +type NullableDFIQApproach struct { + value *DFIQApproach + isSet bool +} + +func (v NullableDFIQApproach) Get() *DFIQApproach { + return v.value +} + +func (v *NullableDFIQApproach) Set(val *DFIQApproach) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQApproach) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQApproach) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQApproach(val *DFIQApproach) *NullableDFIQApproach { + return &NullableDFIQApproach{value: val, isSet: true} +} + +func (v NullableDFIQApproach) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQApproach) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_approach_notes.go b/model_dfiq_approach_notes.go new file mode 100644 index 0000000..33fbe91 --- /dev/null +++ b/model_dfiq_approach_notes.go @@ -0,0 +1,160 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the DFIQApproachNotes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQApproachNotes{} + +// DFIQApproachNotes struct for DFIQApproachNotes +type DFIQApproachNotes struct { + Covered []string `json:"covered,omitempty"` + NotCovered []string `json:"not_covered,omitempty"` +} + +// NewDFIQApproachNotes instantiates a new DFIQApproachNotes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQApproachNotes() *DFIQApproachNotes { + this := DFIQApproachNotes{} + return &this +} + +// NewDFIQApproachNotesWithDefaults instantiates a new DFIQApproachNotes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQApproachNotesWithDefaults() *DFIQApproachNotes { + this := DFIQApproachNotes{} + return &this +} + +// GetCovered returns the Covered field value if set, zero value otherwise. +func (o *DFIQApproachNotes) GetCovered() []string { + if o == nil || IsNil(o.Covered) { + var ret []string + return ret + } + return o.Covered +} + +// GetCoveredOk returns a tuple with the Covered field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQApproachNotes) GetCoveredOk() ([]string, bool) { + if o == nil || IsNil(o.Covered) { + return nil, false + } + return o.Covered, true +} + +// HasCovered returns a boolean if a field has been set. +func (o *DFIQApproachNotes) HasCovered() bool { + if o != nil && !IsNil(o.Covered) { + return true + } + + return false +} + +// SetCovered gets a reference to the given []string and assigns it to the Covered field. +func (o *DFIQApproachNotes) SetCovered(v []string) { + o.Covered = v +} + +// GetNotCovered returns the NotCovered field value if set, zero value otherwise. +func (o *DFIQApproachNotes) GetNotCovered() []string { + if o == nil || IsNil(o.NotCovered) { + var ret []string + return ret + } + return o.NotCovered +} + +// GetNotCoveredOk returns a tuple with the NotCovered field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQApproachNotes) GetNotCoveredOk() ([]string, bool) { + if o == nil || IsNil(o.NotCovered) { + return nil, false + } + return o.NotCovered, true +} + +// HasNotCovered returns a boolean if a field has been set. +func (o *DFIQApproachNotes) HasNotCovered() bool { + if o != nil && !IsNil(o.NotCovered) { + return true + } + + return false +} + +// SetNotCovered gets a reference to the given []string and assigns it to the NotCovered field. +func (o *DFIQApproachNotes) SetNotCovered(v []string) { + o.NotCovered = v +} + +func (o DFIQApproachNotes) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQApproachNotes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Covered) { + toSerialize["covered"] = o.Covered + } + if !IsNil(o.NotCovered) { + toSerialize["not_covered"] = o.NotCovered + } + return toSerialize, nil +} + +type NullableDFIQApproachNotes struct { + value *DFIQApproachNotes + isSet bool +} + +func (v NullableDFIQApproachNotes) Get() *DFIQApproachNotes { + return v.value +} + +func (v *NullableDFIQApproachNotes) Set(val *DFIQApproachNotes) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQApproachNotes) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQApproachNotes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQApproachNotes(val *DFIQApproachNotes) *NullableDFIQApproachNotes { + return &NullableDFIQApproachNotes{value: val, isSet: true} +} + +func (v NullableDFIQApproachNotes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQApproachNotes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_approach_step.go b/model_dfiq_approach_step.go new file mode 100644 index 0000000..55b98fb --- /dev/null +++ b/model_dfiq_approach_step.go @@ -0,0 +1,325 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DFIQApproachStep type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQApproachStep{} + +// DFIQApproachStep struct for DFIQApproachStep +type DFIQApproachStep struct { + Name string `json:"name"` + Description NullableString `json:"description,omitempty"` + Stage string `json:"stage"` + Type NullableString `json:"type,omitempty"` + Value NullableString `json:"value,omitempty"` +} + +type _DFIQApproachStep DFIQApproachStep + +// NewDFIQApproachStep instantiates a new DFIQApproachStep object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQApproachStep(name string, stage string) *DFIQApproachStep { + this := DFIQApproachStep{} + this.Name = name + this.Stage = stage + return &this +} + +// NewDFIQApproachStepWithDefaults instantiates a new DFIQApproachStep object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQApproachStepWithDefaults() *DFIQApproachStep { + this := DFIQApproachStep{} + return &this +} + +// GetName returns the Name field value +func (o *DFIQApproachStep) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DFIQApproachStep) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DFIQApproachStep) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQApproachStep) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQApproachStep) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *DFIQApproachStep) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *DFIQApproachStep) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *DFIQApproachStep) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *DFIQApproachStep) UnsetDescription() { + o.Description.Unset() +} + +// GetStage returns the Stage field value +func (o *DFIQApproachStep) GetStage() string { + if o == nil { + var ret string + return ret + } + + return o.Stage +} + +// GetStageOk returns a tuple with the Stage field value +// and a boolean to check if the value has been set. +func (o *DFIQApproachStep) GetStageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Stage, true +} + +// SetStage sets field value +func (o *DFIQApproachStep) SetStage(v string) { + o.Stage = v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQApproachStep) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQApproachStep) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *DFIQApproachStep) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *DFIQApproachStep) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *DFIQApproachStep) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *DFIQApproachStep) UnsetType() { + o.Type.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQApproachStep) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQApproachStep) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *DFIQApproachStep) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *DFIQApproachStep) SetValue(v string) { + o.Value.Set(&v) +} + +// SetValueNil sets the value for Value to be an explicit nil +func (o *DFIQApproachStep) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *DFIQApproachStep) UnsetValue() { + o.Value.Unset() +} + +func (o DFIQApproachStep) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQApproachStep) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["stage"] = o.Stage + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + return toSerialize, nil +} + +func (o *DFIQApproachStep) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "stage", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQApproachStep := _DFIQApproachStep{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDFIQApproachStep) + + if err != nil { + return err + } + + *o = DFIQApproachStep(varDFIQApproachStep) + + return err +} + +type NullableDFIQApproachStep struct { + value *DFIQApproachStep + isSet bool +} + +func (v NullableDFIQApproachStep) Get() *DFIQApproachStep { + return v.value +} + +func (v *NullableDFIQApproachStep) Set(val *DFIQApproachStep) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQApproachStep) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQApproachStep) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQApproachStep(val *DFIQApproachStep) *NullableDFIQApproachStep { + return &NullableDFIQApproachStep{value: val, isSet: true} +} + +func (v NullableDFIQApproachStep) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQApproachStep) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_config_response.go b/model_dfiq_config_response.go new file mode 100644 index 0000000..cbc3fd4 --- /dev/null +++ b/model_dfiq_config_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the DFIQConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQConfigResponse{} + +// DFIQConfigResponse struct for DFIQConfigResponse +type DFIQConfigResponse struct { + StageTypes []string `json:"stage_types"` + StepTypes []string `json:"step_types"` + AdditionalProperties map[string]interface{} +} + +type _DFIQConfigResponse DFIQConfigResponse + +// NewDFIQConfigResponse instantiates a new DFIQConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQConfigResponse(stageTypes []string, stepTypes []string) *DFIQConfigResponse { + this := DFIQConfigResponse{} + this.StageTypes = stageTypes + this.StepTypes = stepTypes + return &this +} + +// NewDFIQConfigResponseWithDefaults instantiates a new DFIQConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQConfigResponseWithDefaults() *DFIQConfigResponse { + this := DFIQConfigResponse{} + return &this +} + +// GetStageTypes returns the StageTypes field value +func (o *DFIQConfigResponse) GetStageTypes() []string { + if o == nil { + var ret []string + return ret + } + + return o.StageTypes +} + +// GetStageTypesOk returns a tuple with the StageTypes field value +// and a boolean to check if the value has been set. +func (o *DFIQConfigResponse) GetStageTypesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.StageTypes, true +} + +// SetStageTypes sets field value +func (o *DFIQConfigResponse) SetStageTypes(v []string) { + o.StageTypes = v +} + +// GetStepTypes returns the StepTypes field value +func (o *DFIQConfigResponse) GetStepTypes() []string { + if o == nil { + var ret []string + return ret + } + + return o.StepTypes +} + +// GetStepTypesOk returns a tuple with the StepTypes field value +// and a boolean to check if the value has been set. +func (o *DFIQConfigResponse) GetStepTypesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.StepTypes, true +} + +// SetStepTypes sets field value +func (o *DFIQConfigResponse) SetStepTypes(v []string) { + o.StepTypes = v +} + +func (o DFIQConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["stage_types"] = o.StageTypes + toSerialize["step_types"] = o.StepTypes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DFIQConfigResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "stage_types", + "step_types", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQConfigResponse := _DFIQConfigResponse{} + + err = json.Unmarshal(data, &varDFIQConfigResponse) + + if err != nil { + return err + } + + *o = DFIQConfigResponse(varDFIQConfigResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "stage_types") + delete(additionalProperties, "step_types") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDFIQConfigResponse struct { + value *DFIQConfigResponse + isSet bool +} + +func (v NullableDFIQConfigResponse) Get() *DFIQConfigResponse { + return v.value +} + +func (v *NullableDFIQConfigResponse) Set(val *DFIQConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQConfigResponse(val *DFIQConfigResponse) *NullableDFIQConfigResponse { + return &NullableDFIQConfigResponse{value: val, isSet: true} +} + +func (v NullableDFIQConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_facet.go b/model_dfiq_facet.go new file mode 100644 index 0000000..793ef86 --- /dev/null +++ b/model_dfiq_facet.go @@ -0,0 +1,607 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the DFIQFacet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQFacet{} + +// DFIQFacet struct for DFIQFacet +type DFIQFacet struct { + Name string `json:"name"` + Uuid NullableString `json:"uuid,omitempty"` + DfiqId NullableString `json:"dfiq_id,omitempty"` + DfiqVersion string `json:"dfiq_version"` + DfiqTags []string `json:"dfiq_tags,omitempty"` + Contributors []string `json:"contributors,omitempty"` + DfiqYaml string `json:"dfiq_yaml"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Description NullableString `json:"description"` + ParentIds []string `json:"parent_ids"` + Type *string `json:"type,omitempty"` + Id string `json:"id"` + RootType string `json:"root_type"` +} + +type _DFIQFacet DFIQFacet + +// NewDFIQFacet instantiates a new DFIQFacet object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQFacet(name string, dfiqVersion string, dfiqYaml string, description NullableString, parentIds []string, id string, rootType string) *DFIQFacet { + this := DFIQFacet{} + this.Name = name + this.DfiqVersion = dfiqVersion + this.DfiqYaml = dfiqYaml + this.Description = description + this.ParentIds = parentIds + var type_ string = "facet" + this.Type = &type_ + this.Id = id + this.RootType = rootType + return &this +} + +// NewDFIQFacetWithDefaults instantiates a new DFIQFacet object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQFacetWithDefaults() *DFIQFacet { + this := DFIQFacet{} + var type_ string = "facet" + this.Type = &type_ + return &this +} + +// GetName returns the Name field value +func (o *DFIQFacet) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DFIQFacet) SetName(v string) { + o.Name = v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQFacet) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQFacet) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *DFIQFacet) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *DFIQFacet) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *DFIQFacet) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *DFIQFacet) UnsetUuid() { + o.Uuid.Unset() +} + +// GetDfiqId returns the DfiqId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQFacet) GetDfiqId() string { + if o == nil || IsNil(o.DfiqId.Get()) { + var ret string + return ret + } + return *o.DfiqId.Get() +} + +// GetDfiqIdOk returns a tuple with the DfiqId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQFacet) GetDfiqIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DfiqId.Get(), o.DfiqId.IsSet() +} + +// HasDfiqId returns a boolean if a field has been set. +func (o *DFIQFacet) HasDfiqId() bool { + if o != nil && o.DfiqId.IsSet() { + return true + } + + return false +} + +// SetDfiqId gets a reference to the given NullableString and assigns it to the DfiqId field. +func (o *DFIQFacet) SetDfiqId(v string) { + o.DfiqId.Set(&v) +} + +// SetDfiqIdNil sets the value for DfiqId to be an explicit nil +func (o *DFIQFacet) SetDfiqIdNil() { + o.DfiqId.Set(nil) +} + +// UnsetDfiqId ensures that no value is present for DfiqId, not even an explicit nil +func (o *DFIQFacet) UnsetDfiqId() { + o.DfiqId.Unset() +} + +// GetDfiqVersion returns the DfiqVersion field value +func (o *DFIQFacet) GetDfiqVersion() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqVersion +} + +// GetDfiqVersionOk returns a tuple with the DfiqVersion field value +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetDfiqVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqVersion, true +} + +// SetDfiqVersion sets field value +func (o *DFIQFacet) SetDfiqVersion(v string) { + o.DfiqVersion = v +} + +// GetDfiqTags returns the DfiqTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQFacet) GetDfiqTags() []string { + if o == nil { + var ret []string + return ret + } + return o.DfiqTags +} + +// GetDfiqTagsOk returns a tuple with the DfiqTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQFacet) GetDfiqTagsOk() ([]string, bool) { + if o == nil || IsNil(o.DfiqTags) { + return nil, false + } + return o.DfiqTags, true +} + +// HasDfiqTags returns a boolean if a field has been set. +func (o *DFIQFacet) HasDfiqTags() bool { + if o != nil && !IsNil(o.DfiqTags) { + return true + } + + return false +} + +// SetDfiqTags gets a reference to the given []string and assigns it to the DfiqTags field. +func (o *DFIQFacet) SetDfiqTags(v []string) { + o.DfiqTags = v +} + +// GetContributors returns the Contributors field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQFacet) GetContributors() []string { + if o == nil { + var ret []string + return ret + } + return o.Contributors +} + +// GetContributorsOk returns a tuple with the Contributors field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQFacet) GetContributorsOk() ([]string, bool) { + if o == nil || IsNil(o.Contributors) { + return nil, false + } + return o.Contributors, true +} + +// HasContributors returns a boolean if a field has been set. +func (o *DFIQFacet) HasContributors() bool { + if o != nil && !IsNil(o.Contributors) { + return true + } + + return false +} + +// SetContributors gets a reference to the given []string and assigns it to the Contributors field. +func (o *DFIQFacet) SetContributors(v []string) { + o.Contributors = v +} + +// GetDfiqYaml returns the DfiqYaml field value +func (o *DFIQFacet) GetDfiqYaml() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqYaml +} + +// GetDfiqYamlOk returns a tuple with the DfiqYaml field value +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetDfiqYamlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqYaml, true +} + +// SetDfiqYaml sets field value +func (o *DFIQFacet) SetDfiqYaml(v string) { + o.DfiqYaml = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *DFIQFacet) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *DFIQFacet) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *DFIQFacet) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *DFIQFacet) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *DFIQFacet) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *DFIQFacet) SetModified(v time.Time) { + o.Modified = &v +} + +// GetDescription returns the Description field value +// If the value is explicit nil, the zero value for string will be returned +func (o *DFIQFacet) GetDescription() string { + if o == nil || o.Description.Get() == nil { + var ret string + return ret + } + + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQFacet) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// SetDescription sets field value +func (o *DFIQFacet) SetDescription(v string) { + o.Description.Set(&v) +} + +// GetParentIds returns the ParentIds field value +func (o *DFIQFacet) GetParentIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ParentIds +} + +// GetParentIdsOk returns a tuple with the ParentIds field value +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetParentIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ParentIds, true +} + +// SetParentIds sets field value +func (o *DFIQFacet) SetParentIds(v []string) { + o.ParentIds = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DFIQFacet) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DFIQFacet) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DFIQFacet) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value +func (o *DFIQFacet) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DFIQFacet) SetId(v string) { + o.Id = v +} + +// GetRootType returns the RootType field value +func (o *DFIQFacet) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *DFIQFacet) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *DFIQFacet) SetRootType(v string) { + o.RootType = v +} + +func (o DFIQFacet) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQFacet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.DfiqId.IsSet() { + toSerialize["dfiq_id"] = o.DfiqId.Get() + } + toSerialize["dfiq_version"] = o.DfiqVersion + if o.DfiqTags != nil { + toSerialize["dfiq_tags"] = o.DfiqTags + } + if o.Contributors != nil { + toSerialize["contributors"] = o.Contributors + } + toSerialize["dfiq_yaml"] = o.DfiqYaml + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + toSerialize["description"] = o.Description.Get() + toSerialize["parent_ids"] = o.ParentIds + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["id"] = o.Id + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *DFIQFacet) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "dfiq_version", + "dfiq_yaml", + "description", + "parent_ids", + "id", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQFacet := _DFIQFacet{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDFIQFacet) + + if err != nil { + return err + } + + *o = DFIQFacet(varDFIQFacet) + + return err +} + +type NullableDFIQFacet struct { + value *DFIQFacet + isSet bool +} + +func (v NullableDFIQFacet) Get() *DFIQFacet { + return v.value +} + +func (v *NullableDFIQFacet) Set(val *DFIQFacet) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQFacet) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQFacet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQFacet(val *DFIQFacet) *NullableDFIQFacet { + return &NullableDFIQFacet{value: val, isSet: true} +} + +func (v NullableDFIQFacet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQFacet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_inner.go b/model_dfiq_inner.go new file mode 100644 index 0000000..67cfcb4 --- /dev/null +++ b/model_dfiq_inner.go @@ -0,0 +1,188 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// DfiqInner - struct for DfiqInner +type DfiqInner struct { + DFIQFacet *DFIQFacet + DFIQQuestion *DFIQQuestion + DFIQScenario *DFIQScenario +} + +// DFIQFacetAsDfiqInner is a convenience function that returns DFIQFacet wrapped in DfiqInner +func DFIQFacetAsDfiqInner(v *DFIQFacet) DfiqInner { + return DfiqInner{ + DFIQFacet: v, + } +} + +// DFIQQuestionAsDfiqInner is a convenience function that returns DFIQQuestion wrapped in DfiqInner +func DFIQQuestionAsDfiqInner(v *DFIQQuestion) DfiqInner { + return DfiqInner{ + DFIQQuestion: v, + } +} + +// DFIQScenarioAsDfiqInner is a convenience function that returns DFIQScenario wrapped in DfiqInner +func DFIQScenarioAsDfiqInner(v *DFIQScenario) DfiqInner { + return DfiqInner{ + DFIQScenario: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *DfiqInner) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into DFIQFacet + err = newStrictDecoder(data).Decode(&dst.DFIQFacet) + if err == nil { + jsonDFIQFacet, _ := json.Marshal(dst.DFIQFacet) + if string(jsonDFIQFacet) == "{}" { // empty struct + dst.DFIQFacet = nil + } else { + if err = validator.Validate(dst.DFIQFacet); err != nil { + dst.DFIQFacet = nil + } else { + match++ + } + } + } else { + dst.DFIQFacet = nil + } + + // try to unmarshal data into DFIQQuestion + err = newStrictDecoder(data).Decode(&dst.DFIQQuestion) + if err == nil { + jsonDFIQQuestion, _ := json.Marshal(dst.DFIQQuestion) + if string(jsonDFIQQuestion) == "{}" { // empty struct + dst.DFIQQuestion = nil + } else { + if err = validator.Validate(dst.DFIQQuestion); err != nil { + dst.DFIQQuestion = nil + } else { + match++ + } + } + } else { + dst.DFIQQuestion = nil + } + + // try to unmarshal data into DFIQScenario + err = newStrictDecoder(data).Decode(&dst.DFIQScenario) + if err == nil { + jsonDFIQScenario, _ := json.Marshal(dst.DFIQScenario) + if string(jsonDFIQScenario) == "{}" { // empty struct + dst.DFIQScenario = nil + } else { + if err = validator.Validate(dst.DFIQScenario); err != nil { + dst.DFIQScenario = nil + } else { + match++ + } + } + } else { + dst.DFIQScenario = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.DFIQFacet = nil + dst.DFIQQuestion = nil + dst.DFIQScenario = nil + + return fmt.Errorf("data matches more than one schema in oneOf(DfiqInner)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(DfiqInner)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src DfiqInner) MarshalJSON() ([]byte, error) { + if src.DFIQFacet != nil { + return json.Marshal(&src.DFIQFacet) + } + + if src.DFIQQuestion != nil { + return json.Marshal(&src.DFIQQuestion) + } + + if src.DFIQScenario != nil { + return json.Marshal(&src.DFIQScenario) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *DfiqInner) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.DFIQFacet != nil { + return obj.DFIQFacet + } + + if obj.DFIQQuestion != nil { + return obj.DFIQQuestion + } + + if obj.DFIQScenario != nil { + return obj.DFIQScenario + } + + // all schemas are nil + return nil +} + +type NullableDfiqInner struct { + value *DfiqInner + isSet bool +} + +func (v NullableDfiqInner) Get() *DfiqInner { + return v.value +} + +func (v *NullableDfiqInner) Set(val *DfiqInner) { + v.value = val + v.isSet = true +} + +func (v NullableDfiqInner) IsSet() bool { + return v.isSet +} + +func (v *NullableDfiqInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDfiqInner(val *DfiqInner) *NullableDfiqInner { + return &NullableDfiqInner{value: val, isSet: true} +} + +func (v NullableDfiqInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDfiqInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_question.go b/model_dfiq_question.go new file mode 100644 index 0000000..d83b179 --- /dev/null +++ b/model_dfiq_question.go @@ -0,0 +1,643 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the DFIQQuestion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQQuestion{} + +// DFIQQuestion struct for DFIQQuestion +type DFIQQuestion struct { + Name string `json:"name"` + Uuid NullableString `json:"uuid,omitempty"` + DfiqId NullableString `json:"dfiq_id,omitempty"` + DfiqVersion string `json:"dfiq_version"` + DfiqTags []string `json:"dfiq_tags,omitempty"` + Contributors []string `json:"contributors,omitempty"` + DfiqYaml string `json:"dfiq_yaml"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Description NullableString `json:"description"` + ParentIds []string `json:"parent_ids"` + Type *string `json:"type,omitempty"` + Approaches []DFIQApproach `json:"approaches,omitempty"` + Id string `json:"id"` + RootType string `json:"root_type"` +} + +type _DFIQQuestion DFIQQuestion + +// NewDFIQQuestion instantiates a new DFIQQuestion object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQQuestion(name string, dfiqVersion string, dfiqYaml string, description NullableString, parentIds []string, id string, rootType string) *DFIQQuestion { + this := DFIQQuestion{} + this.Name = name + this.DfiqVersion = dfiqVersion + this.DfiqYaml = dfiqYaml + this.Description = description + this.ParentIds = parentIds + var type_ string = "question" + this.Type = &type_ + this.Id = id + this.RootType = rootType + return &this +} + +// NewDFIQQuestionWithDefaults instantiates a new DFIQQuestion object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQQuestionWithDefaults() *DFIQQuestion { + this := DFIQQuestion{} + var type_ string = "question" + this.Type = &type_ + return &this +} + +// GetName returns the Name field value +func (o *DFIQQuestion) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DFIQQuestion) SetName(v string) { + o.Name = v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQQuestion) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQQuestion) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *DFIQQuestion) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *DFIQQuestion) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *DFIQQuestion) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *DFIQQuestion) UnsetUuid() { + o.Uuid.Unset() +} + +// GetDfiqId returns the DfiqId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQQuestion) GetDfiqId() string { + if o == nil || IsNil(o.DfiqId.Get()) { + var ret string + return ret + } + return *o.DfiqId.Get() +} + +// GetDfiqIdOk returns a tuple with the DfiqId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQQuestion) GetDfiqIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DfiqId.Get(), o.DfiqId.IsSet() +} + +// HasDfiqId returns a boolean if a field has been set. +func (o *DFIQQuestion) HasDfiqId() bool { + if o != nil && o.DfiqId.IsSet() { + return true + } + + return false +} + +// SetDfiqId gets a reference to the given NullableString and assigns it to the DfiqId field. +func (o *DFIQQuestion) SetDfiqId(v string) { + o.DfiqId.Set(&v) +} + +// SetDfiqIdNil sets the value for DfiqId to be an explicit nil +func (o *DFIQQuestion) SetDfiqIdNil() { + o.DfiqId.Set(nil) +} + +// UnsetDfiqId ensures that no value is present for DfiqId, not even an explicit nil +func (o *DFIQQuestion) UnsetDfiqId() { + o.DfiqId.Unset() +} + +// GetDfiqVersion returns the DfiqVersion field value +func (o *DFIQQuestion) GetDfiqVersion() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqVersion +} + +// GetDfiqVersionOk returns a tuple with the DfiqVersion field value +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetDfiqVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqVersion, true +} + +// SetDfiqVersion sets field value +func (o *DFIQQuestion) SetDfiqVersion(v string) { + o.DfiqVersion = v +} + +// GetDfiqTags returns the DfiqTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQQuestion) GetDfiqTags() []string { + if o == nil { + var ret []string + return ret + } + return o.DfiqTags +} + +// GetDfiqTagsOk returns a tuple with the DfiqTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQQuestion) GetDfiqTagsOk() ([]string, bool) { + if o == nil || IsNil(o.DfiqTags) { + return nil, false + } + return o.DfiqTags, true +} + +// HasDfiqTags returns a boolean if a field has been set. +func (o *DFIQQuestion) HasDfiqTags() bool { + if o != nil && !IsNil(o.DfiqTags) { + return true + } + + return false +} + +// SetDfiqTags gets a reference to the given []string and assigns it to the DfiqTags field. +func (o *DFIQQuestion) SetDfiqTags(v []string) { + o.DfiqTags = v +} + +// GetContributors returns the Contributors field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQQuestion) GetContributors() []string { + if o == nil { + var ret []string + return ret + } + return o.Contributors +} + +// GetContributorsOk returns a tuple with the Contributors field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQQuestion) GetContributorsOk() ([]string, bool) { + if o == nil || IsNil(o.Contributors) { + return nil, false + } + return o.Contributors, true +} + +// HasContributors returns a boolean if a field has been set. +func (o *DFIQQuestion) HasContributors() bool { + if o != nil && !IsNil(o.Contributors) { + return true + } + + return false +} + +// SetContributors gets a reference to the given []string and assigns it to the Contributors field. +func (o *DFIQQuestion) SetContributors(v []string) { + o.Contributors = v +} + +// GetDfiqYaml returns the DfiqYaml field value +func (o *DFIQQuestion) GetDfiqYaml() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqYaml +} + +// GetDfiqYamlOk returns a tuple with the DfiqYaml field value +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetDfiqYamlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqYaml, true +} + +// SetDfiqYaml sets field value +func (o *DFIQQuestion) SetDfiqYaml(v string) { + o.DfiqYaml = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *DFIQQuestion) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *DFIQQuestion) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *DFIQQuestion) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *DFIQQuestion) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *DFIQQuestion) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *DFIQQuestion) SetModified(v time.Time) { + o.Modified = &v +} + +// GetDescription returns the Description field value +// If the value is explicit nil, the zero value for string will be returned +func (o *DFIQQuestion) GetDescription() string { + if o == nil || o.Description.Get() == nil { + var ret string + return ret + } + + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQQuestion) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// SetDescription sets field value +func (o *DFIQQuestion) SetDescription(v string) { + o.Description.Set(&v) +} + +// GetParentIds returns the ParentIds field value +func (o *DFIQQuestion) GetParentIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ParentIds +} + +// GetParentIdsOk returns a tuple with the ParentIds field value +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetParentIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ParentIds, true +} + +// SetParentIds sets field value +func (o *DFIQQuestion) SetParentIds(v []string) { + o.ParentIds = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DFIQQuestion) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DFIQQuestion) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DFIQQuestion) SetType(v string) { + o.Type = &v +} + +// GetApproaches returns the Approaches field value if set, zero value otherwise. +func (o *DFIQQuestion) GetApproaches() []DFIQApproach { + if o == nil || IsNil(o.Approaches) { + var ret []DFIQApproach + return ret + } + return o.Approaches +} + +// GetApproachesOk returns a tuple with the Approaches field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetApproachesOk() ([]DFIQApproach, bool) { + if o == nil || IsNil(o.Approaches) { + return nil, false + } + return o.Approaches, true +} + +// HasApproaches returns a boolean if a field has been set. +func (o *DFIQQuestion) HasApproaches() bool { + if o != nil && !IsNil(o.Approaches) { + return true + } + + return false +} + +// SetApproaches gets a reference to the given []DFIQApproach and assigns it to the Approaches field. +func (o *DFIQQuestion) SetApproaches(v []DFIQApproach) { + o.Approaches = v +} + +// GetId returns the Id field value +func (o *DFIQQuestion) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DFIQQuestion) SetId(v string) { + o.Id = v +} + +// GetRootType returns the RootType field value +func (o *DFIQQuestion) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *DFIQQuestion) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *DFIQQuestion) SetRootType(v string) { + o.RootType = v +} + +func (o DFIQQuestion) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQQuestion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.DfiqId.IsSet() { + toSerialize["dfiq_id"] = o.DfiqId.Get() + } + toSerialize["dfiq_version"] = o.DfiqVersion + if o.DfiqTags != nil { + toSerialize["dfiq_tags"] = o.DfiqTags + } + if o.Contributors != nil { + toSerialize["contributors"] = o.Contributors + } + toSerialize["dfiq_yaml"] = o.DfiqYaml + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + toSerialize["description"] = o.Description.Get() + toSerialize["parent_ids"] = o.ParentIds + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Approaches) { + toSerialize["approaches"] = o.Approaches + } + toSerialize["id"] = o.Id + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *DFIQQuestion) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "dfiq_version", + "dfiq_yaml", + "description", + "parent_ids", + "id", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQQuestion := _DFIQQuestion{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDFIQQuestion) + + if err != nil { + return err + } + + *o = DFIQQuestion(varDFIQQuestion) + + return err +} + +type NullableDFIQQuestion struct { + value *DFIQQuestion + isSet bool +} + +func (v NullableDFIQQuestion) Get() *DFIQQuestion { + return v.value +} + +func (v *NullableDFIQQuestion) Set(val *DFIQQuestion) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQQuestion) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQQuestion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQQuestion(val *DFIQQuestion) *NullableDFIQQuestion { + return &NullableDFIQQuestion{value: val, isSet: true} +} + +func (v NullableDFIQQuestion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQQuestion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_scenario.go b/model_dfiq_scenario.go new file mode 100644 index 0000000..66132ef --- /dev/null +++ b/model_dfiq_scenario.go @@ -0,0 +1,577 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the DFIQScenario type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQScenario{} + +// DFIQScenario struct for DFIQScenario +type DFIQScenario struct { + Name string `json:"name"` + Uuid NullableString `json:"uuid,omitempty"` + DfiqId NullableString `json:"dfiq_id,omitempty"` + DfiqVersion string `json:"dfiq_version"` + DfiqTags []string `json:"dfiq_tags,omitempty"` + Contributors []string `json:"contributors,omitempty"` + DfiqYaml string `json:"dfiq_yaml"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Description string `json:"description"` + Type *string `json:"type,omitempty"` + Id string `json:"id"` + RootType string `json:"root_type"` +} + +type _DFIQScenario DFIQScenario + +// NewDFIQScenario instantiates a new DFIQScenario object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQScenario(name string, dfiqVersion string, dfiqYaml string, description string, id string, rootType string) *DFIQScenario { + this := DFIQScenario{} + this.Name = name + this.DfiqVersion = dfiqVersion + this.DfiqYaml = dfiqYaml + this.Description = description + var type_ string = "scenario" + this.Type = &type_ + this.Id = id + this.RootType = rootType + return &this +} + +// NewDFIQScenarioWithDefaults instantiates a new DFIQScenario object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQScenarioWithDefaults() *DFIQScenario { + this := DFIQScenario{} + var type_ string = "scenario" + this.Type = &type_ + return &this +} + +// GetName returns the Name field value +func (o *DFIQScenario) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DFIQScenario) SetName(v string) { + o.Name = v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQScenario) GetUuid() string { + if o == nil || IsNil(o.Uuid.Get()) { + var ret string + return ret + } + return *o.Uuid.Get() +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQScenario) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uuid.Get(), o.Uuid.IsSet() +} + +// HasUuid returns a boolean if a field has been set. +func (o *DFIQScenario) HasUuid() bool { + if o != nil && o.Uuid.IsSet() { + return true + } + + return false +} + +// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field. +func (o *DFIQScenario) SetUuid(v string) { + o.Uuid.Set(&v) +} + +// SetUuidNil sets the value for Uuid to be an explicit nil +func (o *DFIQScenario) SetUuidNil() { + o.Uuid.Set(nil) +} + +// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil +func (o *DFIQScenario) UnsetUuid() { + o.Uuid.Unset() +} + +// GetDfiqId returns the DfiqId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQScenario) GetDfiqId() string { + if o == nil || IsNil(o.DfiqId.Get()) { + var ret string + return ret + } + return *o.DfiqId.Get() +} + +// GetDfiqIdOk returns a tuple with the DfiqId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQScenario) GetDfiqIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DfiqId.Get(), o.DfiqId.IsSet() +} + +// HasDfiqId returns a boolean if a field has been set. +func (o *DFIQScenario) HasDfiqId() bool { + if o != nil && o.DfiqId.IsSet() { + return true + } + + return false +} + +// SetDfiqId gets a reference to the given NullableString and assigns it to the DfiqId field. +func (o *DFIQScenario) SetDfiqId(v string) { + o.DfiqId.Set(&v) +} + +// SetDfiqIdNil sets the value for DfiqId to be an explicit nil +func (o *DFIQScenario) SetDfiqIdNil() { + o.DfiqId.Set(nil) +} + +// UnsetDfiqId ensures that no value is present for DfiqId, not even an explicit nil +func (o *DFIQScenario) UnsetDfiqId() { + o.DfiqId.Unset() +} + +// GetDfiqVersion returns the DfiqVersion field value +func (o *DFIQScenario) GetDfiqVersion() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqVersion +} + +// GetDfiqVersionOk returns a tuple with the DfiqVersion field value +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetDfiqVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqVersion, true +} + +// SetDfiqVersion sets field value +func (o *DFIQScenario) SetDfiqVersion(v string) { + o.DfiqVersion = v +} + +// GetDfiqTags returns the DfiqTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQScenario) GetDfiqTags() []string { + if o == nil { + var ret []string + return ret + } + return o.DfiqTags +} + +// GetDfiqTagsOk returns a tuple with the DfiqTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQScenario) GetDfiqTagsOk() ([]string, bool) { + if o == nil || IsNil(o.DfiqTags) { + return nil, false + } + return o.DfiqTags, true +} + +// HasDfiqTags returns a boolean if a field has been set. +func (o *DFIQScenario) HasDfiqTags() bool { + if o != nil && !IsNil(o.DfiqTags) { + return true + } + + return false +} + +// SetDfiqTags gets a reference to the given []string and assigns it to the DfiqTags field. +func (o *DFIQScenario) SetDfiqTags(v []string) { + o.DfiqTags = v +} + +// GetContributors returns the Contributors field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DFIQScenario) GetContributors() []string { + if o == nil { + var ret []string + return ret + } + return o.Contributors +} + +// GetContributorsOk returns a tuple with the Contributors field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DFIQScenario) GetContributorsOk() ([]string, bool) { + if o == nil || IsNil(o.Contributors) { + return nil, false + } + return o.Contributors, true +} + +// HasContributors returns a boolean if a field has been set. +func (o *DFIQScenario) HasContributors() bool { + if o != nil && !IsNil(o.Contributors) { + return true + } + + return false +} + +// SetContributors gets a reference to the given []string and assigns it to the Contributors field. +func (o *DFIQScenario) SetContributors(v []string) { + o.Contributors = v +} + +// GetDfiqYaml returns the DfiqYaml field value +func (o *DFIQScenario) GetDfiqYaml() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqYaml +} + +// GetDfiqYamlOk returns a tuple with the DfiqYaml field value +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetDfiqYamlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqYaml, true +} + +// SetDfiqYaml sets field value +func (o *DFIQScenario) SetDfiqYaml(v string) { + o.DfiqYaml = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *DFIQScenario) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *DFIQScenario) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *DFIQScenario) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *DFIQScenario) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *DFIQScenario) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *DFIQScenario) SetModified(v time.Time) { + o.Modified = &v +} + +// GetDescription returns the Description field value +func (o *DFIQScenario) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *DFIQScenario) SetDescription(v string) { + o.Description = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DFIQScenario) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DFIQScenario) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DFIQScenario) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value +func (o *DFIQScenario) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DFIQScenario) SetId(v string) { + o.Id = v +} + +// GetRootType returns the RootType field value +func (o *DFIQScenario) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *DFIQScenario) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *DFIQScenario) SetRootType(v string) { + o.RootType = v +} + +func (o DFIQScenario) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQScenario) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Uuid.IsSet() { + toSerialize["uuid"] = o.Uuid.Get() + } + if o.DfiqId.IsSet() { + toSerialize["dfiq_id"] = o.DfiqId.Get() + } + toSerialize["dfiq_version"] = o.DfiqVersion + if o.DfiqTags != nil { + toSerialize["dfiq_tags"] = o.DfiqTags + } + if o.Contributors != nil { + toSerialize["contributors"] = o.Contributors + } + toSerialize["dfiq_yaml"] = o.DfiqYaml + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + toSerialize["description"] = o.Description + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["id"] = o.Id + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *DFIQScenario) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "dfiq_version", + "dfiq_yaml", + "description", + "id", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQScenario := _DFIQScenario{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDFIQScenario) + + if err != nil { + return err + } + + *o = DFIQScenario(varDFIQScenario) + + return err +} + +type NullableDFIQScenario struct { + value *DFIQScenario + isSet bool +} + +func (v NullableDFIQScenario) Get() *DFIQScenario { + return v.value +} + +func (v *NullableDFIQScenario) Set(val *DFIQScenario) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQScenario) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQScenario) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQScenario(val *DFIQScenario) *NullableDFIQScenario { + return &NullableDFIQScenario{value: val, isSet: true} +} + +func (v NullableDFIQScenario) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQScenario) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_search_request.go b/model_dfiq_search_request.go new file mode 100644 index 0000000..7a8aff1 --- /dev/null +++ b/model_dfiq_search_request.go @@ -0,0 +1,346 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the DFIQSearchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQSearchRequest{} + +// DFIQSearchRequest struct for DFIQSearchRequest +type DFIQSearchRequest struct { + Query map[string]QueryValue `json:"query,omitempty"` + Type *DFIQSearchRequestType `json:"type,omitempty"` + Sorting [][]interface{} `json:"sorting,omitempty"` + FilterAliases [][]interface{} `json:"filter_aliases,omitempty"` + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DFIQSearchRequest DFIQSearchRequest + +// NewDFIQSearchRequest instantiates a new DFIQSearchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQSearchRequest() *DFIQSearchRequest { + this := DFIQSearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// NewDFIQSearchRequestWithDefaults instantiates a new DFIQSearchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQSearchRequestWithDefaults() *DFIQSearchRequest { + this := DFIQSearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *DFIQSearchRequest) GetQuery() map[string]QueryValue { + if o == nil || IsNil(o.Query) { + var ret map[string]QueryValue + return ret + } + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQSearchRequest) GetQueryOk() (map[string]QueryValue, bool) { + if o == nil || IsNil(o.Query) { + return map[string]QueryValue{}, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *DFIQSearchRequest) HasQuery() bool { + if o != nil && !IsNil(o.Query) { + return true + } + + return false +} + +// SetQuery gets a reference to the given map[string]QueryValue and assigns it to the Query field. +func (o *DFIQSearchRequest) SetQuery(v map[string]QueryValue) { + o.Query = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DFIQSearchRequest) GetType() DFIQSearchRequestType { + if o == nil || IsNil(o.Type) { + var ret DFIQSearchRequestType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQSearchRequest) GetTypeOk() (*DFIQSearchRequestType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DFIQSearchRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given DFIQSearchRequestType and assigns it to the Type field. +func (o *DFIQSearchRequest) SetType(v DFIQSearchRequestType) { + o.Type = &v +} + +// GetSorting returns the Sorting field value if set, zero value otherwise. +func (o *DFIQSearchRequest) GetSorting() [][]interface{} { + if o == nil || IsNil(o.Sorting) { + var ret [][]interface{} + return ret + } + return o.Sorting +} + +// GetSortingOk returns a tuple with the Sorting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQSearchRequest) GetSortingOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.Sorting) { + return nil, false + } + return o.Sorting, true +} + +// HasSorting returns a boolean if a field has been set. +func (o *DFIQSearchRequest) HasSorting() bool { + if o != nil && !IsNil(o.Sorting) { + return true + } + + return false +} + +// SetSorting gets a reference to the given [][]interface{} and assigns it to the Sorting field. +func (o *DFIQSearchRequest) SetSorting(v [][]interface{}) { + o.Sorting = v +} + +// GetFilterAliases returns the FilterAliases field value if set, zero value otherwise. +func (o *DFIQSearchRequest) GetFilterAliases() [][]interface{} { + if o == nil || IsNil(o.FilterAliases) { + var ret [][]interface{} + return ret + } + return o.FilterAliases +} + +// GetFilterAliasesOk returns a tuple with the FilterAliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQSearchRequest) GetFilterAliasesOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.FilterAliases) { + return nil, false + } + return o.FilterAliases, true +} + +// HasFilterAliases returns a boolean if a field has been set. +func (o *DFIQSearchRequest) HasFilterAliases() bool { + if o != nil && !IsNil(o.FilterAliases) { + return true + } + + return false +} + +// SetFilterAliases gets a reference to the given [][]interface{} and assigns it to the FilterAliases field. +func (o *DFIQSearchRequest) SetFilterAliases(v [][]interface{}) { + o.FilterAliases = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *DFIQSearchRequest) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQSearchRequest) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *DFIQSearchRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *DFIQSearchRequest) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *DFIQSearchRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQSearchRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *DFIQSearchRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *DFIQSearchRequest) SetPage(v int32) { + o.Page = &v +} + +func (o DFIQSearchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQSearchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Query) { + toSerialize["query"] = o.Query + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Sorting) { + toSerialize["sorting"] = o.Sorting + } + if !IsNil(o.FilterAliases) { + toSerialize["filter_aliases"] = o.FilterAliases + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DFIQSearchRequest) UnmarshalJSON(data []byte) (err error) { + varDFIQSearchRequest := _DFIQSearchRequest{} + + err = json.Unmarshal(data, &varDFIQSearchRequest) + + if err != nil { + return err + } + + *o = DFIQSearchRequest(varDFIQSearchRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "query") + delete(additionalProperties, "type") + delete(additionalProperties, "sorting") + delete(additionalProperties, "filter_aliases") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDFIQSearchRequest struct { + value *DFIQSearchRequest + isSet bool +} + +func (v NullableDFIQSearchRequest) Get() *DFIQSearchRequest { + return v.value +} + +func (v *NullableDFIQSearchRequest) Set(val *DFIQSearchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQSearchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQSearchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQSearchRequest(val *DFIQSearchRequest) *NullableDFIQSearchRequest { + return &NullableDFIQSearchRequest{value: val, isSet: true} +} + +func (v NullableDFIQSearchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQSearchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_search_request_type.go b/model_dfiq_search_request_type.go new file mode 100644 index 0000000..7aad619 --- /dev/null +++ b/model_dfiq_search_request_type.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// DFIQSearchRequestType struct for DFIQSearchRequestType +type DFIQSearchRequestType struct { + DFIQType *DFIQType +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *DFIQSearchRequestType) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into DFIQType + err = json.Unmarshal(data, &dst.DFIQType) + if err == nil { + jsonDFIQType, _ := json.Marshal(dst.DFIQType) + if string(jsonDFIQType) == "{}" { // empty struct + dst.DFIQType = nil + } else { + return nil // data stored in dst.DFIQType, return on the first match + } + } else { + dst.DFIQType = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(DFIQSearchRequestType)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src DFIQSearchRequestType) MarshalJSON() ([]byte, error) { + if src.DFIQType != nil { + return json.Marshal(&src.DFIQType) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableDFIQSearchRequestType struct { + value *DFIQSearchRequestType + isSet bool +} + +func (v NullableDFIQSearchRequestType) Get() *DFIQSearchRequestType { + return v.value +} + +func (v *NullableDFIQSearchRequestType) Set(val *DFIQSearchRequestType) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQSearchRequestType) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQSearchRequestType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQSearchRequestType(val *DFIQSearchRequestType) *NullableDFIQSearchRequestType { + return &NullableDFIQSearchRequestType{value: val, isSet: true} +} + +func (v NullableDFIQSearchRequestType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQSearchRequestType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_search_response.go b/model_dfiq_search_response.go new file mode 100644 index 0000000..444b8a1 --- /dev/null +++ b/model_dfiq_search_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the DFIQSearchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQSearchResponse{} + +// DFIQSearchResponse struct for DFIQSearchResponse +type DFIQSearchResponse struct { + Dfiq []DfiqInner `json:"dfiq"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _DFIQSearchResponse DFIQSearchResponse + +// NewDFIQSearchResponse instantiates a new DFIQSearchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQSearchResponse(dfiq []DfiqInner, total int32) *DFIQSearchResponse { + this := DFIQSearchResponse{} + this.Dfiq = dfiq + this.Total = total + return &this +} + +// NewDFIQSearchResponseWithDefaults instantiates a new DFIQSearchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQSearchResponseWithDefaults() *DFIQSearchResponse { + this := DFIQSearchResponse{} + return &this +} + +// GetDfiq returns the Dfiq field value +func (o *DFIQSearchResponse) GetDfiq() []DfiqInner { + if o == nil { + var ret []DfiqInner + return ret + } + + return o.Dfiq +} + +// GetDfiqOk returns a tuple with the Dfiq field value +// and a boolean to check if the value has been set. +func (o *DFIQSearchResponse) GetDfiqOk() ([]DfiqInner, bool) { + if o == nil { + return nil, false + } + return o.Dfiq, true +} + +// SetDfiq sets field value +func (o *DFIQSearchResponse) SetDfiq(v []DfiqInner) { + o.Dfiq = v +} + +// GetTotal returns the Total field value +func (o *DFIQSearchResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *DFIQSearchResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *DFIQSearchResponse) SetTotal(v int32) { + o.Total = v +} + +func (o DFIQSearchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQSearchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dfiq"] = o.Dfiq + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DFIQSearchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dfiq", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQSearchResponse := _DFIQSearchResponse{} + + err = json.Unmarshal(data, &varDFIQSearchResponse) + + if err != nil { + return err + } + + *o = DFIQSearchResponse(varDFIQSearchResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "dfiq") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDFIQSearchResponse struct { + value *DFIQSearchResponse + isSet bool +} + +func (v NullableDFIQSearchResponse) Get() *DFIQSearchResponse { + return v.value +} + +func (v *NullableDFIQSearchResponse) Set(val *DFIQSearchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQSearchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQSearchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQSearchResponse(val *DFIQSearchResponse) *NullableDFIQSearchResponse { + return &NullableDFIQSearchResponse{value: val, isSet: true} +} + +func (v NullableDFIQSearchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQSearchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_type.go b/model_dfiq_type.go new file mode 100644 index 0000000..2b1d29c --- /dev/null +++ b/model_dfiq_type.go @@ -0,0 +1,112 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// DFIQType the model 'DFIQType' +type DFIQType string + +// List of DFIQType +const ( + SCENARIO DFIQType = "scenario" + FACET DFIQType = "facet" + QUESTION DFIQType = "question" +) + +// All allowed values of DFIQType enum +var AllowedDFIQTypeEnumValues = []DFIQType{ + "scenario", + "facet", + "question", +} + +func (v *DFIQType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DFIQType(value) + for _, existing := range AllowedDFIQTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid DFIQType", value) +} + +// NewDFIQTypeFromValue returns a pointer to a valid DFIQType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDFIQTypeFromValue(v string) (*DFIQType, error) { + ev := DFIQType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DFIQType: valid values are %v", v, AllowedDFIQTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DFIQType) IsValid() bool { + for _, existing := range AllowedDFIQTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DFIQType value +func (v DFIQType) Ptr() *DFIQType { + return &v +} + +type NullableDFIQType struct { + value *DFIQType + isSet bool +} + +func (v NullableDFIQType) Get() *DFIQType { + return v.value +} + +func (v *NullableDFIQType) Set(val *DFIQType) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQType) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQType(val *DFIQType) *NullableDFIQType { + return &NullableDFIQType{value: val, isSet: true} +} + +func (v NullableDFIQType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_validate_request.go b/model_dfiq_validate_request.go new file mode 100644 index 0000000..3930a24 --- /dev/null +++ b/model_dfiq_validate_request.go @@ -0,0 +1,277 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the DFIQValidateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQValidateRequest{} + +// DFIQValidateRequest struct for DFIQValidateRequest +type DFIQValidateRequest struct { + DfiqYaml string `json:"dfiq_yaml"` + DfiqType DFIQType `json:"dfiq_type"` + UpdateIndicators *bool `json:"update_indicators,omitempty"` + CheckId *bool `json:"check_id,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DFIQValidateRequest DFIQValidateRequest + +// NewDFIQValidateRequest instantiates a new DFIQValidateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQValidateRequest(dfiqYaml string, dfiqType DFIQType) *DFIQValidateRequest { + this := DFIQValidateRequest{} + this.DfiqYaml = dfiqYaml + this.DfiqType = dfiqType + var updateIndicators bool = false + this.UpdateIndicators = &updateIndicators + var checkId bool = false + this.CheckId = &checkId + return &this +} + +// NewDFIQValidateRequestWithDefaults instantiates a new DFIQValidateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQValidateRequestWithDefaults() *DFIQValidateRequest { + this := DFIQValidateRequest{} + var updateIndicators bool = false + this.UpdateIndicators = &updateIndicators + var checkId bool = false + this.CheckId = &checkId + return &this +} + +// GetDfiqYaml returns the DfiqYaml field value +func (o *DFIQValidateRequest) GetDfiqYaml() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqYaml +} + +// GetDfiqYamlOk returns a tuple with the DfiqYaml field value +// and a boolean to check if the value has been set. +func (o *DFIQValidateRequest) GetDfiqYamlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqYaml, true +} + +// SetDfiqYaml sets field value +func (o *DFIQValidateRequest) SetDfiqYaml(v string) { + o.DfiqYaml = v +} + +// GetDfiqType returns the DfiqType field value +func (o *DFIQValidateRequest) GetDfiqType() DFIQType { + if o == nil { + var ret DFIQType + return ret + } + + return o.DfiqType +} + +// GetDfiqTypeOk returns a tuple with the DfiqType field value +// and a boolean to check if the value has been set. +func (o *DFIQValidateRequest) GetDfiqTypeOk() (*DFIQType, bool) { + if o == nil { + return nil, false + } + return &o.DfiqType, true +} + +// SetDfiqType sets field value +func (o *DFIQValidateRequest) SetDfiqType(v DFIQType) { + o.DfiqType = v +} + +// GetUpdateIndicators returns the UpdateIndicators field value if set, zero value otherwise. +func (o *DFIQValidateRequest) GetUpdateIndicators() bool { + if o == nil || IsNil(o.UpdateIndicators) { + var ret bool + return ret + } + return *o.UpdateIndicators +} + +// GetUpdateIndicatorsOk returns a tuple with the UpdateIndicators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQValidateRequest) GetUpdateIndicatorsOk() (*bool, bool) { + if o == nil || IsNil(o.UpdateIndicators) { + return nil, false + } + return o.UpdateIndicators, true +} + +// HasUpdateIndicators returns a boolean if a field has been set. +func (o *DFIQValidateRequest) HasUpdateIndicators() bool { + if o != nil && !IsNil(o.UpdateIndicators) { + return true + } + + return false +} + +// SetUpdateIndicators gets a reference to the given bool and assigns it to the UpdateIndicators field. +func (o *DFIQValidateRequest) SetUpdateIndicators(v bool) { + o.UpdateIndicators = &v +} + +// GetCheckId returns the CheckId field value if set, zero value otherwise. +func (o *DFIQValidateRequest) GetCheckId() bool { + if o == nil || IsNil(o.CheckId) { + var ret bool + return ret + } + return *o.CheckId +} + +// GetCheckIdOk returns a tuple with the CheckId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQValidateRequest) GetCheckIdOk() (*bool, bool) { + if o == nil || IsNil(o.CheckId) { + return nil, false + } + return o.CheckId, true +} + +// HasCheckId returns a boolean if a field has been set. +func (o *DFIQValidateRequest) HasCheckId() bool { + if o != nil && !IsNil(o.CheckId) { + return true + } + + return false +} + +// SetCheckId gets a reference to the given bool and assigns it to the CheckId field. +func (o *DFIQValidateRequest) SetCheckId(v bool) { + o.CheckId = &v +} + +func (o DFIQValidateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQValidateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dfiq_yaml"] = o.DfiqYaml + toSerialize["dfiq_type"] = o.DfiqType + if !IsNil(o.UpdateIndicators) { + toSerialize["update_indicators"] = o.UpdateIndicators + } + if !IsNil(o.CheckId) { + toSerialize["check_id"] = o.CheckId + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DFIQValidateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dfiq_yaml", + "dfiq_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQValidateRequest := _DFIQValidateRequest{} + + err = json.Unmarshal(data, &varDFIQValidateRequest) + + if err != nil { + return err + } + + *o = DFIQValidateRequest(varDFIQValidateRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "dfiq_yaml") + delete(additionalProperties, "dfiq_type") + delete(additionalProperties, "update_indicators") + delete(additionalProperties, "check_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDFIQValidateRequest struct { + value *DFIQValidateRequest + isSet bool +} + +func (v NullableDFIQValidateRequest) Get() *DFIQValidateRequest { + return v.value +} + +func (v *NullableDFIQValidateRequest) Set(val *DFIQValidateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQValidateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQValidateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQValidateRequest(val *DFIQValidateRequest) *NullableDFIQValidateRequest { + return &NullableDFIQValidateRequest{value: val, isSet: true} +} + +func (v NullableDFIQValidateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQValidateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_dfiq_validate_response.go b/model_dfiq_validate_response.go new file mode 100644 index 0000000..ad51ceb --- /dev/null +++ b/model_dfiq_validate_response.go @@ -0,0 +1,248 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the DFIQValidateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DFIQValidateResponse{} + +// DFIQValidateResponse struct for DFIQValidateResponse +type DFIQValidateResponse struct { + Valid bool `json:"valid"` + Error *Error `json:"error,omitempty"` + ErrorType *string `json:"error_type,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DFIQValidateResponse DFIQValidateResponse + +// NewDFIQValidateResponse instantiates a new DFIQValidateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDFIQValidateResponse(valid bool) *DFIQValidateResponse { + this := DFIQValidateResponse{} + this.Valid = valid + var error_ Error + this.Error = &error_ + var errorType string = "message" + this.ErrorType = &errorType + return &this +} + +// NewDFIQValidateResponseWithDefaults instantiates a new DFIQValidateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDFIQValidateResponseWithDefaults() *DFIQValidateResponse { + this := DFIQValidateResponse{} + var error_ Error + this.Error = &error_ + var errorType string = "message" + this.ErrorType = &errorType + return &this +} + +// GetValid returns the Valid field value +func (o *DFIQValidateResponse) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *DFIQValidateResponse) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *DFIQValidateResponse) SetValid(v bool) { + o.Valid = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *DFIQValidateResponse) GetError() Error { + if o == nil || IsNil(o.Error) { + var ret Error + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQValidateResponse) GetErrorOk() (*Error, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *DFIQValidateResponse) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given Error and assigns it to the Error field. +func (o *DFIQValidateResponse) SetError(v Error) { + o.Error = &v +} + +// GetErrorType returns the ErrorType field value if set, zero value otherwise. +func (o *DFIQValidateResponse) GetErrorType() string { + if o == nil || IsNil(o.ErrorType) { + var ret string + return ret + } + return *o.ErrorType +} + +// GetErrorTypeOk returns a tuple with the ErrorType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DFIQValidateResponse) GetErrorTypeOk() (*string, bool) { + if o == nil || IsNil(o.ErrorType) { + return nil, false + } + return o.ErrorType, true +} + +// HasErrorType returns a boolean if a field has been set. +func (o *DFIQValidateResponse) HasErrorType() bool { + if o != nil && !IsNil(o.ErrorType) { + return true + } + + return false +} + +// SetErrorType gets a reference to the given string and assigns it to the ErrorType field. +func (o *DFIQValidateResponse) SetErrorType(v string) { + o.ErrorType = &v +} + +func (o DFIQValidateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DFIQValidateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["valid"] = o.Valid + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.ErrorType) { + toSerialize["error_type"] = o.ErrorType + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DFIQValidateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "valid", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDFIQValidateResponse := _DFIQValidateResponse{} + + err = json.Unmarshal(data, &varDFIQValidateResponse) + + if err != nil { + return err + } + + *o = DFIQValidateResponse(varDFIQValidateResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "valid") + delete(additionalProperties, "error") + delete(additionalProperties, "error_type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDFIQValidateResponse struct { + value *DFIQValidateResponse + isSet bool +} + +func (v NullableDFIQValidateResponse) Get() *DFIQValidateResponse { + return v.value +} + +func (v *NullableDFIQValidateResponse) Set(val *DFIQValidateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDFIQValidateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDFIQValidateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDFIQValidateResponse(val *DFIQValidateResponse) *NullableDFIQValidateResponse { + return &NullableDFIQValidateResponse{value: val, isSet: true} +} + +func (v NullableDFIQValidateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDFIQValidateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_diamond_model.go b/model_diamond_model.go new file mode 100644 index 0000000..30bf133 --- /dev/null +++ b/model_diamond_model.go @@ -0,0 +1,114 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// DiamondModel the model 'DiamondModel' +type DiamondModel string + +// List of DiamondModel +const ( + ADVERSARY DiamondModel = "adversary" + CAPABILITY DiamondModel = "capability" + INFRASTRUCTURE DiamondModel = "infrastructure" + VICTIM DiamondModel = "victim" +) + +// All allowed values of DiamondModel enum +var AllowedDiamondModelEnumValues = []DiamondModel{ + "adversary", + "capability", + "infrastructure", + "victim", +} + +func (v *DiamondModel) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DiamondModel(value) + for _, existing := range AllowedDiamondModelEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid DiamondModel", value) +} + +// NewDiamondModelFromValue returns a pointer to a valid DiamondModel +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDiamondModelFromValue(v string) (*DiamondModel, error) { + ev := DiamondModel(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DiamondModel: valid values are %v", v, AllowedDiamondModelEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DiamondModel) IsValid() bool { + for _, existing := range AllowedDiamondModelEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DiamondModel value +func (v DiamondModel) Ptr() *DiamondModel { + return &v +} + +type NullableDiamondModel struct { + value *DiamondModel + isSet bool +} + +func (v NullableDiamondModel) Get() *DiamondModel { + return v.value +} + +func (v *NullableDiamondModel) Set(val *DiamondModel) { + v.value = val + v.isSet = true +} + +func (v NullableDiamondModel) IsSet() bool { + return v.isSet +} + +func (v *NullableDiamondModel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDiamondModel(val *DiamondModel) *NullableDiamondModel { + return &NullableDiamondModel{value: val, isSet: true} +} + +func (v NullableDiamondModel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDiamondModel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_docker_image_input.go b/model_docker_image_input.go new file mode 100644 index 0000000..d17696a --- /dev/null +++ b/model_docker_image_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the DockerImageInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DockerImageInput{} + +// DockerImageInput struct for DockerImageInput +type DockerImageInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _DockerImageInput DockerImageInput + +// NewDockerImageInput instantiates a new DockerImageInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDockerImageInput(value string) *DockerImageInput { + this := DockerImageInput{} + this.Value = value + var type_ string = "docker_image" + this.Type = &type_ + return &this +} + +// NewDockerImageInputWithDefaults instantiates a new DockerImageInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDockerImageInputWithDefaults() *DockerImageInput { + this := DockerImageInput{} + var type_ string = "docker_image" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *DockerImageInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *DockerImageInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *DockerImageInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DockerImageInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DockerImageInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DockerImageInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DockerImageInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *DockerImageInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DockerImageInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *DockerImageInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *DockerImageInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *DockerImageInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DockerImageInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *DockerImageInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *DockerImageInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *DockerImageInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DockerImageInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *DockerImageInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *DockerImageInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o DockerImageInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DockerImageInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *DockerImageInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDockerImageInput := _DockerImageInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDockerImageInput) + + if err != nil { + return err + } + + *o = DockerImageInput(varDockerImageInput) + + return err +} + +type NullableDockerImageInput struct { + value *DockerImageInput + isSet bool +} + +func (v NullableDockerImageInput) Get() *DockerImageInput { + return v.value +} + +func (v *NullableDockerImageInput) Set(val *DockerImageInput) { + v.value = val + v.isSet = true +} + +func (v NullableDockerImageInput) IsSet() bool { + return v.isSet +} + +func (v *NullableDockerImageInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDockerImageInput(val *DockerImageInput) *NullableDockerImageInput { + return &NullableDockerImageInput{value: val, isSet: true} +} + +func (v NullableDockerImageInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDockerImageInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_docker_image_output.go b/model_docker_image_output.go new file mode 100644 index 0000000..b16dd66 --- /dev/null +++ b/model_docker_image_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the DockerImageOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DockerImageOutput{} + +// DockerImageOutput struct for DockerImageOutput +type DockerImageOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _DockerImageOutput DockerImageOutput + +// NewDockerImageOutput instantiates a new DockerImageOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDockerImageOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *DockerImageOutput { + this := DockerImageOutput{} + this.Value = value + var type_ string = "docker_image" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewDockerImageOutputWithDefaults instantiates a new DockerImageOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDockerImageOutputWithDefaults() *DockerImageOutput { + this := DockerImageOutput{} + var type_ string = "docker_image" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *DockerImageOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *DockerImageOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *DockerImageOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DockerImageOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DockerImageOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DockerImageOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DockerImageOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *DockerImageOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DockerImageOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *DockerImageOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *DockerImageOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *DockerImageOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DockerImageOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *DockerImageOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *DockerImageOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *DockerImageOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DockerImageOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *DockerImageOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *DockerImageOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *DockerImageOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DockerImageOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DockerImageOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *DockerImageOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *DockerImageOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *DockerImageOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *DockerImageOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *DockerImageOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *DockerImageOutput) SetRootType(v string) { + o.RootType = v +} + +func (o DockerImageOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DockerImageOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *DockerImageOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDockerImageOutput := _DockerImageOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDockerImageOutput) + + if err != nil { + return err + } + + *o = DockerImageOutput(varDockerImageOutput) + + return err +} + +type NullableDockerImageOutput struct { + value *DockerImageOutput + isSet bool +} + +func (v NullableDockerImageOutput) Get() *DockerImageOutput { + return v.value +} + +func (v *NullableDockerImageOutput) Set(val *DockerImageOutput) { + v.value = val + v.isSet = true +} + +func (v NullableDockerImageOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableDockerImageOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDockerImageOutput(val *DockerImageOutput) *NullableDockerImageOutput { + return &NullableDockerImageOutput{value: val, isSet: true} +} + +func (v NullableDockerImageOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDockerImageOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_email_input.go b/model_email_input.go new file mode 100644 index 0000000..8059db2 --- /dev/null +++ b/model_email_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the EmailInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailInput{} + +// EmailInput struct for EmailInput +type EmailInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _EmailInput EmailInput + +// NewEmailInput instantiates a new EmailInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEmailInput(value string) *EmailInput { + this := EmailInput{} + this.Value = value + var type_ string = "email" + this.Type = &type_ + return &this +} + +// NewEmailInputWithDefaults instantiates a new EmailInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEmailInputWithDefaults() *EmailInput { + this := EmailInput{} + var type_ string = "email" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *EmailInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *EmailInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *EmailInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EmailInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EmailInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EmailInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *EmailInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *EmailInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *EmailInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *EmailInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *EmailInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *EmailInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *EmailInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *EmailInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *EmailInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o EmailInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *EmailInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEmailInput := _EmailInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEmailInput) + + if err != nil { + return err + } + + *o = EmailInput(varEmailInput) + + return err +} + +type NullableEmailInput struct { + value *EmailInput + isSet bool +} + +func (v NullableEmailInput) Get() *EmailInput { + return v.value +} + +func (v *NullableEmailInput) Set(val *EmailInput) { + v.value = val + v.isSet = true +} + +func (v NullableEmailInput) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailInput(val *EmailInput) *NullableEmailInput { + return &NullableEmailInput{value: val, isSet: true} +} + +func (v NullableEmailInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_email_output.go b/model_email_output.go new file mode 100644 index 0000000..e56bd53 --- /dev/null +++ b/model_email_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the EmailOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailOutput{} + +// EmailOutput struct for EmailOutput +type EmailOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _EmailOutput EmailOutput + +// NewEmailOutput instantiates a new EmailOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEmailOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *EmailOutput { + this := EmailOutput{} + this.Value = value + var type_ string = "email" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewEmailOutputWithDefaults instantiates a new EmailOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEmailOutputWithDefaults() *EmailOutput { + this := EmailOutput{} + var type_ string = "email" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *EmailOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *EmailOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *EmailOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EmailOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EmailOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EmailOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *EmailOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *EmailOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *EmailOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *EmailOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *EmailOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *EmailOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *EmailOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *EmailOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *EmailOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *EmailOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EmailOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EmailOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *EmailOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *EmailOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *EmailOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *EmailOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *EmailOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *EmailOutput) SetRootType(v string) { + o.RootType = v +} + +func (o EmailOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *EmailOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEmailOutput := _EmailOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEmailOutput) + + if err != nil { + return err + } + + *o = EmailOutput(varEmailOutput) + + return err +} + +type NullableEmailOutput struct { + value *EmailOutput + isSet bool +} + +func (v NullableEmailOutput) Get() *EmailOutput { + return v.value +} + +func (v *NullableEmailOutput) Set(val *EmailOutput) { + v.value = val + v.isSet = true +} + +func (v NullableEmailOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailOutput(val *EmailOutput) *NullableEmailOutput { + return &NullableEmailOutput{value: val, isSet: true} +} + +func (v NullableEmailOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entities_inner.go b/model_entities_inner.go new file mode 100644 index 0000000..7fc9e04 --- /dev/null +++ b/model_entities_inner.go @@ -0,0 +1,301 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// EntitiesInner struct for EntitiesInner +type EntitiesInner struct { + AttackPatternOutput *AttackPatternOutput + CampaignOutput *CampaignOutput + CompanyOutput *CompanyOutput + CourseOfActionOutput *CourseOfActionOutput + IdentityOutput *IdentityOutput + IntrusionSetOutput *IntrusionSetOutput + InvestigationOutput *InvestigationOutput + MalwareOutput *MalwareOutput + NoteOutput *NoteOutput + PhoneOutput *PhoneOutput + ThreatActorOutput *ThreatActorOutput + ToolOutput *ToolOutput + VulnerabilityOutput *VulnerabilityOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *EntitiesInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AttackPatternOutput + err = json.Unmarshal(data, &dst.AttackPatternOutput) + if err == nil { + jsonAttackPatternOutput, _ := json.Marshal(dst.AttackPatternOutput) + if string(jsonAttackPatternOutput) == "{}" { // empty struct + dst.AttackPatternOutput = nil + } else { + return nil // data stored in dst.AttackPatternOutput, return on the first match + } + } else { + dst.AttackPatternOutput = nil + } + + // try to unmarshal JSON data into CampaignOutput + err = json.Unmarshal(data, &dst.CampaignOutput) + if err == nil { + jsonCampaignOutput, _ := json.Marshal(dst.CampaignOutput) + if string(jsonCampaignOutput) == "{}" { // empty struct + dst.CampaignOutput = nil + } else { + return nil // data stored in dst.CampaignOutput, return on the first match + } + } else { + dst.CampaignOutput = nil + } + + // try to unmarshal JSON data into CompanyOutput + err = json.Unmarshal(data, &dst.CompanyOutput) + if err == nil { + jsonCompanyOutput, _ := json.Marshal(dst.CompanyOutput) + if string(jsonCompanyOutput) == "{}" { // empty struct + dst.CompanyOutput = nil + } else { + return nil // data stored in dst.CompanyOutput, return on the first match + } + } else { + dst.CompanyOutput = nil + } + + // try to unmarshal JSON data into CourseOfActionOutput + err = json.Unmarshal(data, &dst.CourseOfActionOutput) + if err == nil { + jsonCourseOfActionOutput, _ := json.Marshal(dst.CourseOfActionOutput) + if string(jsonCourseOfActionOutput) == "{}" { // empty struct + dst.CourseOfActionOutput = nil + } else { + return nil // data stored in dst.CourseOfActionOutput, return on the first match + } + } else { + dst.CourseOfActionOutput = nil + } + + // try to unmarshal JSON data into IdentityOutput + err = json.Unmarshal(data, &dst.IdentityOutput) + if err == nil { + jsonIdentityOutput, _ := json.Marshal(dst.IdentityOutput) + if string(jsonIdentityOutput) == "{}" { // empty struct + dst.IdentityOutput = nil + } else { + return nil // data stored in dst.IdentityOutput, return on the first match + } + } else { + dst.IdentityOutput = nil + } + + // try to unmarshal JSON data into IntrusionSetOutput + err = json.Unmarshal(data, &dst.IntrusionSetOutput) + if err == nil { + jsonIntrusionSetOutput, _ := json.Marshal(dst.IntrusionSetOutput) + if string(jsonIntrusionSetOutput) == "{}" { // empty struct + dst.IntrusionSetOutput = nil + } else { + return nil // data stored in dst.IntrusionSetOutput, return on the first match + } + } else { + dst.IntrusionSetOutput = nil + } + + // try to unmarshal JSON data into InvestigationOutput + err = json.Unmarshal(data, &dst.InvestigationOutput) + if err == nil { + jsonInvestigationOutput, _ := json.Marshal(dst.InvestigationOutput) + if string(jsonInvestigationOutput) == "{}" { // empty struct + dst.InvestigationOutput = nil + } else { + return nil // data stored in dst.InvestigationOutput, return on the first match + } + } else { + dst.InvestigationOutput = nil + } + + // try to unmarshal JSON data into MalwareOutput + err = json.Unmarshal(data, &dst.MalwareOutput) + if err == nil { + jsonMalwareOutput, _ := json.Marshal(dst.MalwareOutput) + if string(jsonMalwareOutput) == "{}" { // empty struct + dst.MalwareOutput = nil + } else { + return nil // data stored in dst.MalwareOutput, return on the first match + } + } else { + dst.MalwareOutput = nil + } + + // try to unmarshal JSON data into NoteOutput + err = json.Unmarshal(data, &dst.NoteOutput) + if err == nil { + jsonNoteOutput, _ := json.Marshal(dst.NoteOutput) + if string(jsonNoteOutput) == "{}" { // empty struct + dst.NoteOutput = nil + } else { + return nil // data stored in dst.NoteOutput, return on the first match + } + } else { + dst.NoteOutput = nil + } + + // try to unmarshal JSON data into PhoneOutput + err = json.Unmarshal(data, &dst.PhoneOutput) + if err == nil { + jsonPhoneOutput, _ := json.Marshal(dst.PhoneOutput) + if string(jsonPhoneOutput) == "{}" { // empty struct + dst.PhoneOutput = nil + } else { + return nil // data stored in dst.PhoneOutput, return on the first match + } + } else { + dst.PhoneOutput = nil + } + + // try to unmarshal JSON data into ThreatActorOutput + err = json.Unmarshal(data, &dst.ThreatActorOutput) + if err == nil { + jsonThreatActorOutput, _ := json.Marshal(dst.ThreatActorOutput) + if string(jsonThreatActorOutput) == "{}" { // empty struct + dst.ThreatActorOutput = nil + } else { + return nil // data stored in dst.ThreatActorOutput, return on the first match + } + } else { + dst.ThreatActorOutput = nil + } + + // try to unmarshal JSON data into ToolOutput + err = json.Unmarshal(data, &dst.ToolOutput) + if err == nil { + jsonToolOutput, _ := json.Marshal(dst.ToolOutput) + if string(jsonToolOutput) == "{}" { // empty struct + dst.ToolOutput = nil + } else { + return nil // data stored in dst.ToolOutput, return on the first match + } + } else { + dst.ToolOutput = nil + } + + // try to unmarshal JSON data into VulnerabilityOutput + err = json.Unmarshal(data, &dst.VulnerabilityOutput) + if err == nil { + jsonVulnerabilityOutput, _ := json.Marshal(dst.VulnerabilityOutput) + if string(jsonVulnerabilityOutput) == "{}" { // empty struct + dst.VulnerabilityOutput = nil + } else { + return nil // data stored in dst.VulnerabilityOutput, return on the first match + } + } else { + dst.VulnerabilityOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(EntitiesInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src EntitiesInner) MarshalJSON() ([]byte, error) { + if src.AttackPatternOutput != nil { + return json.Marshal(&src.AttackPatternOutput) + } + + if src.CampaignOutput != nil { + return json.Marshal(&src.CampaignOutput) + } + + if src.CompanyOutput != nil { + return json.Marshal(&src.CompanyOutput) + } + + if src.CourseOfActionOutput != nil { + return json.Marshal(&src.CourseOfActionOutput) + } + + if src.IdentityOutput != nil { + return json.Marshal(&src.IdentityOutput) + } + + if src.IntrusionSetOutput != nil { + return json.Marshal(&src.IntrusionSetOutput) + } + + if src.InvestigationOutput != nil { + return json.Marshal(&src.InvestigationOutput) + } + + if src.MalwareOutput != nil { + return json.Marshal(&src.MalwareOutput) + } + + if src.NoteOutput != nil { + return json.Marshal(&src.NoteOutput) + } + + if src.PhoneOutput != nil { + return json.Marshal(&src.PhoneOutput) + } + + if src.ThreatActorOutput != nil { + return json.Marshal(&src.ThreatActorOutput) + } + + if src.ToolOutput != nil { + return json.Marshal(&src.ToolOutput) + } + + if src.VulnerabilityOutput != nil { + return json.Marshal(&src.VulnerabilityOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableEntitiesInner struct { + value *EntitiesInner + isSet bool +} + +func (v NullableEntitiesInner) Get() *EntitiesInner { + return v.value +} + +func (v *NullableEntitiesInner) Set(val *EntitiesInner) { + v.value = val + v.isSet = true +} + +func (v NullableEntitiesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableEntitiesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntitiesInner(val *EntitiesInner) *NullableEntitiesInner { + return &NullableEntitiesInner{value: val, isSet: true} +} + +func (v NullableEntitiesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntitiesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entity.go b/model_entity.go new file mode 100644 index 0000000..4423c44 --- /dev/null +++ b/model_entity.go @@ -0,0 +1,445 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Entity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Entity{} + +// Entity struct for Entity +type Entity struct { + Type string `json:"type"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _Entity Entity + +// NewEntity instantiates a new Entity object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEntity(type_ string, name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *Entity { + this := Entity{} + this.Type = type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewEntityWithDefaults instantiates a new Entity object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEntityWithDefaults() *Entity { + this := Entity{} + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value +func (o *Entity) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Entity) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Entity) SetType(v string) { + o.Type = v +} + +// GetName returns the Name field value +func (o *Entity) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Entity) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Entity) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Entity) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Entity) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Entity) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Entity) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *Entity) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Entity) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *Entity) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *Entity) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *Entity) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Entity) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *Entity) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *Entity) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *Entity) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Entity) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *Entity) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *Entity) SetModified(v time.Time) { + o.Modified = &v +} + +// GetId returns the Id field value +func (o *Entity) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Entity) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Entity) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *Entity) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *Entity) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *Entity) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *Entity) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *Entity) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *Entity) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *Entity) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *Entity) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *Entity) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o Entity) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Entity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *Entity) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEntity := _Entity{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEntity) + + if err != nil { + return err + } + + *o = Entity(varEntity) + + return err +} + +type NullableEntity struct { + value *Entity + isSet bool +} + +func (v NullableEntity) Get() *Entity { + return v.value +} + +func (v *NullableEntity) Set(val *Entity) { + v.value = val + v.isSet = true +} + +func (v NullableEntity) IsSet() bool { + return v.isSet +} + +func (v *NullableEntity) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntity(val *Entity) *NullableEntity { + return &NullableEntity{value: val, isSet: true} +} + +func (v NullableEntity) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntity) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entity_1.go b/model_entity_1.go new file mode 100644 index 0000000..38b0372 --- /dev/null +++ b/model_entity_1.go @@ -0,0 +1,528 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// Entity1 - struct for Entity1 +type Entity1 struct { + AttackPatternInput *AttackPatternInput + CampaignInput *CampaignInput + CompanyInput *CompanyInput + CourseOfActionInput *CourseOfActionInput + IdentityInput *IdentityInput + IntrusionSetInput *IntrusionSetInput + InvestigationInput *InvestigationInput + MalwareInput *MalwareInput + NoteInput *NoteInput + PhoneInput *PhoneInput + ThreatActorInput *ThreatActorInput + ToolInput *ToolInput + VulnerabilityInput *VulnerabilityInput +} + +// AttackPatternInputAsEntity1 is a convenience function that returns AttackPatternInput wrapped in Entity1 +func AttackPatternInputAsEntity1(v *AttackPatternInput) Entity1 { + return Entity1{ + AttackPatternInput: v, + } +} + +// CampaignInputAsEntity1 is a convenience function that returns CampaignInput wrapped in Entity1 +func CampaignInputAsEntity1(v *CampaignInput) Entity1 { + return Entity1{ + CampaignInput: v, + } +} + +// CompanyInputAsEntity1 is a convenience function that returns CompanyInput wrapped in Entity1 +func CompanyInputAsEntity1(v *CompanyInput) Entity1 { + return Entity1{ + CompanyInput: v, + } +} + +// CourseOfActionInputAsEntity1 is a convenience function that returns CourseOfActionInput wrapped in Entity1 +func CourseOfActionInputAsEntity1(v *CourseOfActionInput) Entity1 { + return Entity1{ + CourseOfActionInput: v, + } +} + +// IdentityInputAsEntity1 is a convenience function that returns IdentityInput wrapped in Entity1 +func IdentityInputAsEntity1(v *IdentityInput) Entity1 { + return Entity1{ + IdentityInput: v, + } +} + +// IntrusionSetInputAsEntity1 is a convenience function that returns IntrusionSetInput wrapped in Entity1 +func IntrusionSetInputAsEntity1(v *IntrusionSetInput) Entity1 { + return Entity1{ + IntrusionSetInput: v, + } +} + +// InvestigationInputAsEntity1 is a convenience function that returns InvestigationInput wrapped in Entity1 +func InvestigationInputAsEntity1(v *InvestigationInput) Entity1 { + return Entity1{ + InvestigationInput: v, + } +} + +// MalwareInputAsEntity1 is a convenience function that returns MalwareInput wrapped in Entity1 +func MalwareInputAsEntity1(v *MalwareInput) Entity1 { + return Entity1{ + MalwareInput: v, + } +} + +// NoteInputAsEntity1 is a convenience function that returns NoteInput wrapped in Entity1 +func NoteInputAsEntity1(v *NoteInput) Entity1 { + return Entity1{ + NoteInput: v, + } +} + +// PhoneInputAsEntity1 is a convenience function that returns PhoneInput wrapped in Entity1 +func PhoneInputAsEntity1(v *PhoneInput) Entity1 { + return Entity1{ + PhoneInput: v, + } +} + +// ThreatActorInputAsEntity1 is a convenience function that returns ThreatActorInput wrapped in Entity1 +func ThreatActorInputAsEntity1(v *ThreatActorInput) Entity1 { + return Entity1{ + ThreatActorInput: v, + } +} + +// ToolInputAsEntity1 is a convenience function that returns ToolInput wrapped in Entity1 +func ToolInputAsEntity1(v *ToolInput) Entity1 { + return Entity1{ + ToolInput: v, + } +} + +// VulnerabilityInputAsEntity1 is a convenience function that returns VulnerabilityInput wrapped in Entity1 +func VulnerabilityInputAsEntity1(v *VulnerabilityInput) Entity1 { + return Entity1{ + VulnerabilityInput: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *Entity1) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into AttackPatternInput + err = newStrictDecoder(data).Decode(&dst.AttackPatternInput) + if err == nil { + jsonAttackPatternInput, _ := json.Marshal(dst.AttackPatternInput) + if string(jsonAttackPatternInput) == "{}" { // empty struct + dst.AttackPatternInput = nil + } else { + if err = validator.Validate(dst.AttackPatternInput); err != nil { + dst.AttackPatternInput = nil + } else { + match++ + } + } + } else { + dst.AttackPatternInput = nil + } + + // try to unmarshal data into CampaignInput + err = newStrictDecoder(data).Decode(&dst.CampaignInput) + if err == nil { + jsonCampaignInput, _ := json.Marshal(dst.CampaignInput) + if string(jsonCampaignInput) == "{}" { // empty struct + dst.CampaignInput = nil + } else { + if err = validator.Validate(dst.CampaignInput); err != nil { + dst.CampaignInput = nil + } else { + match++ + } + } + } else { + dst.CampaignInput = nil + } + + // try to unmarshal data into CompanyInput + err = newStrictDecoder(data).Decode(&dst.CompanyInput) + if err == nil { + jsonCompanyInput, _ := json.Marshal(dst.CompanyInput) + if string(jsonCompanyInput) == "{}" { // empty struct + dst.CompanyInput = nil + } else { + if err = validator.Validate(dst.CompanyInput); err != nil { + dst.CompanyInput = nil + } else { + match++ + } + } + } else { + dst.CompanyInput = nil + } + + // try to unmarshal data into CourseOfActionInput + err = newStrictDecoder(data).Decode(&dst.CourseOfActionInput) + if err == nil { + jsonCourseOfActionInput, _ := json.Marshal(dst.CourseOfActionInput) + if string(jsonCourseOfActionInput) == "{}" { // empty struct + dst.CourseOfActionInput = nil + } else { + if err = validator.Validate(dst.CourseOfActionInput); err != nil { + dst.CourseOfActionInput = nil + } else { + match++ + } + } + } else { + dst.CourseOfActionInput = nil + } + + // try to unmarshal data into IdentityInput + err = newStrictDecoder(data).Decode(&dst.IdentityInput) + if err == nil { + jsonIdentityInput, _ := json.Marshal(dst.IdentityInput) + if string(jsonIdentityInput) == "{}" { // empty struct + dst.IdentityInput = nil + } else { + if err = validator.Validate(dst.IdentityInput); err != nil { + dst.IdentityInput = nil + } else { + match++ + } + } + } else { + dst.IdentityInput = nil + } + + // try to unmarshal data into IntrusionSetInput + err = newStrictDecoder(data).Decode(&dst.IntrusionSetInput) + if err == nil { + jsonIntrusionSetInput, _ := json.Marshal(dst.IntrusionSetInput) + if string(jsonIntrusionSetInput) == "{}" { // empty struct + dst.IntrusionSetInput = nil + } else { + if err = validator.Validate(dst.IntrusionSetInput); err != nil { + dst.IntrusionSetInput = nil + } else { + match++ + } + } + } else { + dst.IntrusionSetInput = nil + } + + // try to unmarshal data into InvestigationInput + err = newStrictDecoder(data).Decode(&dst.InvestigationInput) + if err == nil { + jsonInvestigationInput, _ := json.Marshal(dst.InvestigationInput) + if string(jsonInvestigationInput) == "{}" { // empty struct + dst.InvestigationInput = nil + } else { + if err = validator.Validate(dst.InvestigationInput); err != nil { + dst.InvestigationInput = nil + } else { + match++ + } + } + } else { + dst.InvestigationInput = nil + } + + // try to unmarshal data into MalwareInput + err = newStrictDecoder(data).Decode(&dst.MalwareInput) + if err == nil { + jsonMalwareInput, _ := json.Marshal(dst.MalwareInput) + if string(jsonMalwareInput) == "{}" { // empty struct + dst.MalwareInput = nil + } else { + if err = validator.Validate(dst.MalwareInput); err != nil { + dst.MalwareInput = nil + } else { + match++ + } + } + } else { + dst.MalwareInput = nil + } + + // try to unmarshal data into NoteInput + err = newStrictDecoder(data).Decode(&dst.NoteInput) + if err == nil { + jsonNoteInput, _ := json.Marshal(dst.NoteInput) + if string(jsonNoteInput) == "{}" { // empty struct + dst.NoteInput = nil + } else { + if err = validator.Validate(dst.NoteInput); err != nil { + dst.NoteInput = nil + } else { + match++ + } + } + } else { + dst.NoteInput = nil + } + + // try to unmarshal data into PhoneInput + err = newStrictDecoder(data).Decode(&dst.PhoneInput) + if err == nil { + jsonPhoneInput, _ := json.Marshal(dst.PhoneInput) + if string(jsonPhoneInput) == "{}" { // empty struct + dst.PhoneInput = nil + } else { + if err = validator.Validate(dst.PhoneInput); err != nil { + dst.PhoneInput = nil + } else { + match++ + } + } + } else { + dst.PhoneInput = nil + } + + // try to unmarshal data into ThreatActorInput + err = newStrictDecoder(data).Decode(&dst.ThreatActorInput) + if err == nil { + jsonThreatActorInput, _ := json.Marshal(dst.ThreatActorInput) + if string(jsonThreatActorInput) == "{}" { // empty struct + dst.ThreatActorInput = nil + } else { + if err = validator.Validate(dst.ThreatActorInput); err != nil { + dst.ThreatActorInput = nil + } else { + match++ + } + } + } else { + dst.ThreatActorInput = nil + } + + // try to unmarshal data into ToolInput + err = newStrictDecoder(data).Decode(&dst.ToolInput) + if err == nil { + jsonToolInput, _ := json.Marshal(dst.ToolInput) + if string(jsonToolInput) == "{}" { // empty struct + dst.ToolInput = nil + } else { + if err = validator.Validate(dst.ToolInput); err != nil { + dst.ToolInput = nil + } else { + match++ + } + } + } else { + dst.ToolInput = nil + } + + // try to unmarshal data into VulnerabilityInput + err = newStrictDecoder(data).Decode(&dst.VulnerabilityInput) + if err == nil { + jsonVulnerabilityInput, _ := json.Marshal(dst.VulnerabilityInput) + if string(jsonVulnerabilityInput) == "{}" { // empty struct + dst.VulnerabilityInput = nil + } else { + if err = validator.Validate(dst.VulnerabilityInput); err != nil { + dst.VulnerabilityInput = nil + } else { + match++ + } + } + } else { + dst.VulnerabilityInput = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.AttackPatternInput = nil + dst.CampaignInput = nil + dst.CompanyInput = nil + dst.CourseOfActionInput = nil + dst.IdentityInput = nil + dst.IntrusionSetInput = nil + dst.InvestigationInput = nil + dst.MalwareInput = nil + dst.NoteInput = nil + dst.PhoneInput = nil + dst.ThreatActorInput = nil + dst.ToolInput = nil + dst.VulnerabilityInput = nil + + return fmt.Errorf("data matches more than one schema in oneOf(Entity1)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(Entity1)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Entity1) MarshalJSON() ([]byte, error) { + if src.AttackPatternInput != nil { + return json.Marshal(&src.AttackPatternInput) + } + + if src.CampaignInput != nil { + return json.Marshal(&src.CampaignInput) + } + + if src.CompanyInput != nil { + return json.Marshal(&src.CompanyInput) + } + + if src.CourseOfActionInput != nil { + return json.Marshal(&src.CourseOfActionInput) + } + + if src.IdentityInput != nil { + return json.Marshal(&src.IdentityInput) + } + + if src.IntrusionSetInput != nil { + return json.Marshal(&src.IntrusionSetInput) + } + + if src.InvestigationInput != nil { + return json.Marshal(&src.InvestigationInput) + } + + if src.MalwareInput != nil { + return json.Marshal(&src.MalwareInput) + } + + if src.NoteInput != nil { + return json.Marshal(&src.NoteInput) + } + + if src.PhoneInput != nil { + return json.Marshal(&src.PhoneInput) + } + + if src.ThreatActorInput != nil { + return json.Marshal(&src.ThreatActorInput) + } + + if src.ToolInput != nil { + return json.Marshal(&src.ToolInput) + } + + if src.VulnerabilityInput != nil { + return json.Marshal(&src.VulnerabilityInput) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *Entity1) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.AttackPatternInput != nil { + return obj.AttackPatternInput + } + + if obj.CampaignInput != nil { + return obj.CampaignInput + } + + if obj.CompanyInput != nil { + return obj.CompanyInput + } + + if obj.CourseOfActionInput != nil { + return obj.CourseOfActionInput + } + + if obj.IdentityInput != nil { + return obj.IdentityInput + } + + if obj.IntrusionSetInput != nil { + return obj.IntrusionSetInput + } + + if obj.InvestigationInput != nil { + return obj.InvestigationInput + } + + if obj.MalwareInput != nil { + return obj.MalwareInput + } + + if obj.NoteInput != nil { + return obj.NoteInput + } + + if obj.PhoneInput != nil { + return obj.PhoneInput + } + + if obj.ThreatActorInput != nil { + return obj.ThreatActorInput + } + + if obj.ToolInput != nil { + return obj.ToolInput + } + + if obj.VulnerabilityInput != nil { + return obj.VulnerabilityInput + } + + // all schemas are nil + return nil +} + +type NullableEntity1 struct { + value *Entity1 + isSet bool +} + +func (v NullableEntity1) Get() *Entity1 { + return v.value +} + +func (v *NullableEntity1) Set(val *Entity1) { + v.value = val + v.isSet = true +} + +func (v NullableEntity1) IsSet() bool { + return v.isSet +} + +func (v *NullableEntity1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntity1(val *Entity1) *NullableEntity1 { + return &NullableEntity1{value: val, isSet: true} +} + +func (v NullableEntity1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntity1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entity_search_request.go b/model_entity_search_request.go new file mode 100644 index 0000000..90b34f0 --- /dev/null +++ b/model_entity_search_request.go @@ -0,0 +1,346 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the EntitySearchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EntitySearchRequest{} + +// EntitySearchRequest struct for EntitySearchRequest +type EntitySearchRequest struct { + Query map[string]QueryValue `json:"query,omitempty"` + Type *EntitySearchRequestType `json:"type,omitempty"` + Sorting [][]interface{} `json:"sorting,omitempty"` + FilterAliases [][]interface{} `json:"filter_aliases,omitempty"` + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _EntitySearchRequest EntitySearchRequest + +// NewEntitySearchRequest instantiates a new EntitySearchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEntitySearchRequest() *EntitySearchRequest { + this := EntitySearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// NewEntitySearchRequestWithDefaults instantiates a new EntitySearchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEntitySearchRequestWithDefaults() *EntitySearchRequest { + this := EntitySearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *EntitySearchRequest) GetQuery() map[string]QueryValue { + if o == nil || IsNil(o.Query) { + var ret map[string]QueryValue + return ret + } + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntitySearchRequest) GetQueryOk() (map[string]QueryValue, bool) { + if o == nil || IsNil(o.Query) { + return map[string]QueryValue{}, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *EntitySearchRequest) HasQuery() bool { + if o != nil && !IsNil(o.Query) { + return true + } + + return false +} + +// SetQuery gets a reference to the given map[string]QueryValue and assigns it to the Query field. +func (o *EntitySearchRequest) SetQuery(v map[string]QueryValue) { + o.Query = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntitySearchRequest) GetType() EntitySearchRequestType { + if o == nil || IsNil(o.Type) { + var ret EntitySearchRequestType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntitySearchRequest) GetTypeOk() (*EntitySearchRequestType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntitySearchRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given EntitySearchRequestType and assigns it to the Type field. +func (o *EntitySearchRequest) SetType(v EntitySearchRequestType) { + o.Type = &v +} + +// GetSorting returns the Sorting field value if set, zero value otherwise. +func (o *EntitySearchRequest) GetSorting() [][]interface{} { + if o == nil || IsNil(o.Sorting) { + var ret [][]interface{} + return ret + } + return o.Sorting +} + +// GetSortingOk returns a tuple with the Sorting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntitySearchRequest) GetSortingOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.Sorting) { + return nil, false + } + return o.Sorting, true +} + +// HasSorting returns a boolean if a field has been set. +func (o *EntitySearchRequest) HasSorting() bool { + if o != nil && !IsNil(o.Sorting) { + return true + } + + return false +} + +// SetSorting gets a reference to the given [][]interface{} and assigns it to the Sorting field. +func (o *EntitySearchRequest) SetSorting(v [][]interface{}) { + o.Sorting = v +} + +// GetFilterAliases returns the FilterAliases field value if set, zero value otherwise. +func (o *EntitySearchRequest) GetFilterAliases() [][]interface{} { + if o == nil || IsNil(o.FilterAliases) { + var ret [][]interface{} + return ret + } + return o.FilterAliases +} + +// GetFilterAliasesOk returns a tuple with the FilterAliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntitySearchRequest) GetFilterAliasesOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.FilterAliases) { + return nil, false + } + return o.FilterAliases, true +} + +// HasFilterAliases returns a boolean if a field has been set. +func (o *EntitySearchRequest) HasFilterAliases() bool { + if o != nil && !IsNil(o.FilterAliases) { + return true + } + + return false +} + +// SetFilterAliases gets a reference to the given [][]interface{} and assigns it to the FilterAliases field. +func (o *EntitySearchRequest) SetFilterAliases(v [][]interface{}) { + o.FilterAliases = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *EntitySearchRequest) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntitySearchRequest) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *EntitySearchRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *EntitySearchRequest) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *EntitySearchRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntitySearchRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *EntitySearchRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *EntitySearchRequest) SetPage(v int32) { + o.Page = &v +} + +func (o EntitySearchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EntitySearchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Query) { + toSerialize["query"] = o.Query + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Sorting) { + toSerialize["sorting"] = o.Sorting + } + if !IsNil(o.FilterAliases) { + toSerialize["filter_aliases"] = o.FilterAliases + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EntitySearchRequest) UnmarshalJSON(data []byte) (err error) { + varEntitySearchRequest := _EntitySearchRequest{} + + err = json.Unmarshal(data, &varEntitySearchRequest) + + if err != nil { + return err + } + + *o = EntitySearchRequest(varEntitySearchRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "query") + delete(additionalProperties, "type") + delete(additionalProperties, "sorting") + delete(additionalProperties, "filter_aliases") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEntitySearchRequest struct { + value *EntitySearchRequest + isSet bool +} + +func (v NullableEntitySearchRequest) Get() *EntitySearchRequest { + return v.value +} + +func (v *NullableEntitySearchRequest) Set(val *EntitySearchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableEntitySearchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableEntitySearchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntitySearchRequest(val *EntitySearchRequest) *NullableEntitySearchRequest { + return &NullableEntitySearchRequest{value: val, isSet: true} +} + +func (v NullableEntitySearchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntitySearchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entity_search_request_type.go b/model_entity_search_request_type.go new file mode 100644 index 0000000..75c627a --- /dev/null +++ b/model_entity_search_request_type.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// EntitySearchRequestType struct for EntitySearchRequestType +type EntitySearchRequestType struct { + EntityType *EntityType +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *EntitySearchRequestType) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into EntityType + err = json.Unmarshal(data, &dst.EntityType) + if err == nil { + jsonEntityType, _ := json.Marshal(dst.EntityType) + if string(jsonEntityType) == "{}" { // empty struct + dst.EntityType = nil + } else { + return nil // data stored in dst.EntityType, return on the first match + } + } else { + dst.EntityType = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(EntitySearchRequestType)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src EntitySearchRequestType) MarshalJSON() ([]byte, error) { + if src.EntityType != nil { + return json.Marshal(&src.EntityType) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableEntitySearchRequestType struct { + value *EntitySearchRequestType + isSet bool +} + +func (v NullableEntitySearchRequestType) Get() *EntitySearchRequestType { + return v.value +} + +func (v *NullableEntitySearchRequestType) Set(val *EntitySearchRequestType) { + v.value = val + v.isSet = true +} + +func (v NullableEntitySearchRequestType) IsSet() bool { + return v.isSet +} + +func (v *NullableEntitySearchRequestType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntitySearchRequestType(val *EntitySearchRequestType) *NullableEntitySearchRequestType { + return &NullableEntitySearchRequestType{value: val, isSet: true} +} + +func (v NullableEntitySearchRequestType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntitySearchRequestType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entity_search_response.go b/model_entity_search_response.go new file mode 100644 index 0000000..a0b0439 --- /dev/null +++ b/model_entity_search_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the EntitySearchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EntitySearchResponse{} + +// EntitySearchResponse struct for EntitySearchResponse +type EntitySearchResponse struct { + Entities []EntitiesInner `json:"entities"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _EntitySearchResponse EntitySearchResponse + +// NewEntitySearchResponse instantiates a new EntitySearchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEntitySearchResponse(entities []EntitiesInner, total int32) *EntitySearchResponse { + this := EntitySearchResponse{} + this.Entities = entities + this.Total = total + return &this +} + +// NewEntitySearchResponseWithDefaults instantiates a new EntitySearchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEntitySearchResponseWithDefaults() *EntitySearchResponse { + this := EntitySearchResponse{} + return &this +} + +// GetEntities returns the Entities field value +func (o *EntitySearchResponse) GetEntities() []EntitiesInner { + if o == nil { + var ret []EntitiesInner + return ret + } + + return o.Entities +} + +// GetEntitiesOk returns a tuple with the Entities field value +// and a boolean to check if the value has been set. +func (o *EntitySearchResponse) GetEntitiesOk() ([]EntitiesInner, bool) { + if o == nil { + return nil, false + } + return o.Entities, true +} + +// SetEntities sets field value +func (o *EntitySearchResponse) SetEntities(v []EntitiesInner) { + o.Entities = v +} + +// GetTotal returns the Total field value +func (o *EntitySearchResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *EntitySearchResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *EntitySearchResponse) SetTotal(v int32) { + o.Total = v +} + +func (o EntitySearchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EntitySearchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["entities"] = o.Entities + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EntitySearchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "entities", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEntitySearchResponse := _EntitySearchResponse{} + + err = json.Unmarshal(data, &varEntitySearchResponse) + + if err != nil { + return err + } + + *o = EntitySearchResponse(varEntitySearchResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "entities") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEntitySearchResponse struct { + value *EntitySearchResponse + isSet bool +} + +func (v NullableEntitySearchResponse) Get() *EntitySearchResponse { + return v.value +} + +func (v *NullableEntitySearchResponse) Set(val *EntitySearchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEntitySearchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEntitySearchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntitySearchResponse(val *EntitySearchResponse) *NullableEntitySearchResponse { + return &NullableEntitySearchResponse{value: val, isSet: true} +} + +func (v NullableEntitySearchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntitySearchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entity_tag_request.go b/model_entity_tag_request.go new file mode 100644 index 0000000..d6cae2e --- /dev/null +++ b/model_entity_tag_request.go @@ -0,0 +1,244 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the EntityTagRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EntityTagRequest{} + +// EntityTagRequest struct for EntityTagRequest +type EntityTagRequest struct { + Ids []string `json:"ids"` + Tags []string `json:"tags,omitempty"` + Strict *bool `json:"strict,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _EntityTagRequest EntityTagRequest + +// NewEntityTagRequest instantiates a new EntityTagRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEntityTagRequest(ids []string) *EntityTagRequest { + this := EntityTagRequest{} + this.Ids = ids + var strict bool = false + this.Strict = &strict + return &this +} + +// NewEntityTagRequestWithDefaults instantiates a new EntityTagRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEntityTagRequestWithDefaults() *EntityTagRequest { + this := EntityTagRequest{} + var strict bool = false + this.Strict = &strict + return &this +} + +// GetIds returns the Ids field value +func (o *EntityTagRequest) GetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value +// and a boolean to check if the value has been set. +func (o *EntityTagRequest) GetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Ids, true +} + +// SetIds sets field value +func (o *EntityTagRequest) SetIds(v []string) { + o.Ids = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *EntityTagRequest) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityTagRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *EntityTagRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *EntityTagRequest) SetTags(v []string) { + o.Tags = v +} + +// GetStrict returns the Strict field value if set, zero value otherwise. +func (o *EntityTagRequest) GetStrict() bool { + if o == nil || IsNil(o.Strict) { + var ret bool + return ret + } + return *o.Strict +} + +// GetStrictOk returns a tuple with the Strict field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityTagRequest) GetStrictOk() (*bool, bool) { + if o == nil || IsNil(o.Strict) { + return nil, false + } + return o.Strict, true +} + +// HasStrict returns a boolean if a field has been set. +func (o *EntityTagRequest) HasStrict() bool { + if o != nil && !IsNil(o.Strict) { + return true + } + + return false +} + +// SetStrict gets a reference to the given bool and assigns it to the Strict field. +func (o *EntityTagRequest) SetStrict(v bool) { + o.Strict = &v +} + +func (o EntityTagRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EntityTagRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ids"] = o.Ids + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Strict) { + toSerialize["strict"] = o.Strict + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EntityTagRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEntityTagRequest := _EntityTagRequest{} + + err = json.Unmarshal(data, &varEntityTagRequest) + + if err != nil { + return err + } + + *o = EntityTagRequest(varEntityTagRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "ids") + delete(additionalProperties, "tags") + delete(additionalProperties, "strict") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEntityTagRequest struct { + value *EntityTagRequest + isSet bool +} + +func (v NullableEntityTagRequest) Get() *EntityTagRequest { + return v.value +} + +func (v *NullableEntityTagRequest) Set(val *EntityTagRequest) { + v.value = val + v.isSet = true +} + +func (v NullableEntityTagRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableEntityTagRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntityTagRequest(val *EntityTagRequest) *NullableEntityTagRequest { + return &NullableEntityTagRequest{value: val, isSet: true} +} + +func (v NullableEntityTagRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntityTagRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entity_tag_response.go b/model_entity_tag_response.go new file mode 100644 index 0000000..0343efe --- /dev/null +++ b/model_entity_tag_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the EntityTagResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EntityTagResponse{} + +// EntityTagResponse struct for EntityTagResponse +type EntityTagResponse struct { + Tagged int32 `json:"tagged"` + Tags map[string]map[string]TagRelationshipOutput `json:"tags"` + AdditionalProperties map[string]interface{} +} + +type _EntityTagResponse EntityTagResponse + +// NewEntityTagResponse instantiates a new EntityTagResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEntityTagResponse(tagged int32, tags map[string]map[string]TagRelationshipOutput) *EntityTagResponse { + this := EntityTagResponse{} + this.Tagged = tagged + this.Tags = tags + return &this +} + +// NewEntityTagResponseWithDefaults instantiates a new EntityTagResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEntityTagResponseWithDefaults() *EntityTagResponse { + this := EntityTagResponse{} + return &this +} + +// GetTagged returns the Tagged field value +func (o *EntityTagResponse) GetTagged() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Tagged +} + +// GetTaggedOk returns a tuple with the Tagged field value +// and a boolean to check if the value has been set. +func (o *EntityTagResponse) GetTaggedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Tagged, true +} + +// SetTagged sets field value +func (o *EntityTagResponse) SetTagged(v int32) { + o.Tagged = v +} + +// GetTags returns the Tags field value +func (o *EntityTagResponse) GetTags() map[string]map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *EntityTagResponse) GetTagsOk() (map[string]map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *EntityTagResponse) SetTags(v map[string]map[string]TagRelationshipOutput) { + o.Tags = v +} + +func (o EntityTagResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EntityTagResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tagged"] = o.Tagged + toSerialize["tags"] = o.Tags + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EntityTagResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tagged", + "tags", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEntityTagResponse := _EntityTagResponse{} + + err = json.Unmarshal(data, &varEntityTagResponse) + + if err != nil { + return err + } + + *o = EntityTagResponse(varEntityTagResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tagged") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEntityTagResponse struct { + value *EntityTagResponse + isSet bool +} + +func (v NullableEntityTagResponse) Get() *EntityTagResponse { + return v.value +} + +func (v *NullableEntityTagResponse) Set(val *EntityTagResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEntityTagResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEntityTagResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntityTagResponse(val *EntityTagResponse) *NullableEntityTagResponse { + return &NullableEntityTagResponse{value: val, isSet: true} +} + +func (v NullableEntityTagResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntityTagResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_entity_type.go b/model_entity_type.go new file mode 100644 index 0000000..5a0e1f9 --- /dev/null +++ b/model_entity_type.go @@ -0,0 +1,136 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// EntityType the model 'EntityType' +type EntityType string + +// List of EntityType +const ( + INVESTIGATION EntityType = "investigation" + COURSE_OF_ACTION EntityType = "course-of-action" + IDENTITY EntityType = "identity" + INTRUSION_SET EntityType = "intrusion-set" + TOOL EntityType = "tool" + THREAT_ACTOR EntityType = "threat-actor" + CAMPAIGN EntityType = "campaign" + COMPANY EntityType = "company" + MALWARE EntityType = "malware" + PHONE EntityType = "phone" + NOTE EntityType = "note" + ATTACK_PATTERN EntityType = "attack-pattern" + VULNERABILITY EntityType = "vulnerability" + HONEYPOT EntityType = "honeypot" + THREAT_FINDING EntityType = "threat-finding" +) + +// All allowed values of EntityType enum +var AllowedEntityTypeEnumValues = []EntityType{ + "investigation", + "course-of-action", + "identity", + "intrusion-set", + "tool", + "threat-actor", + "campaign", + "company", + "malware", + "phone", + "note", + "attack-pattern", + "vulnerability", + "honeypot", + "threat-finding", +} + +func (v *EntityType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := EntityType(value) + for _, existing := range AllowedEntityTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid EntityType", value) +} + +// NewEntityTypeFromValue returns a pointer to a valid EntityType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewEntityTypeFromValue(v string) (*EntityType, error) { + ev := EntityType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for EntityType: valid values are %v", v, AllowedEntityTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v EntityType) IsValid() bool { + for _, existing := range AllowedEntityTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to EntityType value +func (v EntityType) Ptr() *EntityType { + return &v +} + +type NullableEntityType struct { + value *EntityType + isSet bool +} + +func (v NullableEntityType) Get() *EntityType { + return v.value +} + +func (v *NullableEntityType) Set(val *EntityType) { + v.value = val + v.isSet = true +} + +func (v NullableEntityType) IsSet() bool { + return v.isSet +} + +func (v *NullableEntityType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntityType(val *EntityType) *NullableEntityType { + return &NullableEntityType{value: val, isSet: true} +} + +func (v NullableEntityType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntityType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_error.go b/model_error.go new file mode 100644 index 0000000..619f5a0 --- /dev/null +++ b/model_error.go @@ -0,0 +1,103 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// Error struct for Error +type Error struct { + ArrayOfMapmapOfStringAny *[]map[string]interface{} + String *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *Error) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ArrayOfMapmapOfStringAny + err = json.Unmarshal(data, &dst.ArrayOfMapmapOfStringAny) + if err == nil { + jsonArrayOfMapmapOfStringAny, _ := json.Marshal(dst.ArrayOfMapmapOfStringAny) + if string(jsonArrayOfMapmapOfStringAny) == "{}" { // empty struct + dst.ArrayOfMapmapOfStringAny = nil + } else { + return nil // data stored in dst.ArrayOfMapmapOfStringAny, return on the first match + } + } else { + dst.ArrayOfMapmapOfStringAny = nil + } + + // try to unmarshal JSON data into String + err = json.Unmarshal(data, &dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + return nil // data stored in dst.String, return on the first match + } + } else { + dst.String = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(Error)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Error) MarshalJSON() ([]byte, error) { + if src.ArrayOfMapmapOfStringAny != nil { + return json.Marshal(&src.ArrayOfMapmapOfStringAny) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_export_task_input.go b/model_export_task_input.go new file mode 100644 index 0000000..490a0e5 --- /dev/null +++ b/model_export_task_input.go @@ -0,0 +1,706 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ExportTaskInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExportTaskInput{} + +// ExportTaskInput struct for ExportTaskInput +type ExportTaskInput struct { + Name string `json:"name"` + Enabled *bool `json:"enabled,omitempty"` + Description *string `json:"description,omitempty"` + Status *TaskStatus `json:"status,omitempty"` + StatusMessage *string `json:"status_message,omitempty"` + LastRun NullableTime `json:"last_run,omitempty"` + Frequency NullableString `json:"frequency,omitempty"` + Type *string `json:"type,omitempty"` + IncludeTags []string `json:"include_tags,omitempty"` + ExcludeTags []string `json:"exclude_tags,omitempty"` + IgnoreTags []string `json:"ignore_tags,omitempty"` + FreshTags *bool `json:"fresh_tags,omitempty"` + ActsOn []ObservableTypeInput `json:"acts_on,omitempty"` + TemplateName string `json:"template_name"` + Sha256 NullableString `json:"sha256,omitempty"` +} + +type _ExportTaskInput ExportTaskInput + +// NewExportTaskInput instantiates a new ExportTaskInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExportTaskInput(name string, templateName string) *ExportTaskInput { + this := ExportTaskInput{} + this.Name = name + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "export" + this.Type = &type_ + var freshTags bool = true + this.FreshTags = &freshTags + this.TemplateName = templateName + return &this +} + +// NewExportTaskInputWithDefaults instantiates a new ExportTaskInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExportTaskInputWithDefaults() *ExportTaskInput { + this := ExportTaskInput{} + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "export" + this.Type = &type_ + var freshTags bool = true + this.FreshTags = &freshTags + return &this +} + +// GetName returns the Name field value +func (o *ExportTaskInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExportTaskInput) SetName(v string) { + o.Name = v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *ExportTaskInput) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ExportTaskInput) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *ExportTaskInput) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ExportTaskInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ExportTaskInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ExportTaskInput) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExportTaskInput) GetStatus() TaskStatus { + if o == nil || IsNil(o.Status) { + var ret TaskStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetStatusOk() (*TaskStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExportTaskInput) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given TaskStatus and assigns it to the Status field. +func (o *ExportTaskInput) SetStatus(v TaskStatus) { + o.Status = &v +} + +// GetStatusMessage returns the StatusMessage field value if set, zero value otherwise. +func (o *ExportTaskInput) GetStatusMessage() string { + if o == nil || IsNil(o.StatusMessage) { + var ret string + return ret + } + return *o.StatusMessage +} + +// GetStatusMessageOk returns a tuple with the StatusMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetStatusMessageOk() (*string, bool) { + if o == nil || IsNil(o.StatusMessage) { + return nil, false + } + return o.StatusMessage, true +} + +// HasStatusMessage returns a boolean if a field has been set. +func (o *ExportTaskInput) HasStatusMessage() bool { + if o != nil && !IsNil(o.StatusMessage) { + return true + } + + return false +} + +// SetStatusMessage gets a reference to the given string and assigns it to the StatusMessage field. +func (o *ExportTaskInput) SetStatusMessage(v string) { + o.StatusMessage = &v +} + +// GetLastRun returns the LastRun field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportTaskInput) GetLastRun() time.Time { + if o == nil || IsNil(o.LastRun.Get()) { + var ret time.Time + return ret + } + return *o.LastRun.Get() +} + +// GetLastRunOk returns a tuple with the LastRun field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportTaskInput) GetLastRunOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRun.Get(), o.LastRun.IsSet() +} + +// HasLastRun returns a boolean if a field has been set. +func (o *ExportTaskInput) HasLastRun() bool { + if o != nil && o.LastRun.IsSet() { + return true + } + + return false +} + +// SetLastRun gets a reference to the given NullableTime and assigns it to the LastRun field. +func (o *ExportTaskInput) SetLastRun(v time.Time) { + o.LastRun.Set(&v) +} + +// SetLastRunNil sets the value for LastRun to be an explicit nil +func (o *ExportTaskInput) SetLastRunNil() { + o.LastRun.Set(nil) +} + +// UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +func (o *ExportTaskInput) UnsetLastRun() { + o.LastRun.Unset() +} + +// GetFrequency returns the Frequency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportTaskInput) GetFrequency() string { + if o == nil || IsNil(o.Frequency.Get()) { + var ret string + return ret + } + return *o.Frequency.Get() +} + +// GetFrequencyOk returns a tuple with the Frequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportTaskInput) GetFrequencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Frequency.Get(), o.Frequency.IsSet() +} + +// HasFrequency returns a boolean if a field has been set. +func (o *ExportTaskInput) HasFrequency() bool { + if o != nil && o.Frequency.IsSet() { + return true + } + + return false +} + +// SetFrequency gets a reference to the given NullableString and assigns it to the Frequency field. +func (o *ExportTaskInput) SetFrequency(v string) { + o.Frequency.Set(&v) +} + +// SetFrequencyNil sets the value for Frequency to be an explicit nil +func (o *ExportTaskInput) SetFrequencyNil() { + o.Frequency.Set(nil) +} + +// UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +func (o *ExportTaskInput) UnsetFrequency() { + o.Frequency.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ExportTaskInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ExportTaskInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ExportTaskInput) SetType(v string) { + o.Type = &v +} + +// GetIncludeTags returns the IncludeTags field value if set, zero value otherwise. +func (o *ExportTaskInput) GetIncludeTags() []string { + if o == nil || IsNil(o.IncludeTags) { + var ret []string + return ret + } + return o.IncludeTags +} + +// GetIncludeTagsOk returns a tuple with the IncludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetIncludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludeTags) { + return nil, false + } + return o.IncludeTags, true +} + +// HasIncludeTags returns a boolean if a field has been set. +func (o *ExportTaskInput) HasIncludeTags() bool { + if o != nil && !IsNil(o.IncludeTags) { + return true + } + + return false +} + +// SetIncludeTags gets a reference to the given []string and assigns it to the IncludeTags field. +func (o *ExportTaskInput) SetIncludeTags(v []string) { + o.IncludeTags = v +} + +// GetExcludeTags returns the ExcludeTags field value if set, zero value otherwise. +func (o *ExportTaskInput) GetExcludeTags() []string { + if o == nil || IsNil(o.ExcludeTags) { + var ret []string + return ret + } + return o.ExcludeTags +} + +// GetExcludeTagsOk returns a tuple with the ExcludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetExcludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeTags) { + return nil, false + } + return o.ExcludeTags, true +} + +// HasExcludeTags returns a boolean if a field has been set. +func (o *ExportTaskInput) HasExcludeTags() bool { + if o != nil && !IsNil(o.ExcludeTags) { + return true + } + + return false +} + +// SetExcludeTags gets a reference to the given []string and assigns it to the ExcludeTags field. +func (o *ExportTaskInput) SetExcludeTags(v []string) { + o.ExcludeTags = v +} + +// GetIgnoreTags returns the IgnoreTags field value if set, zero value otherwise. +func (o *ExportTaskInput) GetIgnoreTags() []string { + if o == nil || IsNil(o.IgnoreTags) { + var ret []string + return ret + } + return o.IgnoreTags +} + +// GetIgnoreTagsOk returns a tuple with the IgnoreTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetIgnoreTagsOk() ([]string, bool) { + if o == nil || IsNil(o.IgnoreTags) { + return nil, false + } + return o.IgnoreTags, true +} + +// HasIgnoreTags returns a boolean if a field has been set. +func (o *ExportTaskInput) HasIgnoreTags() bool { + if o != nil && !IsNil(o.IgnoreTags) { + return true + } + + return false +} + +// SetIgnoreTags gets a reference to the given []string and assigns it to the IgnoreTags field. +func (o *ExportTaskInput) SetIgnoreTags(v []string) { + o.IgnoreTags = v +} + +// GetFreshTags returns the FreshTags field value if set, zero value otherwise. +func (o *ExportTaskInput) GetFreshTags() bool { + if o == nil || IsNil(o.FreshTags) { + var ret bool + return ret + } + return *o.FreshTags +} + +// GetFreshTagsOk returns a tuple with the FreshTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetFreshTagsOk() (*bool, bool) { + if o == nil || IsNil(o.FreshTags) { + return nil, false + } + return o.FreshTags, true +} + +// HasFreshTags returns a boolean if a field has been set. +func (o *ExportTaskInput) HasFreshTags() bool { + if o != nil && !IsNil(o.FreshTags) { + return true + } + + return false +} + +// SetFreshTags gets a reference to the given bool and assigns it to the FreshTags field. +func (o *ExportTaskInput) SetFreshTags(v bool) { + o.FreshTags = &v +} + +// GetActsOn returns the ActsOn field value if set, zero value otherwise. +func (o *ExportTaskInput) GetActsOn() []ObservableTypeInput { + if o == nil || IsNil(o.ActsOn) { + var ret []ObservableTypeInput + return ret + } + return o.ActsOn +} + +// GetActsOnOk returns a tuple with the ActsOn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetActsOnOk() ([]ObservableTypeInput, bool) { + if o == nil || IsNil(o.ActsOn) { + return nil, false + } + return o.ActsOn, true +} + +// HasActsOn returns a boolean if a field has been set. +func (o *ExportTaskInput) HasActsOn() bool { + if o != nil && !IsNil(o.ActsOn) { + return true + } + + return false +} + +// SetActsOn gets a reference to the given []ObservableTypeInput and assigns it to the ActsOn field. +func (o *ExportTaskInput) SetActsOn(v []ObservableTypeInput) { + o.ActsOn = v +} + +// GetTemplateName returns the TemplateName field value +func (o *ExportTaskInput) GetTemplateName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateName +} + +// GetTemplateNameOk returns a tuple with the TemplateName field value +// and a boolean to check if the value has been set. +func (o *ExportTaskInput) GetTemplateNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateName, true +} + +// SetTemplateName sets field value +func (o *ExportTaskInput) SetTemplateName(v string) { + o.TemplateName = v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportTaskInput) GetSha256() string { + if o == nil || IsNil(o.Sha256.Get()) { + var ret string + return ret + } + return *o.Sha256.Get() +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportTaskInput) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha256.Get(), o.Sha256.IsSet() +} + +// HasSha256 returns a boolean if a field has been set. +func (o *ExportTaskInput) HasSha256() bool { + if o != nil && o.Sha256.IsSet() { + return true + } + + return false +} + +// SetSha256 gets a reference to the given NullableString and assigns it to the Sha256 field. +func (o *ExportTaskInput) SetSha256(v string) { + o.Sha256.Set(&v) +} + +// SetSha256Nil sets the value for Sha256 to be an explicit nil +func (o *ExportTaskInput) SetSha256Nil() { + o.Sha256.Set(nil) +} + +// UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +func (o *ExportTaskInput) UnsetSha256() { + o.Sha256.Unset() +} + +func (o ExportTaskInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExportTaskInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusMessage) { + toSerialize["status_message"] = o.StatusMessage + } + if o.LastRun.IsSet() { + toSerialize["last_run"] = o.LastRun.Get() + } + if o.Frequency.IsSet() { + toSerialize["frequency"] = o.Frequency.Get() + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.IncludeTags) { + toSerialize["include_tags"] = o.IncludeTags + } + if !IsNil(o.ExcludeTags) { + toSerialize["exclude_tags"] = o.ExcludeTags + } + if !IsNil(o.IgnoreTags) { + toSerialize["ignore_tags"] = o.IgnoreTags + } + if !IsNil(o.FreshTags) { + toSerialize["fresh_tags"] = o.FreshTags + } + if !IsNil(o.ActsOn) { + toSerialize["acts_on"] = o.ActsOn + } + toSerialize["template_name"] = o.TemplateName + if o.Sha256.IsSet() { + toSerialize["sha256"] = o.Sha256.Get() + } + return toSerialize, nil +} + +func (o *ExportTaskInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "template_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExportTaskInput := _ExportTaskInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExportTaskInput) + + if err != nil { + return err + } + + *o = ExportTaskInput(varExportTaskInput) + + return err +} + +type NullableExportTaskInput struct { + value *ExportTaskInput + isSet bool +} + +func (v NullableExportTaskInput) Get() *ExportTaskInput { + return v.value +} + +func (v *NullableExportTaskInput) Set(val *ExportTaskInput) { + v.value = val + v.isSet = true +} + +func (v NullableExportTaskInput) IsSet() bool { + return v.isSet +} + +func (v *NullableExportTaskInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExportTaskInput(val *ExportTaskInput) *NullableExportTaskInput { + return &NullableExportTaskInput{value: val, isSet: true} +} + +func (v NullableExportTaskInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExportTaskInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_export_task_output.go b/model_export_task_output.go new file mode 100644 index 0000000..d1a88aa --- /dev/null +++ b/model_export_task_output.go @@ -0,0 +1,734 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ExportTaskOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExportTaskOutput{} + +// ExportTaskOutput struct for ExportTaskOutput +type ExportTaskOutput struct { + Name string `json:"name"` + Enabled *bool `json:"enabled,omitempty"` + Description *string `json:"description,omitempty"` + Status *TaskStatus `json:"status,omitempty"` + StatusMessage *string `json:"status_message,omitempty"` + LastRun NullableTime `json:"last_run,omitempty"` + Frequency NullableString `json:"frequency,omitempty"` + Type *string `json:"type,omitempty"` + IncludeTags []string `json:"include_tags,omitempty"` + ExcludeTags []string `json:"exclude_tags,omitempty"` + IgnoreTags []string `json:"ignore_tags,omitempty"` + FreshTags *bool `json:"fresh_tags,omitempty"` + ActsOn []string `json:"acts_on,omitempty"` + TemplateName string `json:"template_name"` + Sha256 NullableString `json:"sha256,omitempty"` + Id string `json:"id"` +} + +type _ExportTaskOutput ExportTaskOutput + +// NewExportTaskOutput instantiates a new ExportTaskOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExportTaskOutput(name string, templateName string, id string) *ExportTaskOutput { + this := ExportTaskOutput{} + this.Name = name + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "export" + this.Type = &type_ + var freshTags bool = true + this.FreshTags = &freshTags + this.TemplateName = templateName + this.Id = id + return &this +} + +// NewExportTaskOutputWithDefaults instantiates a new ExportTaskOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExportTaskOutputWithDefaults() *ExportTaskOutput { + this := ExportTaskOutput{} + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "export" + this.Type = &type_ + var freshTags bool = true + this.FreshTags = &freshTags + return &this +} + +// GetName returns the Name field value +func (o *ExportTaskOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExportTaskOutput) SetName(v string) { + o.Name = v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *ExportTaskOutput) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ExportTaskOutput) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetStatus() TaskStatus { + if o == nil || IsNil(o.Status) { + var ret TaskStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetStatusOk() (*TaskStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given TaskStatus and assigns it to the Status field. +func (o *ExportTaskOutput) SetStatus(v TaskStatus) { + o.Status = &v +} + +// GetStatusMessage returns the StatusMessage field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetStatusMessage() string { + if o == nil || IsNil(o.StatusMessage) { + var ret string + return ret + } + return *o.StatusMessage +} + +// GetStatusMessageOk returns a tuple with the StatusMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetStatusMessageOk() (*string, bool) { + if o == nil || IsNil(o.StatusMessage) { + return nil, false + } + return o.StatusMessage, true +} + +// HasStatusMessage returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasStatusMessage() bool { + if o != nil && !IsNil(o.StatusMessage) { + return true + } + + return false +} + +// SetStatusMessage gets a reference to the given string and assigns it to the StatusMessage field. +func (o *ExportTaskOutput) SetStatusMessage(v string) { + o.StatusMessage = &v +} + +// GetLastRun returns the LastRun field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportTaskOutput) GetLastRun() time.Time { + if o == nil || IsNil(o.LastRun.Get()) { + var ret time.Time + return ret + } + return *o.LastRun.Get() +} + +// GetLastRunOk returns a tuple with the LastRun field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportTaskOutput) GetLastRunOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRun.Get(), o.LastRun.IsSet() +} + +// HasLastRun returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasLastRun() bool { + if o != nil && o.LastRun.IsSet() { + return true + } + + return false +} + +// SetLastRun gets a reference to the given NullableTime and assigns it to the LastRun field. +func (o *ExportTaskOutput) SetLastRun(v time.Time) { + o.LastRun.Set(&v) +} + +// SetLastRunNil sets the value for LastRun to be an explicit nil +func (o *ExportTaskOutput) SetLastRunNil() { + o.LastRun.Set(nil) +} + +// UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +func (o *ExportTaskOutput) UnsetLastRun() { + o.LastRun.Unset() +} + +// GetFrequency returns the Frequency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportTaskOutput) GetFrequency() string { + if o == nil || IsNil(o.Frequency.Get()) { + var ret string + return ret + } + return *o.Frequency.Get() +} + +// GetFrequencyOk returns a tuple with the Frequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportTaskOutput) GetFrequencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Frequency.Get(), o.Frequency.IsSet() +} + +// HasFrequency returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasFrequency() bool { + if o != nil && o.Frequency.IsSet() { + return true + } + + return false +} + +// SetFrequency gets a reference to the given NullableString and assigns it to the Frequency field. +func (o *ExportTaskOutput) SetFrequency(v string) { + o.Frequency.Set(&v) +} + +// SetFrequencyNil sets the value for Frequency to be an explicit nil +func (o *ExportTaskOutput) SetFrequencyNil() { + o.Frequency.Set(nil) +} + +// UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +func (o *ExportTaskOutput) UnsetFrequency() { + o.Frequency.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ExportTaskOutput) SetType(v string) { + o.Type = &v +} + +// GetIncludeTags returns the IncludeTags field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetIncludeTags() []string { + if o == nil || IsNil(o.IncludeTags) { + var ret []string + return ret + } + return o.IncludeTags +} + +// GetIncludeTagsOk returns a tuple with the IncludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetIncludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludeTags) { + return nil, false + } + return o.IncludeTags, true +} + +// HasIncludeTags returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasIncludeTags() bool { + if o != nil && !IsNil(o.IncludeTags) { + return true + } + + return false +} + +// SetIncludeTags gets a reference to the given []string and assigns it to the IncludeTags field. +func (o *ExportTaskOutput) SetIncludeTags(v []string) { + o.IncludeTags = v +} + +// GetExcludeTags returns the ExcludeTags field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetExcludeTags() []string { + if o == nil || IsNil(o.ExcludeTags) { + var ret []string + return ret + } + return o.ExcludeTags +} + +// GetExcludeTagsOk returns a tuple with the ExcludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetExcludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeTags) { + return nil, false + } + return o.ExcludeTags, true +} + +// HasExcludeTags returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasExcludeTags() bool { + if o != nil && !IsNil(o.ExcludeTags) { + return true + } + + return false +} + +// SetExcludeTags gets a reference to the given []string and assigns it to the ExcludeTags field. +func (o *ExportTaskOutput) SetExcludeTags(v []string) { + o.ExcludeTags = v +} + +// GetIgnoreTags returns the IgnoreTags field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetIgnoreTags() []string { + if o == nil || IsNil(o.IgnoreTags) { + var ret []string + return ret + } + return o.IgnoreTags +} + +// GetIgnoreTagsOk returns a tuple with the IgnoreTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetIgnoreTagsOk() ([]string, bool) { + if o == nil || IsNil(o.IgnoreTags) { + return nil, false + } + return o.IgnoreTags, true +} + +// HasIgnoreTags returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasIgnoreTags() bool { + if o != nil && !IsNil(o.IgnoreTags) { + return true + } + + return false +} + +// SetIgnoreTags gets a reference to the given []string and assigns it to the IgnoreTags field. +func (o *ExportTaskOutput) SetIgnoreTags(v []string) { + o.IgnoreTags = v +} + +// GetFreshTags returns the FreshTags field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetFreshTags() bool { + if o == nil || IsNil(o.FreshTags) { + var ret bool + return ret + } + return *o.FreshTags +} + +// GetFreshTagsOk returns a tuple with the FreshTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetFreshTagsOk() (*bool, bool) { + if o == nil || IsNil(o.FreshTags) { + return nil, false + } + return o.FreshTags, true +} + +// HasFreshTags returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasFreshTags() bool { + if o != nil && !IsNil(o.FreshTags) { + return true + } + + return false +} + +// SetFreshTags gets a reference to the given bool and assigns it to the FreshTags field. +func (o *ExportTaskOutput) SetFreshTags(v bool) { + o.FreshTags = &v +} + +// GetActsOn returns the ActsOn field value if set, zero value otherwise. +func (o *ExportTaskOutput) GetActsOn() []string { + if o == nil || IsNil(o.ActsOn) { + var ret []string + return ret + } + return o.ActsOn +} + +// GetActsOnOk returns a tuple with the ActsOn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetActsOnOk() ([]string, bool) { + if o == nil || IsNil(o.ActsOn) { + return nil, false + } + return o.ActsOn, true +} + +// HasActsOn returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasActsOn() bool { + if o != nil && !IsNil(o.ActsOn) { + return true + } + + return false +} + +// SetActsOn gets a reference to the given []string and assigns it to the ActsOn field. +func (o *ExportTaskOutput) SetActsOn(v []string) { + o.ActsOn = v +} + +// GetTemplateName returns the TemplateName field value +func (o *ExportTaskOutput) GetTemplateName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateName +} + +// GetTemplateNameOk returns a tuple with the TemplateName field value +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetTemplateNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateName, true +} + +// SetTemplateName sets field value +func (o *ExportTaskOutput) SetTemplateName(v string) { + o.TemplateName = v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExportTaskOutput) GetSha256() string { + if o == nil || IsNil(o.Sha256.Get()) { + var ret string + return ret + } + return *o.Sha256.Get() +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportTaskOutput) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha256.Get(), o.Sha256.IsSet() +} + +// HasSha256 returns a boolean if a field has been set. +func (o *ExportTaskOutput) HasSha256() bool { + if o != nil && o.Sha256.IsSet() { + return true + } + + return false +} + +// SetSha256 gets a reference to the given NullableString and assigns it to the Sha256 field. +func (o *ExportTaskOutput) SetSha256(v string) { + o.Sha256.Set(&v) +} + +// SetSha256Nil sets the value for Sha256 to be an explicit nil +func (o *ExportTaskOutput) SetSha256Nil() { + o.Sha256.Set(nil) +} + +// UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +func (o *ExportTaskOutput) UnsetSha256() { + o.Sha256.Unset() +} + +// GetId returns the Id field value +func (o *ExportTaskOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ExportTaskOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ExportTaskOutput) SetId(v string) { + o.Id = v +} + +func (o ExportTaskOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExportTaskOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusMessage) { + toSerialize["status_message"] = o.StatusMessage + } + if o.LastRun.IsSet() { + toSerialize["last_run"] = o.LastRun.Get() + } + if o.Frequency.IsSet() { + toSerialize["frequency"] = o.Frequency.Get() + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.IncludeTags) { + toSerialize["include_tags"] = o.IncludeTags + } + if !IsNil(o.ExcludeTags) { + toSerialize["exclude_tags"] = o.ExcludeTags + } + if !IsNil(o.IgnoreTags) { + toSerialize["ignore_tags"] = o.IgnoreTags + } + if !IsNil(o.FreshTags) { + toSerialize["fresh_tags"] = o.FreshTags + } + if !IsNil(o.ActsOn) { + toSerialize["acts_on"] = o.ActsOn + } + toSerialize["template_name"] = o.TemplateName + if o.Sha256.IsSet() { + toSerialize["sha256"] = o.Sha256.Get() + } + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *ExportTaskOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "template_name", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExportTaskOutput := _ExportTaskOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExportTaskOutput) + + if err != nil { + return err + } + + *o = ExportTaskOutput(varExportTaskOutput) + + return err +} + +type NullableExportTaskOutput struct { + value *ExportTaskOutput + isSet bool +} + +func (v NullableExportTaskOutput) Get() *ExportTaskOutput { + return v.value +} + +func (v *NullableExportTaskOutput) Set(val *ExportTaskOutput) { + v.value = val + v.isSet = true +} + +func (v NullableExportTaskOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableExportTaskOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExportTaskOutput(val *ExportTaskOutput) *NullableExportTaskOutput { + return &NullableExportTaskOutput{value: val, isSet: true} +} + +func (v NullableExportTaskOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExportTaskOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_feed_task.go b/model_feed_task.go new file mode 100644 index 0000000..8984e0c --- /dev/null +++ b/model_feed_task.go @@ -0,0 +1,475 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the FeedTask type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedTask{} + +// FeedTask struct for FeedTask +type FeedTask struct { + Name string `json:"name"` + Enabled *bool `json:"enabled,omitempty"` + Description *string `json:"description,omitempty"` + Status *TaskStatus `json:"status,omitempty"` + StatusMessage *string `json:"status_message,omitempty"` + LastRun NullableTime `json:"last_run,omitempty"` + Frequency NullableString `json:"frequency,omitempty"` + Type *string `json:"type,omitempty"` + Id string `json:"id"` +} + +type _FeedTask FeedTask + +// NewFeedTask instantiates a new FeedTask object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedTask(name string, id string) *FeedTask { + this := FeedTask{} + this.Name = name + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "feed" + this.Type = &type_ + this.Id = id + return &this +} + +// NewFeedTaskWithDefaults instantiates a new FeedTask object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedTaskWithDefaults() *FeedTask { + this := FeedTask{} + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "feed" + this.Type = &type_ + return &this +} + +// GetName returns the Name field value +func (o *FeedTask) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FeedTask) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FeedTask) SetName(v string) { + o.Name = v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *FeedTask) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedTask) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *FeedTask) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *FeedTask) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *FeedTask) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedTask) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *FeedTask) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *FeedTask) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FeedTask) GetStatus() TaskStatus { + if o == nil || IsNil(o.Status) { + var ret TaskStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedTask) GetStatusOk() (*TaskStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FeedTask) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given TaskStatus and assigns it to the Status field. +func (o *FeedTask) SetStatus(v TaskStatus) { + o.Status = &v +} + +// GetStatusMessage returns the StatusMessage field value if set, zero value otherwise. +func (o *FeedTask) GetStatusMessage() string { + if o == nil || IsNil(o.StatusMessage) { + var ret string + return ret + } + return *o.StatusMessage +} + +// GetStatusMessageOk returns a tuple with the StatusMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedTask) GetStatusMessageOk() (*string, bool) { + if o == nil || IsNil(o.StatusMessage) { + return nil, false + } + return o.StatusMessage, true +} + +// HasStatusMessage returns a boolean if a field has been set. +func (o *FeedTask) HasStatusMessage() bool { + if o != nil && !IsNil(o.StatusMessage) { + return true + } + + return false +} + +// SetStatusMessage gets a reference to the given string and assigns it to the StatusMessage field. +func (o *FeedTask) SetStatusMessage(v string) { + o.StatusMessage = &v +} + +// GetLastRun returns the LastRun field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeedTask) GetLastRun() time.Time { + if o == nil || IsNil(o.LastRun.Get()) { + var ret time.Time + return ret + } + return *o.LastRun.Get() +} + +// GetLastRunOk returns a tuple with the LastRun field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedTask) GetLastRunOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRun.Get(), o.LastRun.IsSet() +} + +// HasLastRun returns a boolean if a field has been set. +func (o *FeedTask) HasLastRun() bool { + if o != nil && o.LastRun.IsSet() { + return true + } + + return false +} + +// SetLastRun gets a reference to the given NullableTime and assigns it to the LastRun field. +func (o *FeedTask) SetLastRun(v time.Time) { + o.LastRun.Set(&v) +} + +// SetLastRunNil sets the value for LastRun to be an explicit nil +func (o *FeedTask) SetLastRunNil() { + o.LastRun.Set(nil) +} + +// UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +func (o *FeedTask) UnsetLastRun() { + o.LastRun.Unset() +} + +// GetFrequency returns the Frequency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeedTask) GetFrequency() string { + if o == nil || IsNil(o.Frequency.Get()) { + var ret string + return ret + } + return *o.Frequency.Get() +} + +// GetFrequencyOk returns a tuple with the Frequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedTask) GetFrequencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Frequency.Get(), o.Frequency.IsSet() +} + +// HasFrequency returns a boolean if a field has been set. +func (o *FeedTask) HasFrequency() bool { + if o != nil && o.Frequency.IsSet() { + return true + } + + return false +} + +// SetFrequency gets a reference to the given NullableString and assigns it to the Frequency field. +func (o *FeedTask) SetFrequency(v string) { + o.Frequency.Set(&v) +} + +// SetFrequencyNil sets the value for Frequency to be an explicit nil +func (o *FeedTask) SetFrequencyNil() { + o.Frequency.Set(nil) +} + +// UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +func (o *FeedTask) UnsetFrequency() { + o.Frequency.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *FeedTask) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedTask) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *FeedTask) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *FeedTask) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value +func (o *FeedTask) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *FeedTask) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *FeedTask) SetId(v string) { + o.Id = v +} + +func (o FeedTask) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedTask) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusMessage) { + toSerialize["status_message"] = o.StatusMessage + } + if o.LastRun.IsSet() { + toSerialize["last_run"] = o.LastRun.Get() + } + if o.Frequency.IsSet() { + toSerialize["frequency"] = o.Frequency.Get() + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *FeedTask) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedTask := _FeedTask{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedTask) + + if err != nil { + return err + } + + *o = FeedTask(varFeedTask) + + return err +} + +type NullableFeedTask struct { + value *FeedTask + isSet bool +} + +func (v NullableFeedTask) Get() *FeedTask { + return v.value +} + +func (v *NullableFeedTask) Set(val *FeedTask) { + v.value = val + v.isSet = true +} + +func (v NullableFeedTask) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedTask) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedTask(val *FeedTask) *NullableFeedTask { + return &NullableFeedTask{value: val, isSet: true} +} + +func (v NullableFeedTask) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedTask) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_file_input.go b/model_file_input.go new file mode 100644 index 0000000..8c777b7 --- /dev/null +++ b/model_file_input.go @@ -0,0 +1,587 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the FileInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileInput{} + +// FileInput Represents a file. One of sha256, md5, or sha1 should be provided. Value should to be in the form FILE:. +type FileInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Name NullableString `json:"name,omitempty"` + Size NullableInt32 `json:"size,omitempty"` + Sha256 NullableString `json:"sha256,omitempty"` + Md5 NullableString `json:"md5,omitempty"` + Sha1 NullableString `json:"sha1,omitempty"` + MimeType NullableString `json:"mime_type,omitempty"` +} + +type _FileInput FileInput + +// NewFileInput instantiates a new FileInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileInput(value string) *FileInput { + this := FileInput{} + this.Value = value + var type_ string = "file" + this.Type = &type_ + return &this +} + +// NewFileInputWithDefaults instantiates a new FileInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileInputWithDefaults() *FileInput { + this := FileInput{} + var type_ string = "file" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *FileInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *FileInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *FileInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *FileInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *FileInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *FileInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *FileInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *FileInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *FileInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *FileInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *FileInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *FileInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *FileInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *FileInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *FileInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileInput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *FileInput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *FileInput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *FileInput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *FileInput) UnsetName() { + o.Name.Unset() +} + +// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileInput) GetSize() int32 { + if o == nil || IsNil(o.Size.Get()) { + var ret int32 + return ret + } + return *o.Size.Get() +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileInput) GetSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Size.Get(), o.Size.IsSet() +} + +// HasSize returns a boolean if a field has been set. +func (o *FileInput) HasSize() bool { + if o != nil && o.Size.IsSet() { + return true + } + + return false +} + +// SetSize gets a reference to the given NullableInt32 and assigns it to the Size field. +func (o *FileInput) SetSize(v int32) { + o.Size.Set(&v) +} + +// SetSizeNil sets the value for Size to be an explicit nil +func (o *FileInput) SetSizeNil() { + o.Size.Set(nil) +} + +// UnsetSize ensures that no value is present for Size, not even an explicit nil +func (o *FileInput) UnsetSize() { + o.Size.Unset() +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileInput) GetSha256() string { + if o == nil || IsNil(o.Sha256.Get()) { + var ret string + return ret + } + return *o.Sha256.Get() +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileInput) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha256.Get(), o.Sha256.IsSet() +} + +// HasSha256 returns a boolean if a field has been set. +func (o *FileInput) HasSha256() bool { + if o != nil && o.Sha256.IsSet() { + return true + } + + return false +} + +// SetSha256 gets a reference to the given NullableString and assigns it to the Sha256 field. +func (o *FileInput) SetSha256(v string) { + o.Sha256.Set(&v) +} + +// SetSha256Nil sets the value for Sha256 to be an explicit nil +func (o *FileInput) SetSha256Nil() { + o.Sha256.Set(nil) +} + +// UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +func (o *FileInput) UnsetSha256() { + o.Sha256.Unset() +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileInput) GetMd5() string { + if o == nil || IsNil(o.Md5.Get()) { + var ret string + return ret + } + return *o.Md5.Get() +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileInput) GetMd5Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Md5.Get(), o.Md5.IsSet() +} + +// HasMd5 returns a boolean if a field has been set. +func (o *FileInput) HasMd5() bool { + if o != nil && o.Md5.IsSet() { + return true + } + + return false +} + +// SetMd5 gets a reference to the given NullableString and assigns it to the Md5 field. +func (o *FileInput) SetMd5(v string) { + o.Md5.Set(&v) +} + +// SetMd5Nil sets the value for Md5 to be an explicit nil +func (o *FileInput) SetMd5Nil() { + o.Md5.Set(nil) +} + +// UnsetMd5 ensures that no value is present for Md5, not even an explicit nil +func (o *FileInput) UnsetMd5() { + o.Md5.Unset() +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileInput) GetSha1() string { + if o == nil || IsNil(o.Sha1.Get()) { + var ret string + return ret + } + return *o.Sha1.Get() +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileInput) GetSha1Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha1.Get(), o.Sha1.IsSet() +} + +// HasSha1 returns a boolean if a field has been set. +func (o *FileInput) HasSha1() bool { + if o != nil && o.Sha1.IsSet() { + return true + } + + return false +} + +// SetSha1 gets a reference to the given NullableString and assigns it to the Sha1 field. +func (o *FileInput) SetSha1(v string) { + o.Sha1.Set(&v) +} + +// SetSha1Nil sets the value for Sha1 to be an explicit nil +func (o *FileInput) SetSha1Nil() { + o.Sha1.Set(nil) +} + +// UnsetSha1 ensures that no value is present for Sha1, not even an explicit nil +func (o *FileInput) UnsetSha1() { + o.Sha1.Unset() +} + +// GetMimeType returns the MimeType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileInput) GetMimeType() string { + if o == nil || IsNil(o.MimeType.Get()) { + var ret string + return ret + } + return *o.MimeType.Get() +} + +// GetMimeTypeOk returns a tuple with the MimeType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileInput) GetMimeTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MimeType.Get(), o.MimeType.IsSet() +} + +// HasMimeType returns a boolean if a field has been set. +func (o *FileInput) HasMimeType() bool { + if o != nil && o.MimeType.IsSet() { + return true + } + + return false +} + +// SetMimeType gets a reference to the given NullableString and assigns it to the MimeType field. +func (o *FileInput) SetMimeType(v string) { + o.MimeType.Set(&v) +} + +// SetMimeTypeNil sets the value for MimeType to be an explicit nil +func (o *FileInput) SetMimeTypeNil() { + o.MimeType.Set(nil) +} + +// UnsetMimeType ensures that no value is present for MimeType, not even an explicit nil +func (o *FileInput) UnsetMimeType() { + o.MimeType.Unset() +} + +func (o FileInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Size.IsSet() { + toSerialize["size"] = o.Size.Get() + } + if o.Sha256.IsSet() { + toSerialize["sha256"] = o.Sha256.Get() + } + if o.Md5.IsSet() { + toSerialize["md5"] = o.Md5.Get() + } + if o.Sha1.IsSet() { + toSerialize["sha1"] = o.Sha1.Get() + } + if o.MimeType.IsSet() { + toSerialize["mime_type"] = o.MimeType.Get() + } + return toSerialize, nil +} + +func (o *FileInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFileInput := _FileInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFileInput) + + if err != nil { + return err + } + + *o = FileInput(varFileInput) + + return err +} + +type NullableFileInput struct { + value *FileInput + isSet bool +} + +func (v NullableFileInput) Get() *FileInput { + return v.value +} + +func (v *NullableFileInput) Set(val *FileInput) { + v.value = val + v.isSet = true +} + +func (v NullableFileInput) IsSet() bool { + return v.isSet +} + +func (v *NullableFileInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileInput(val *FileInput) *NullableFileInput { + return &NullableFileInput{value: val, isSet: true} +} + +func (v NullableFileInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_file_output.go b/model_file_output.go new file mode 100644 index 0000000..b38fc25 --- /dev/null +++ b/model_file_output.go @@ -0,0 +1,671 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the FileOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileOutput{} + +// FileOutput Represents a file. One of sha256, md5, or sha1 should be provided. Value should to be in the form FILE:. +type FileOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Name NullableString `json:"name,omitempty"` + Size NullableInt32 `json:"size,omitempty"` + Sha256 NullableString `json:"sha256,omitempty"` + Md5 NullableString `json:"md5,omitempty"` + Sha1 NullableString `json:"sha1,omitempty"` + MimeType NullableString `json:"mime_type,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _FileOutput FileOutput + +// NewFileOutput instantiates a new FileOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *FileOutput { + this := FileOutput{} + this.Value = value + var type_ string = "file" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewFileOutputWithDefaults instantiates a new FileOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileOutputWithDefaults() *FileOutput { + this := FileOutput{} + var type_ string = "file" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *FileOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *FileOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *FileOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *FileOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *FileOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *FileOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *FileOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *FileOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *FileOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *FileOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *FileOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *FileOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *FileOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *FileOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *FileOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileOutput) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *FileOutput) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *FileOutput) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *FileOutput) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *FileOutput) UnsetName() { + o.Name.Unset() +} + +// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileOutput) GetSize() int32 { + if o == nil || IsNil(o.Size.Get()) { + var ret int32 + return ret + } + return *o.Size.Get() +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileOutput) GetSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Size.Get(), o.Size.IsSet() +} + +// HasSize returns a boolean if a field has been set. +func (o *FileOutput) HasSize() bool { + if o != nil && o.Size.IsSet() { + return true + } + + return false +} + +// SetSize gets a reference to the given NullableInt32 and assigns it to the Size field. +func (o *FileOutput) SetSize(v int32) { + o.Size.Set(&v) +} + +// SetSizeNil sets the value for Size to be an explicit nil +func (o *FileOutput) SetSizeNil() { + o.Size.Set(nil) +} + +// UnsetSize ensures that no value is present for Size, not even an explicit nil +func (o *FileOutput) UnsetSize() { + o.Size.Unset() +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileOutput) GetSha256() string { + if o == nil || IsNil(o.Sha256.Get()) { + var ret string + return ret + } + return *o.Sha256.Get() +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileOutput) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha256.Get(), o.Sha256.IsSet() +} + +// HasSha256 returns a boolean if a field has been set. +func (o *FileOutput) HasSha256() bool { + if o != nil && o.Sha256.IsSet() { + return true + } + + return false +} + +// SetSha256 gets a reference to the given NullableString and assigns it to the Sha256 field. +func (o *FileOutput) SetSha256(v string) { + o.Sha256.Set(&v) +} + +// SetSha256Nil sets the value for Sha256 to be an explicit nil +func (o *FileOutput) SetSha256Nil() { + o.Sha256.Set(nil) +} + +// UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +func (o *FileOutput) UnsetSha256() { + o.Sha256.Unset() +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileOutput) GetMd5() string { + if o == nil || IsNil(o.Md5.Get()) { + var ret string + return ret + } + return *o.Md5.Get() +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileOutput) GetMd5Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Md5.Get(), o.Md5.IsSet() +} + +// HasMd5 returns a boolean if a field has been set. +func (o *FileOutput) HasMd5() bool { + if o != nil && o.Md5.IsSet() { + return true + } + + return false +} + +// SetMd5 gets a reference to the given NullableString and assigns it to the Md5 field. +func (o *FileOutput) SetMd5(v string) { + o.Md5.Set(&v) +} + +// SetMd5Nil sets the value for Md5 to be an explicit nil +func (o *FileOutput) SetMd5Nil() { + o.Md5.Set(nil) +} + +// UnsetMd5 ensures that no value is present for Md5, not even an explicit nil +func (o *FileOutput) UnsetMd5() { + o.Md5.Unset() +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileOutput) GetSha1() string { + if o == nil || IsNil(o.Sha1.Get()) { + var ret string + return ret + } + return *o.Sha1.Get() +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileOutput) GetSha1Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha1.Get(), o.Sha1.IsSet() +} + +// HasSha1 returns a boolean if a field has been set. +func (o *FileOutput) HasSha1() bool { + if o != nil && o.Sha1.IsSet() { + return true + } + + return false +} + +// SetSha1 gets a reference to the given NullableString and assigns it to the Sha1 field. +func (o *FileOutput) SetSha1(v string) { + o.Sha1.Set(&v) +} + +// SetSha1Nil sets the value for Sha1 to be an explicit nil +func (o *FileOutput) SetSha1Nil() { + o.Sha1.Set(nil) +} + +// UnsetSha1 ensures that no value is present for Sha1, not even an explicit nil +func (o *FileOutput) UnsetSha1() { + o.Sha1.Unset() +} + +// GetMimeType returns the MimeType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileOutput) GetMimeType() string { + if o == nil || IsNil(o.MimeType.Get()) { + var ret string + return ret + } + return *o.MimeType.Get() +} + +// GetMimeTypeOk returns a tuple with the MimeType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileOutput) GetMimeTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MimeType.Get(), o.MimeType.IsSet() +} + +// HasMimeType returns a boolean if a field has been set. +func (o *FileOutput) HasMimeType() bool { + if o != nil && o.MimeType.IsSet() { + return true + } + + return false +} + +// SetMimeType gets a reference to the given NullableString and assigns it to the MimeType field. +func (o *FileOutput) SetMimeType(v string) { + o.MimeType.Set(&v) +} + +// SetMimeTypeNil sets the value for MimeType to be an explicit nil +func (o *FileOutput) SetMimeTypeNil() { + o.MimeType.Set(nil) +} + +// UnsetMimeType ensures that no value is present for MimeType, not even an explicit nil +func (o *FileOutput) UnsetMimeType() { + o.MimeType.Unset() +} + +// GetId returns the Id field value +func (o *FileOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *FileOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *FileOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *FileOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *FileOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *FileOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *FileOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *FileOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *FileOutput) SetRootType(v string) { + o.RootType = v +} + +func (o FileOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Size.IsSet() { + toSerialize["size"] = o.Size.Get() + } + if o.Sha256.IsSet() { + toSerialize["sha256"] = o.Sha256.Get() + } + if o.Md5.IsSet() { + toSerialize["md5"] = o.Md5.Get() + } + if o.Sha1.IsSet() { + toSerialize["sha1"] = o.Sha1.Get() + } + if o.MimeType.IsSet() { + toSerialize["mime_type"] = o.MimeType.Get() + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *FileOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFileOutput := _FileOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFileOutput) + + if err != nil { + return err + } + + *o = FileOutput(varFileOutput) + + return err +} + +type NullableFileOutput struct { + value *FileOutput + isSet bool +} + +func (v NullableFileOutput) Get() *FileOutput { + return v.value +} + +func (v *NullableFileOutput) Set(val *FileOutput) { + v.value = val + v.isSet = true +} + +func (v NullableFileOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableFileOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileOutput(val *FileOutput) *NullableFileOutput { + return &NullableFileOutput{value: val, isSet: true} +} + +func (v NullableFileOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_forensic_artifact_input.go b/model_forensic_artifact_input.go new file mode 100644 index 0000000..73ec2ad --- /dev/null +++ b/model_forensic_artifact_input.go @@ -0,0 +1,657 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ForensicArtifactInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ForensicArtifactInput{} + +// ForensicArtifactInput Represents a Forensic Artifact As defined in https://github.com/ForensicArtifacts/artifacts +type ForensicArtifactInput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + Sources []map[string]interface{} `json:"sources,omitempty"` + Aliases []string `json:"aliases,omitempty"` + SupportedOs []string `json:"supported_os,omitempty"` +} + +type _ForensicArtifactInput ForensicArtifactInput + +// NewForensicArtifactInput instantiates a new ForensicArtifactInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewForensicArtifactInput(name string, pattern string, diamond DiamondModel) *ForensicArtifactInput { + this := ForensicArtifactInput{} + this.Name = name + var type_ string = "forensicartifact" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + return &this +} + +// NewForensicArtifactInputWithDefaults instantiates a new ForensicArtifactInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewForensicArtifactInputWithDefaults() *ForensicArtifactInput { + this := ForensicArtifactInput{} + var type_ string = "forensicartifact" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *ForensicArtifactInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ForensicArtifactInput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ForensicArtifactInput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ForensicArtifactInput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ForensicArtifactInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *ForensicArtifactInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *ForensicArtifactInput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *ForensicArtifactInput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *ForensicArtifactInput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *ForensicArtifactInput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *ForensicArtifactInput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *ForensicArtifactInput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *ForensicArtifactInput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *ForensicArtifactInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *ForensicArtifactInput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetSources returns the Sources field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetSources() []map[string]interface{} { + if o == nil || IsNil(o.Sources) { + var ret []map[string]interface{} + return ret + } + return o.Sources +} + +// GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetSourcesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Sources) { + return nil, false + } + return o.Sources, true +} + +// HasSources returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasSources() bool { + if o != nil && !IsNil(o.Sources) { + return true + } + + return false +} + +// SetSources gets a reference to the given []map[string]interface{} and assigns it to the Sources field. +func (o *ForensicArtifactInput) SetSources(v []map[string]interface{}) { + o.Sources = v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *ForensicArtifactInput) SetAliases(v []string) { + o.Aliases = v +} + +// GetSupportedOs returns the SupportedOs field value if set, zero value otherwise. +func (o *ForensicArtifactInput) GetSupportedOs() []string { + if o == nil || IsNil(o.SupportedOs) { + var ret []string + return ret + } + return o.SupportedOs +} + +// GetSupportedOsOk returns a tuple with the SupportedOs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactInput) GetSupportedOsOk() ([]string, bool) { + if o == nil || IsNil(o.SupportedOs) { + return nil, false + } + return o.SupportedOs, true +} + +// HasSupportedOs returns a boolean if a field has been set. +func (o *ForensicArtifactInput) HasSupportedOs() bool { + if o != nil && !IsNil(o.SupportedOs) { + return true + } + + return false +} + +// SetSupportedOs gets a reference to the given []string and assigns it to the SupportedOs field. +func (o *ForensicArtifactInput) SetSupportedOs(v []string) { + o.SupportedOs = v +} + +func (o ForensicArtifactInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ForensicArtifactInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + if !IsNil(o.Sources) { + toSerialize["sources"] = o.Sources + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.SupportedOs) { + toSerialize["supported_os"] = o.SupportedOs + } + return toSerialize, nil +} + +func (o *ForensicArtifactInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varForensicArtifactInput := _ForensicArtifactInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varForensicArtifactInput) + + if err != nil { + return err + } + + *o = ForensicArtifactInput(varForensicArtifactInput) + + return err +} + +type NullableForensicArtifactInput struct { + value *ForensicArtifactInput + isSet bool +} + +func (v NullableForensicArtifactInput) Get() *ForensicArtifactInput { + return v.value +} + +func (v *NullableForensicArtifactInput) Set(val *ForensicArtifactInput) { + v.value = val + v.isSet = true +} + +func (v NullableForensicArtifactInput) IsSet() bool { + return v.isSet +} + +func (v *NullableForensicArtifactInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableForensicArtifactInput(val *ForensicArtifactInput) *NullableForensicArtifactInput { + return &NullableForensicArtifactInput{value: val, isSet: true} +} + +func (v NullableForensicArtifactInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableForensicArtifactInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_forensic_artifact_output.go b/model_forensic_artifact_output.go new file mode 100644 index 0000000..7b82186 --- /dev/null +++ b/model_forensic_artifact_output.go @@ -0,0 +1,741 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ForensicArtifactOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ForensicArtifactOutput{} + +// ForensicArtifactOutput Represents a Forensic Artifact As defined in https://github.com/ForensicArtifacts/artifacts +type ForensicArtifactOutput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + Sources []map[string]interface{} `json:"sources,omitempty"` + Aliases []string `json:"aliases,omitempty"` + SupportedOs []string `json:"supported_os,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _ForensicArtifactOutput ForensicArtifactOutput + +// NewForensicArtifactOutput instantiates a new ForensicArtifactOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewForensicArtifactOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string) *ForensicArtifactOutput { + this := ForensicArtifactOutput{} + this.Name = name + var type_ string = "forensicartifact" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewForensicArtifactOutputWithDefaults instantiates a new ForensicArtifactOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewForensicArtifactOutputWithDefaults() *ForensicArtifactOutput { + this := ForensicArtifactOutput{} + var type_ string = "forensicartifact" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *ForensicArtifactOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ForensicArtifactOutput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ForensicArtifactOutput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ForensicArtifactOutput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ForensicArtifactOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *ForensicArtifactOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *ForensicArtifactOutput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *ForensicArtifactOutput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *ForensicArtifactOutput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *ForensicArtifactOutput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *ForensicArtifactOutput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *ForensicArtifactOutput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *ForensicArtifactOutput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *ForensicArtifactOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *ForensicArtifactOutput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetSources returns the Sources field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetSources() []map[string]interface{} { + if o == nil || IsNil(o.Sources) { + var ret []map[string]interface{} + return ret + } + return o.Sources +} + +// GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetSourcesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Sources) { + return nil, false + } + return o.Sources, true +} + +// HasSources returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasSources() bool { + if o != nil && !IsNil(o.Sources) { + return true + } + + return false +} + +// SetSources gets a reference to the given []map[string]interface{} and assigns it to the Sources field. +func (o *ForensicArtifactOutput) SetSources(v []map[string]interface{}) { + o.Sources = v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *ForensicArtifactOutput) SetAliases(v []string) { + o.Aliases = v +} + +// GetSupportedOs returns the SupportedOs field value if set, zero value otherwise. +func (o *ForensicArtifactOutput) GetSupportedOs() []string { + if o == nil || IsNil(o.SupportedOs) { + var ret []string + return ret + } + return o.SupportedOs +} + +// GetSupportedOsOk returns a tuple with the SupportedOs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetSupportedOsOk() ([]string, bool) { + if o == nil || IsNil(o.SupportedOs) { + return nil, false + } + return o.SupportedOs, true +} + +// HasSupportedOs returns a boolean if a field has been set. +func (o *ForensicArtifactOutput) HasSupportedOs() bool { + if o != nil && !IsNil(o.SupportedOs) { + return true + } + + return false +} + +// SetSupportedOs gets a reference to the given []string and assigns it to the SupportedOs field. +func (o *ForensicArtifactOutput) SetSupportedOs(v []string) { + o.SupportedOs = v +} + +// GetId returns the Id field value +func (o *ForensicArtifactOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ForensicArtifactOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *ForensicArtifactOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *ForensicArtifactOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *ForensicArtifactOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *ForensicArtifactOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *ForensicArtifactOutput) SetRootType(v string) { + o.RootType = v +} + +func (o ForensicArtifactOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ForensicArtifactOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + if !IsNil(o.Sources) { + toSerialize["sources"] = o.Sources + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.SupportedOs) { + toSerialize["supported_os"] = o.SupportedOs + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *ForensicArtifactOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varForensicArtifactOutput := _ForensicArtifactOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varForensicArtifactOutput) + + if err != nil { + return err + } + + *o = ForensicArtifactOutput(varForensicArtifactOutput) + + return err +} + +type NullableForensicArtifactOutput struct { + value *ForensicArtifactOutput + isSet bool +} + +func (v NullableForensicArtifactOutput) Get() *ForensicArtifactOutput { + return v.value +} + +func (v *NullableForensicArtifactOutput) Set(val *ForensicArtifactOutput) { + v.value = val + v.isSet = true +} + +func (v NullableForensicArtifactOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableForensicArtifactOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableForensicArtifactOutput(val *ForensicArtifactOutput) *NullableForensicArtifactOutput { + return &NullableForensicArtifactOutput{value: val, isSet: true} +} + +func (v NullableForensicArtifactOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableForensicArtifactOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_generic_input.go b/model_generic_input.go new file mode 100644 index 0000000..cb21962 --- /dev/null +++ b/model_generic_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the GenericInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenericInput{} + +// GenericInput Use this type of Observable for any type of observable that doesn't fit into any other category. +type GenericInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _GenericInput GenericInput + +// NewGenericInput instantiates a new GenericInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGenericInput(value string) *GenericInput { + this := GenericInput{} + this.Value = value + var type_ string = "generic" + this.Type = &type_ + return &this +} + +// NewGenericInputWithDefaults instantiates a new GenericInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGenericInputWithDefaults() *GenericInput { + this := GenericInput{} + var type_ string = "generic" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *GenericInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *GenericInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *GenericInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GenericInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GenericInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GenericInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *GenericInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *GenericInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *GenericInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *GenericInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *GenericInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *GenericInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *GenericInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *GenericInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *GenericInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o GenericInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenericInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *GenericInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGenericInput := _GenericInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGenericInput) + + if err != nil { + return err + } + + *o = GenericInput(varGenericInput) + + return err +} + +type NullableGenericInput struct { + value *GenericInput + isSet bool +} + +func (v NullableGenericInput) Get() *GenericInput { + return v.value +} + +func (v *NullableGenericInput) Set(val *GenericInput) { + v.value = val + v.isSet = true +} + +func (v NullableGenericInput) IsSet() bool { + return v.isSet +} + +func (v *NullableGenericInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenericInput(val *GenericInput) *NullableGenericInput { + return &NullableGenericInput{value: val, isSet: true} +} + +func (v NullableGenericInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenericInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_generic_output.go b/model_generic_output.go new file mode 100644 index 0000000..7cfd8b7 --- /dev/null +++ b/model_generic_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the GenericOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenericOutput{} + +// GenericOutput Use this type of Observable for any type of observable that doesn't fit into any other category. +type GenericOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _GenericOutput GenericOutput + +// NewGenericOutput instantiates a new GenericOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGenericOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *GenericOutput { + this := GenericOutput{} + this.Value = value + var type_ string = "generic" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewGenericOutputWithDefaults instantiates a new GenericOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGenericOutputWithDefaults() *GenericOutput { + this := GenericOutput{} + var type_ string = "generic" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *GenericOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *GenericOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *GenericOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GenericOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GenericOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GenericOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *GenericOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *GenericOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *GenericOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *GenericOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *GenericOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *GenericOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *GenericOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *GenericOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *GenericOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *GenericOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GenericOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GenericOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *GenericOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *GenericOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *GenericOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *GenericOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *GenericOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *GenericOutput) SetRootType(v string) { + o.RootType = v +} + +func (o GenericOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenericOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *GenericOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGenericOutput := _GenericOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGenericOutput) + + if err != nil { + return err + } + + *o = GenericOutput(varGenericOutput) + + return err +} + +type NullableGenericOutput struct { + value *GenericOutput + isSet bool +} + +func (v NullableGenericOutput) Get() *GenericOutput { + return v.value +} + +func (v *NullableGenericOutput) Set(val *GenericOutput) { + v.value = val + v.isSet = true +} + +func (v NullableGenericOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableGenericOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenericOutput(val *GenericOutput) *NullableGenericOutput { + return &NullableGenericOutput{value: val, isSet: true} +} + +func (v NullableGenericOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenericOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_graph_add_request.go b/model_graph_add_request.go new file mode 100644 index 0000000..406f1b8 --- /dev/null +++ b/model_graph_add_request.go @@ -0,0 +1,253 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the GraphAddRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GraphAddRequest{} + +// GraphAddRequest struct for GraphAddRequest +type GraphAddRequest struct { + Source string `json:"source"` + Target string `json:"target"` + LinkType string `json:"link_type"` + Description string `json:"description"` + AdditionalProperties map[string]interface{} +} + +type _GraphAddRequest GraphAddRequest + +// NewGraphAddRequest instantiates a new GraphAddRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGraphAddRequest(source string, target string, linkType string, description string) *GraphAddRequest { + this := GraphAddRequest{} + this.Source = source + this.Target = target + this.LinkType = linkType + this.Description = description + return &this +} + +// NewGraphAddRequestWithDefaults instantiates a new GraphAddRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGraphAddRequestWithDefaults() *GraphAddRequest { + this := GraphAddRequest{} + return &this +} + +// GetSource returns the Source field value +func (o *GraphAddRequest) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *GraphAddRequest) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *GraphAddRequest) SetSource(v string) { + o.Source = v +} + +// GetTarget returns the Target field value +func (o *GraphAddRequest) GetTarget() string { + if o == nil { + var ret string + return ret + } + + return o.Target +} + +// GetTargetOk returns a tuple with the Target field value +// and a boolean to check if the value has been set. +func (o *GraphAddRequest) GetTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Target, true +} + +// SetTarget sets field value +func (o *GraphAddRequest) SetTarget(v string) { + o.Target = v +} + +// GetLinkType returns the LinkType field value +func (o *GraphAddRequest) GetLinkType() string { + if o == nil { + var ret string + return ret + } + + return o.LinkType +} + +// GetLinkTypeOk returns a tuple with the LinkType field value +// and a boolean to check if the value has been set. +func (o *GraphAddRequest) GetLinkTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LinkType, true +} + +// SetLinkType sets field value +func (o *GraphAddRequest) SetLinkType(v string) { + o.LinkType = v +} + +// GetDescription returns the Description field value +func (o *GraphAddRequest) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *GraphAddRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *GraphAddRequest) SetDescription(v string) { + o.Description = v +} + +func (o GraphAddRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GraphAddRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source"] = o.Source + toSerialize["target"] = o.Target + toSerialize["link_type"] = o.LinkType + toSerialize["description"] = o.Description + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GraphAddRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source", + "target", + "link_type", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGraphAddRequest := _GraphAddRequest{} + + err = json.Unmarshal(data, &varGraphAddRequest) + + if err != nil { + return err + } + + *o = GraphAddRequest(varGraphAddRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "source") + delete(additionalProperties, "target") + delete(additionalProperties, "link_type") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGraphAddRequest struct { + value *GraphAddRequest + isSet bool +} + +func (v NullableGraphAddRequest) Get() *GraphAddRequest { + return v.value +} + +func (v *NullableGraphAddRequest) Set(val *GraphAddRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGraphAddRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGraphAddRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGraphAddRequest(val *GraphAddRequest) *NullableGraphAddRequest { + return &NullableGraphAddRequest{value: val, isSet: true} +} + +func (v NullableGraphAddRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGraphAddRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_graph_direction.go b/model_graph_direction.go new file mode 100644 index 0000000..48cb0a3 --- /dev/null +++ b/model_graph_direction.go @@ -0,0 +1,112 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// GraphDirection the model 'GraphDirection' +type GraphDirection string + +// List of GraphDirection +const ( + OUTBOUND GraphDirection = "outbound" + INBOUND GraphDirection = "inbound" + ANY GraphDirection = "any" +) + +// All allowed values of GraphDirection enum +var AllowedGraphDirectionEnumValues = []GraphDirection{ + "outbound", + "inbound", + "any", +} + +func (v *GraphDirection) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := GraphDirection(value) + for _, existing := range AllowedGraphDirectionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid GraphDirection", value) +} + +// NewGraphDirectionFromValue returns a pointer to a valid GraphDirection +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewGraphDirectionFromValue(v string) (*GraphDirection, error) { + ev := GraphDirection(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for GraphDirection: valid values are %v", v, AllowedGraphDirectionEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v GraphDirection) IsValid() bool { + for _, existing := range AllowedGraphDirectionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to GraphDirection value +func (v GraphDirection) Ptr() *GraphDirection { + return &v +} + +type NullableGraphDirection struct { + value *GraphDirection + isSet bool +} + +func (v NullableGraphDirection) Get() *GraphDirection { + return v.value +} + +func (v *NullableGraphDirection) Set(val *GraphDirection) { + v.value = val + v.isSet = true +} + +func (v NullableGraphDirection) IsSet() bool { + return v.isSet +} + +func (v *NullableGraphDirection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGraphDirection(val *GraphDirection) *NullableGraphDirection { + return &NullableGraphDirection{value: val, isSet: true} +} + +func (v NullableGraphDirection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGraphDirection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_graph_filter.go b/model_graph_filter.go new file mode 100644 index 0000000..ef8f7e2 --- /dev/null +++ b/model_graph_filter.go @@ -0,0 +1,212 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GraphFilter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GraphFilter{} + +// GraphFilter struct for GraphFilter +type GraphFilter struct { + Key string `json:"key"` + Value string `json:"value"` + Operator string `json:"operator"` +} + +type _GraphFilter GraphFilter + +// NewGraphFilter instantiates a new GraphFilter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGraphFilter(key string, value string, operator string) *GraphFilter { + this := GraphFilter{} + this.Key = key + this.Value = value + this.Operator = operator + return &this +} + +// NewGraphFilterWithDefaults instantiates a new GraphFilter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGraphFilterWithDefaults() *GraphFilter { + this := GraphFilter{} + return &this +} + +// GetKey returns the Key field value +func (o *GraphFilter) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *GraphFilter) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *GraphFilter) SetKey(v string) { + o.Key = v +} + +// GetValue returns the Value field value +func (o *GraphFilter) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *GraphFilter) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *GraphFilter) SetValue(v string) { + o.Value = v +} + +// GetOperator returns the Operator field value +func (o *GraphFilter) GetOperator() string { + if o == nil { + var ret string + return ret + } + + return o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value +// and a boolean to check if the value has been set. +func (o *GraphFilter) GetOperatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operator, true +} + +// SetOperator sets field value +func (o *GraphFilter) SetOperator(v string) { + o.Operator = v +} + +func (o GraphFilter) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GraphFilter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + toSerialize["value"] = o.Value + toSerialize["operator"] = o.Operator + return toSerialize, nil +} + +func (o *GraphFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + "value", + "operator", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGraphFilter := _GraphFilter{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGraphFilter) + + if err != nil { + return err + } + + *o = GraphFilter(varGraphFilter) + + return err +} + +type NullableGraphFilter struct { + value *GraphFilter + isSet bool +} + +func (v NullableGraphFilter) Get() *GraphFilter { + return v.value +} + +func (v *NullableGraphFilter) Set(val *GraphFilter) { + v.value = val + v.isSet = true +} + +func (v NullableGraphFilter) IsSet() bool { + return v.isSet +} + +func (v *NullableGraphFilter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGraphFilter(val *GraphFilter) *NullableGraphFilter { + return &NullableGraphFilter{value: val, isSet: true} +} + +func (v NullableGraphFilter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGraphFilter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_graph_patch_request.go b/model_graph_patch_request.go new file mode 100644 index 0000000..539b4a3 --- /dev/null +++ b/model_graph_patch_request.go @@ -0,0 +1,184 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GraphPatchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GraphPatchRequest{} + +// GraphPatchRequest struct for GraphPatchRequest +type GraphPatchRequest struct { + LinkType string `json:"link_type"` + Description string `json:"description"` +} + +type _GraphPatchRequest GraphPatchRequest + +// NewGraphPatchRequest instantiates a new GraphPatchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGraphPatchRequest(linkType string, description string) *GraphPatchRequest { + this := GraphPatchRequest{} + this.LinkType = linkType + this.Description = description + return &this +} + +// NewGraphPatchRequestWithDefaults instantiates a new GraphPatchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGraphPatchRequestWithDefaults() *GraphPatchRequest { + this := GraphPatchRequest{} + return &this +} + +// GetLinkType returns the LinkType field value +func (o *GraphPatchRequest) GetLinkType() string { + if o == nil { + var ret string + return ret + } + + return o.LinkType +} + +// GetLinkTypeOk returns a tuple with the LinkType field value +// and a boolean to check if the value has been set. +func (o *GraphPatchRequest) GetLinkTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LinkType, true +} + +// SetLinkType sets field value +func (o *GraphPatchRequest) SetLinkType(v string) { + o.LinkType = v +} + +// GetDescription returns the Description field value +func (o *GraphPatchRequest) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *GraphPatchRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *GraphPatchRequest) SetDescription(v string) { + o.Description = v +} + +func (o GraphPatchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GraphPatchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["link_type"] = o.LinkType + toSerialize["description"] = o.Description + return toSerialize, nil +} + +func (o *GraphPatchRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "link_type", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGraphPatchRequest := _GraphPatchRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGraphPatchRequest) + + if err != nil { + return err + } + + *o = GraphPatchRequest(varGraphPatchRequest) + + return err +} + +type NullableGraphPatchRequest struct { + value *GraphPatchRequest + isSet bool +} + +func (v NullableGraphPatchRequest) Get() *GraphPatchRequest { + return v.value +} + +func (v *NullableGraphPatchRequest) Set(val *GraphPatchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGraphPatchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGraphPatchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGraphPatchRequest(val *GraphPatchRequest) *NullableGraphPatchRequest { + return &NullableGraphPatchRequest{value: val, isSet: true} +} + +func (v NullableGraphPatchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGraphPatchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_graph_search_request.go b/model_graph_search_request.go new file mode 100644 index 0000000..4920b5f --- /dev/null +++ b/model_graph_search_request.go @@ -0,0 +1,594 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the GraphSearchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GraphSearchRequest{} + +// GraphSearchRequest struct for GraphSearchRequest +type GraphSearchRequest struct { + Source string `json:"source"` + LinkTypes []string `json:"link_types,omitempty"` + TargetTypes []string `json:"target_types,omitempty"` + Hops *Hops `json:"hops,omitempty"` + MinHops *MinHops `json:"min_hops,omitempty"` + MaxHops *MaxHops `json:"max_hops,omitempty"` + Graph string `json:"graph"` + Direction GraphDirection `json:"direction"` + Filter []GraphFilter `json:"filter,omitempty"` + IncludeOriginal bool `json:"include_original"` + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + Sorting [][]interface{} `json:"sorting,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GraphSearchRequest GraphSearchRequest + +// NewGraphSearchRequest instantiates a new GraphSearchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGraphSearchRequest(source string, graph string, direction GraphDirection, includeOriginal bool) *GraphSearchRequest { + this := GraphSearchRequest{} + this.Source = source + this.Graph = graph + this.Direction = direction + this.IncludeOriginal = includeOriginal + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// NewGraphSearchRequestWithDefaults instantiates a new GraphSearchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGraphSearchRequestWithDefaults() *GraphSearchRequest { + this := GraphSearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// GetSource returns the Source field value +func (o *GraphSearchRequest) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *GraphSearchRequest) SetSource(v string) { + o.Source = v +} + +// GetLinkTypes returns the LinkTypes field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetLinkTypes() []string { + if o == nil || IsNil(o.LinkTypes) { + var ret []string + return ret + } + return o.LinkTypes +} + +// GetLinkTypesOk returns a tuple with the LinkTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetLinkTypesOk() ([]string, bool) { + if o == nil || IsNil(o.LinkTypes) { + return nil, false + } + return o.LinkTypes, true +} + +// HasLinkTypes returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasLinkTypes() bool { + if o != nil && !IsNil(o.LinkTypes) { + return true + } + + return false +} + +// SetLinkTypes gets a reference to the given []string and assigns it to the LinkTypes field. +func (o *GraphSearchRequest) SetLinkTypes(v []string) { + o.LinkTypes = v +} + +// GetTargetTypes returns the TargetTypes field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetTargetTypes() []string { + if o == nil || IsNil(o.TargetTypes) { + var ret []string + return ret + } + return o.TargetTypes +} + +// GetTargetTypesOk returns a tuple with the TargetTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetTargetTypesOk() ([]string, bool) { + if o == nil || IsNil(o.TargetTypes) { + return nil, false + } + return o.TargetTypes, true +} + +// HasTargetTypes returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasTargetTypes() bool { + if o != nil && !IsNil(o.TargetTypes) { + return true + } + + return false +} + +// SetTargetTypes gets a reference to the given []string and assigns it to the TargetTypes field. +func (o *GraphSearchRequest) SetTargetTypes(v []string) { + o.TargetTypes = v +} + +// GetHops returns the Hops field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetHops() Hops { + if o == nil || IsNil(o.Hops) { + var ret Hops + return ret + } + return *o.Hops +} + +// GetHopsOk returns a tuple with the Hops field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetHopsOk() (*Hops, bool) { + if o == nil || IsNil(o.Hops) { + return nil, false + } + return o.Hops, true +} + +// HasHops returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasHops() bool { + if o != nil && !IsNil(o.Hops) { + return true + } + + return false +} + +// SetHops gets a reference to the given Hops and assigns it to the Hops field. +func (o *GraphSearchRequest) SetHops(v Hops) { + o.Hops = &v +} + +// GetMinHops returns the MinHops field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetMinHops() MinHops { + if o == nil || IsNil(o.MinHops) { + var ret MinHops + return ret + } + return *o.MinHops +} + +// GetMinHopsOk returns a tuple with the MinHops field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetMinHopsOk() (*MinHops, bool) { + if o == nil || IsNil(o.MinHops) { + return nil, false + } + return o.MinHops, true +} + +// HasMinHops returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasMinHops() bool { + if o != nil && !IsNil(o.MinHops) { + return true + } + + return false +} + +// SetMinHops gets a reference to the given MinHops and assigns it to the MinHops field. +func (o *GraphSearchRequest) SetMinHops(v MinHops) { + o.MinHops = &v +} + +// GetMaxHops returns the MaxHops field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetMaxHops() MaxHops { + if o == nil || IsNil(o.MaxHops) { + var ret MaxHops + return ret + } + return *o.MaxHops +} + +// GetMaxHopsOk returns a tuple with the MaxHops field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetMaxHopsOk() (*MaxHops, bool) { + if o == nil || IsNil(o.MaxHops) { + return nil, false + } + return o.MaxHops, true +} + +// HasMaxHops returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasMaxHops() bool { + if o != nil && !IsNil(o.MaxHops) { + return true + } + + return false +} + +// SetMaxHops gets a reference to the given MaxHops and assigns it to the MaxHops field. +func (o *GraphSearchRequest) SetMaxHops(v MaxHops) { + o.MaxHops = &v +} + +// GetGraph returns the Graph field value +func (o *GraphSearchRequest) GetGraph() string { + if o == nil { + var ret string + return ret + } + + return o.Graph +} + +// GetGraphOk returns a tuple with the Graph field value +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetGraphOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Graph, true +} + +// SetGraph sets field value +func (o *GraphSearchRequest) SetGraph(v string) { + o.Graph = v +} + +// GetDirection returns the Direction field value +func (o *GraphSearchRequest) GetDirection() GraphDirection { + if o == nil { + var ret GraphDirection + return ret + } + + return o.Direction +} + +// GetDirectionOk returns a tuple with the Direction field value +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetDirectionOk() (*GraphDirection, bool) { + if o == nil { + return nil, false + } + return &o.Direction, true +} + +// SetDirection sets field value +func (o *GraphSearchRequest) SetDirection(v GraphDirection) { + o.Direction = v +} + +// GetFilter returns the Filter field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetFilter() []GraphFilter { + if o == nil || IsNil(o.Filter) { + var ret []GraphFilter + return ret + } + return o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetFilterOk() ([]GraphFilter, bool) { + if o == nil || IsNil(o.Filter) { + return nil, false + } + return o.Filter, true +} + +// HasFilter returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasFilter() bool { + if o != nil && !IsNil(o.Filter) { + return true + } + + return false +} + +// SetFilter gets a reference to the given []GraphFilter and assigns it to the Filter field. +func (o *GraphSearchRequest) SetFilter(v []GraphFilter) { + o.Filter = v +} + +// GetIncludeOriginal returns the IncludeOriginal field value +func (o *GraphSearchRequest) GetIncludeOriginal() bool { + if o == nil { + var ret bool + return ret + } + + return o.IncludeOriginal +} + +// GetIncludeOriginalOk returns a tuple with the IncludeOriginal field value +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetIncludeOriginalOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IncludeOriginal, true +} + +// SetIncludeOriginal sets field value +func (o *GraphSearchRequest) SetIncludeOriginal(v bool) { + o.IncludeOriginal = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *GraphSearchRequest) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *GraphSearchRequest) SetPage(v int32) { + o.Page = &v +} + +// GetSorting returns the Sorting field value if set, zero value otherwise. +func (o *GraphSearchRequest) GetSorting() [][]interface{} { + if o == nil || IsNil(o.Sorting) { + var ret [][]interface{} + return ret + } + return o.Sorting +} + +// GetSortingOk returns a tuple with the Sorting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GraphSearchRequest) GetSortingOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.Sorting) { + return nil, false + } + return o.Sorting, true +} + +// HasSorting returns a boolean if a field has been set. +func (o *GraphSearchRequest) HasSorting() bool { + if o != nil && !IsNil(o.Sorting) { + return true + } + + return false +} + +// SetSorting gets a reference to the given [][]interface{} and assigns it to the Sorting field. +func (o *GraphSearchRequest) SetSorting(v [][]interface{}) { + o.Sorting = v +} + +func (o GraphSearchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GraphSearchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source"] = o.Source + if !IsNil(o.LinkTypes) { + toSerialize["link_types"] = o.LinkTypes + } + if !IsNil(o.TargetTypes) { + toSerialize["target_types"] = o.TargetTypes + } + if !IsNil(o.Hops) { + toSerialize["hops"] = o.Hops + } + if !IsNil(o.MinHops) { + toSerialize["min_hops"] = o.MinHops + } + if !IsNil(o.MaxHops) { + toSerialize["max_hops"] = o.MaxHops + } + toSerialize["graph"] = o.Graph + toSerialize["direction"] = o.Direction + if !IsNil(o.Filter) { + toSerialize["filter"] = o.Filter + } + toSerialize["include_original"] = o.IncludeOriginal + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.Sorting) { + toSerialize["sorting"] = o.Sorting + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GraphSearchRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source", + "graph", + "direction", + "include_original", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGraphSearchRequest := _GraphSearchRequest{} + + err = json.Unmarshal(data, &varGraphSearchRequest) + + if err != nil { + return err + } + + *o = GraphSearchRequest(varGraphSearchRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "source") + delete(additionalProperties, "link_types") + delete(additionalProperties, "target_types") + delete(additionalProperties, "hops") + delete(additionalProperties, "min_hops") + delete(additionalProperties, "max_hops") + delete(additionalProperties, "graph") + delete(additionalProperties, "direction") + delete(additionalProperties, "filter") + delete(additionalProperties, "include_original") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + delete(additionalProperties, "sorting") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGraphSearchRequest struct { + value *GraphSearchRequest + isSet bool +} + +func (v NullableGraphSearchRequest) Get() *GraphSearchRequest { + return v.value +} + +func (v *NullableGraphSearchRequest) Set(val *GraphSearchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGraphSearchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGraphSearchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGraphSearchRequest(val *GraphSearchRequest) *NullableGraphSearchRequest { + return &NullableGraphSearchRequest{value: val, isSet: true} +} + +func (v NullableGraphSearchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGraphSearchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_graph_search_response.go b/model_graph_search_response.go new file mode 100644 index 0000000..f3b4248 --- /dev/null +++ b/model_graph_search_response.go @@ -0,0 +1,224 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the GraphSearchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GraphSearchResponse{} + +// GraphSearchResponse struct for GraphSearchResponse +type GraphSearchResponse struct { + Vertices map[string]VerticesValue `json:"vertices"` + Paths [][]PathsInnerInner `json:"paths"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _GraphSearchResponse GraphSearchResponse + +// NewGraphSearchResponse instantiates a new GraphSearchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGraphSearchResponse(vertices map[string]VerticesValue, paths [][]PathsInnerInner, total int32) *GraphSearchResponse { + this := GraphSearchResponse{} + this.Vertices = vertices + this.Paths = paths + this.Total = total + return &this +} + +// NewGraphSearchResponseWithDefaults instantiates a new GraphSearchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGraphSearchResponseWithDefaults() *GraphSearchResponse { + this := GraphSearchResponse{} + return &this +} + +// GetVertices returns the Vertices field value +func (o *GraphSearchResponse) GetVertices() map[string]VerticesValue { + if o == nil { + var ret map[string]VerticesValue + return ret + } + + return o.Vertices +} + +// GetVerticesOk returns a tuple with the Vertices field value +// and a boolean to check if the value has been set. +func (o *GraphSearchResponse) GetVerticesOk() (map[string]VerticesValue, bool) { + if o == nil { + return map[string]VerticesValue{}, false + } + return o.Vertices, true +} + +// SetVertices sets field value +func (o *GraphSearchResponse) SetVertices(v map[string]VerticesValue) { + o.Vertices = v +} + +// GetPaths returns the Paths field value +func (o *GraphSearchResponse) GetPaths() [][]PathsInnerInner { + if o == nil { + var ret [][]PathsInnerInner + return ret + } + + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value +// and a boolean to check if the value has been set. +func (o *GraphSearchResponse) GetPathsOk() ([][]PathsInnerInner, bool) { + if o == nil { + return nil, false + } + return o.Paths, true +} + +// SetPaths sets field value +func (o *GraphSearchResponse) SetPaths(v [][]PathsInnerInner) { + o.Paths = v +} + +// GetTotal returns the Total field value +func (o *GraphSearchResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *GraphSearchResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *GraphSearchResponse) SetTotal(v int32) { + o.Total = v +} + +func (o GraphSearchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GraphSearchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["vertices"] = o.Vertices + toSerialize["paths"] = o.Paths + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GraphSearchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "vertices", + "paths", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGraphSearchResponse := _GraphSearchResponse{} + + err = json.Unmarshal(data, &varGraphSearchResponse) + + if err != nil { + return err + } + + *o = GraphSearchResponse(varGraphSearchResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "vertices") + delete(additionalProperties, "paths") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGraphSearchResponse struct { + value *GraphSearchResponse + isSet bool +} + +func (v NullableGraphSearchResponse) Get() *GraphSearchResponse { + return v.value +} + +func (v *NullableGraphSearchResponse) Set(val *GraphSearchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGraphSearchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGraphSearchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGraphSearchResponse(val *GraphSearchResponse) *NullableGraphSearchResponse { + return &NullableGraphSearchResponse{value: val, isSet: true} +} + +func (v NullableGraphSearchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGraphSearchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_hops.go b/model_hops.go new file mode 100644 index 0000000..e59bfff --- /dev/null +++ b/model_hops.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// Hops struct for Hops +type Hops struct { + Int32 *int32 +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *Hops) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into Int32 + err = json.Unmarshal(data, &dst.Int32) + if err == nil { + jsonInt32, _ := json.Marshal(dst.Int32) + if string(jsonInt32) == "{}" { // empty struct + dst.Int32 = nil + } else { + return nil // data stored in dst.Int32, return on the first match + } + } else { + dst.Int32 = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(Hops)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Hops) MarshalJSON() ([]byte, error) { + if src.Int32 != nil { + return json.Marshal(&src.Int32) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableHops struct { + value *Hops + isSet bool +} + +func (v NullableHops) Get() *Hops { + return v.value +} + +func (v *NullableHops) Set(val *Hops) { + v.value = val + v.isSet = true +} + +func (v NullableHops) IsSet() bool { + return v.isSet +} + +func (v *NullableHops) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHops(val *Hops) *NullableHops { + return &NullableHops{value: val, isSet: true} +} + +func (v NullableHops) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHops) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_hostname_input.go b/model_hostname_input.go new file mode 100644 index 0000000..e26ecce --- /dev/null +++ b/model_hostname_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the HostnameInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HostnameInput{} + +// HostnameInput struct for HostnameInput +type HostnameInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _HostnameInput HostnameInput + +// NewHostnameInput instantiates a new HostnameInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHostnameInput(value string) *HostnameInput { + this := HostnameInput{} + this.Value = value + var type_ string = "hostname" + this.Type = &type_ + return &this +} + +// NewHostnameInputWithDefaults instantiates a new HostnameInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHostnameInputWithDefaults() *HostnameInput { + this := HostnameInput{} + var type_ string = "hostname" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *HostnameInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *HostnameInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *HostnameInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *HostnameInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostnameInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *HostnameInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *HostnameInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *HostnameInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostnameInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *HostnameInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *HostnameInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *HostnameInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostnameInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *HostnameInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *HostnameInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *HostnameInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostnameInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *HostnameInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *HostnameInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o HostnameInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HostnameInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *HostnameInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHostnameInput := _HostnameInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHostnameInput) + + if err != nil { + return err + } + + *o = HostnameInput(varHostnameInput) + + return err +} + +type NullableHostnameInput struct { + value *HostnameInput + isSet bool +} + +func (v NullableHostnameInput) Get() *HostnameInput { + return v.value +} + +func (v *NullableHostnameInput) Set(val *HostnameInput) { + v.value = val + v.isSet = true +} + +func (v NullableHostnameInput) IsSet() bool { + return v.isSet +} + +func (v *NullableHostnameInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHostnameInput(val *HostnameInput) *NullableHostnameInput { + return &NullableHostnameInput{value: val, isSet: true} +} + +func (v NullableHostnameInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHostnameInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_hostname_output.go b/model_hostname_output.go new file mode 100644 index 0000000..4938124 --- /dev/null +++ b/model_hostname_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the HostnameOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HostnameOutput{} + +// HostnameOutput struct for HostnameOutput +type HostnameOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _HostnameOutput HostnameOutput + +// NewHostnameOutput instantiates a new HostnameOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHostnameOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *HostnameOutput { + this := HostnameOutput{} + this.Value = value + var type_ string = "hostname" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewHostnameOutputWithDefaults instantiates a new HostnameOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHostnameOutputWithDefaults() *HostnameOutput { + this := HostnameOutput{} + var type_ string = "hostname" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *HostnameOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *HostnameOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *HostnameOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *HostnameOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostnameOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *HostnameOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *HostnameOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *HostnameOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostnameOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *HostnameOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *HostnameOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *HostnameOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostnameOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *HostnameOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *HostnameOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *HostnameOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostnameOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *HostnameOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *HostnameOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *HostnameOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *HostnameOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *HostnameOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *HostnameOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *HostnameOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *HostnameOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *HostnameOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *HostnameOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *HostnameOutput) SetRootType(v string) { + o.RootType = v +} + +func (o HostnameOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HostnameOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *HostnameOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHostnameOutput := _HostnameOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHostnameOutput) + + if err != nil { + return err + } + + *o = HostnameOutput(varHostnameOutput) + + return err +} + +type NullableHostnameOutput struct { + value *HostnameOutput + isSet bool +} + +func (v NullableHostnameOutput) Get() *HostnameOutput { + return v.value +} + +func (v *NullableHostnameOutput) Set(val *HostnameOutput) { + v.value = val + v.isSet = true +} + +func (v NullableHostnameOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableHostnameOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHostnameOutput(val *HostnameOutput) *NullableHostnameOutput { + return &NullableHostnameOutput{value: val, isSet: true} +} + +func (v NullableHostnameOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHostnameOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_http_validation_error.go b/model_http_validation_error.go new file mode 100644 index 0000000..3fe062e --- /dev/null +++ b/model_http_validation_error.go @@ -0,0 +1,124 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the HTTPValidationError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HTTPValidationError{} + +// HTTPValidationError struct for HTTPValidationError +type HTTPValidationError struct { + Detail []ValidationError `json:"detail,omitempty"` +} + +// NewHTTPValidationError instantiates a new HTTPValidationError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHTTPValidationError() *HTTPValidationError { + this := HTTPValidationError{} + return &this +} + +// NewHTTPValidationErrorWithDefaults instantiates a new HTTPValidationError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHTTPValidationErrorWithDefaults() *HTTPValidationError { + this := HTTPValidationError{} + return &this +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *HTTPValidationError) GetDetail() []ValidationError { + if o == nil || IsNil(o.Detail) { + var ret []ValidationError + return ret + } + return o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPValidationError) GetDetailOk() ([]ValidationError, bool) { + if o == nil || IsNil(o.Detail) { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *HTTPValidationError) HasDetail() bool { + if o != nil && !IsNil(o.Detail) { + return true + } + + return false +} + +// SetDetail gets a reference to the given []ValidationError and assigns it to the Detail field. +func (o *HTTPValidationError) SetDetail(v []ValidationError) { + o.Detail = v +} + +func (o HTTPValidationError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HTTPValidationError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Detail) { + toSerialize["detail"] = o.Detail + } + return toSerialize, nil +} + +type NullableHTTPValidationError struct { + value *HTTPValidationError + isSet bool +} + +func (v NullableHTTPValidationError) Get() *HTTPValidationError { + return v.value +} + +func (v *NullableHTTPValidationError) Set(val *HTTPValidationError) { + v.value = val + v.isSet = true +} + +func (v NullableHTTPValidationError) IsSet() bool { + return v.isSet +} + +func (v *NullableHTTPValidationError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHTTPValidationError(val *HTTPValidationError) *NullableHTTPValidationError { + return &NullableHTTPValidationError{value: val, isSet: true} +} + +func (v NullableHTTPValidationError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHTTPValidationError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_iban_input.go b/model_iban_input.go new file mode 100644 index 0000000..375d79b --- /dev/null +++ b/model_iban_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IBANInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IBANInput{} + +// IBANInput struct for IBANInput +type IBANInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _IBANInput IBANInput + +// NewIBANInput instantiates a new IBANInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIBANInput(value string) *IBANInput { + this := IBANInput{} + this.Value = value + var type_ string = "iban" + this.Type = &type_ + return &this +} + +// NewIBANInputWithDefaults instantiates a new IBANInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIBANInputWithDefaults() *IBANInput { + this := IBANInput{} + var type_ string = "iban" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *IBANInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *IBANInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *IBANInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IBANInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IBANInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IBANInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IBANInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IBANInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IBANInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IBANInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IBANInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IBANInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IBANInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IBANInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IBANInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *IBANInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IBANInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *IBANInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *IBANInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o IBANInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IBANInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *IBANInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIBANInput := _IBANInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIBANInput) + + if err != nil { + return err + } + + *o = IBANInput(varIBANInput) + + return err +} + +type NullableIBANInput struct { + value *IBANInput + isSet bool +} + +func (v NullableIBANInput) Get() *IBANInput { + return v.value +} + +func (v *NullableIBANInput) Set(val *IBANInput) { + v.value = val + v.isSet = true +} + +func (v NullableIBANInput) IsSet() bool { + return v.isSet +} + +func (v *NullableIBANInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIBANInput(val *IBANInput) *NullableIBANInput { + return &NullableIBANInput{value: val, isSet: true} +} + +func (v NullableIBANInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIBANInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_iban_output.go b/model_iban_output.go new file mode 100644 index 0000000..b8fc708 --- /dev/null +++ b/model_iban_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IBANOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IBANOutput{} + +// IBANOutput struct for IBANOutput +type IBANOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _IBANOutput IBANOutput + +// NewIBANOutput instantiates a new IBANOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIBANOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *IBANOutput { + this := IBANOutput{} + this.Value = value + var type_ string = "iban" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewIBANOutputWithDefaults instantiates a new IBANOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIBANOutputWithDefaults() *IBANOutput { + this := IBANOutput{} + var type_ string = "iban" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *IBANOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *IBANOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *IBANOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IBANOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IBANOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IBANOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IBANOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IBANOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IBANOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IBANOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IBANOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IBANOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IBANOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IBANOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IBANOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *IBANOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IBANOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *IBANOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *IBANOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *IBANOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *IBANOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *IBANOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *IBANOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *IBANOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *IBANOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *IBANOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *IBANOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *IBANOutput) SetRootType(v string) { + o.RootType = v +} + +func (o IBANOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IBANOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *IBANOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIBANOutput := _IBANOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIBANOutput) + + if err != nil { + return err + } + + *o = IBANOutput(varIBANOutput) + + return err +} + +type NullableIBANOutput struct { + value *IBANOutput + isSet bool +} + +func (v NullableIBANOutput) Get() *IBANOutput { + return v.value +} + +func (v *NullableIBANOutput) Set(val *IBANOutput) { + v.value = val + v.isSet = true +} + +func (v NullableIBANOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableIBANOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIBANOutput(val *IBANOutput) *NullableIBANOutput { + return &NullableIBANOutput{value: val, isSet: true} +} + +func (v NullableIBANOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIBANOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_identity_input.go b/model_identity_input.go new file mode 100644 index 0000000..e0f3d13 --- /dev/null +++ b/model_identity_input.go @@ -0,0 +1,461 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IdentityInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IdentityInput{} + +// IdentityInput struct for IdentityInput +type IdentityInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + IdentityClass *string `json:"identity_class,omitempty"` + Sectors []string `json:"sectors,omitempty"` + ContactInformation *string `json:"contact_information,omitempty"` +} + +type _IdentityInput IdentityInput + +// NewIdentityInput instantiates a new IdentityInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIdentityInput(name string) *IdentityInput { + this := IdentityInput{} + var type_ string = "identity" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var identityClass string = "" + this.IdentityClass = &identityClass + var contactInformation string = "" + this.ContactInformation = &contactInformation + return &this +} + +// NewIdentityInputWithDefaults instantiates a new IdentityInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIdentityInputWithDefaults() *IdentityInput { + this := IdentityInput{} + var type_ string = "identity" + this.Type = &type_ + var description string = "" + this.Description = &description + var identityClass string = "" + this.IdentityClass = &identityClass + var contactInformation string = "" + this.ContactInformation = &contactInformation + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IdentityInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IdentityInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IdentityInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *IdentityInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *IdentityInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *IdentityInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *IdentityInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *IdentityInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IdentityInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IdentityInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IdentityInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IdentityInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IdentityInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IdentityInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *IdentityInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *IdentityInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *IdentityInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetIdentityClass returns the IdentityClass field value if set, zero value otherwise. +func (o *IdentityInput) GetIdentityClass() string { + if o == nil || IsNil(o.IdentityClass) { + var ret string + return ret + } + return *o.IdentityClass +} + +// GetIdentityClassOk returns a tuple with the IdentityClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetIdentityClassOk() (*string, bool) { + if o == nil || IsNil(o.IdentityClass) { + return nil, false + } + return o.IdentityClass, true +} + +// HasIdentityClass returns a boolean if a field has been set. +func (o *IdentityInput) HasIdentityClass() bool { + if o != nil && !IsNil(o.IdentityClass) { + return true + } + + return false +} + +// SetIdentityClass gets a reference to the given string and assigns it to the IdentityClass field. +func (o *IdentityInput) SetIdentityClass(v string) { + o.IdentityClass = &v +} + +// GetSectors returns the Sectors field value if set, zero value otherwise. +func (o *IdentityInput) GetSectors() []string { + if o == nil || IsNil(o.Sectors) { + var ret []string + return ret + } + return o.Sectors +} + +// GetSectorsOk returns a tuple with the Sectors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetSectorsOk() ([]string, bool) { + if o == nil || IsNil(o.Sectors) { + return nil, false + } + return o.Sectors, true +} + +// HasSectors returns a boolean if a field has been set. +func (o *IdentityInput) HasSectors() bool { + if o != nil && !IsNil(o.Sectors) { + return true + } + + return false +} + +// SetSectors gets a reference to the given []string and assigns it to the Sectors field. +func (o *IdentityInput) SetSectors(v []string) { + o.Sectors = v +} + +// GetContactInformation returns the ContactInformation field value if set, zero value otherwise. +func (o *IdentityInput) GetContactInformation() string { + if o == nil || IsNil(o.ContactInformation) { + var ret string + return ret + } + return *o.ContactInformation +} + +// GetContactInformationOk returns a tuple with the ContactInformation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityInput) GetContactInformationOk() (*string, bool) { + if o == nil || IsNil(o.ContactInformation) { + return nil, false + } + return o.ContactInformation, true +} + +// HasContactInformation returns a boolean if a field has been set. +func (o *IdentityInput) HasContactInformation() bool { + if o != nil && !IsNil(o.ContactInformation) { + return true + } + + return false +} + +// SetContactInformation gets a reference to the given string and assigns it to the ContactInformation field. +func (o *IdentityInput) SetContactInformation(v string) { + o.ContactInformation = &v +} + +func (o IdentityInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IdentityInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.IdentityClass) { + toSerialize["identity_class"] = o.IdentityClass + } + if !IsNil(o.Sectors) { + toSerialize["sectors"] = o.Sectors + } + if !IsNil(o.ContactInformation) { + toSerialize["contact_information"] = o.ContactInformation + } + return toSerialize, nil +} + +func (o *IdentityInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIdentityInput := _IdentityInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIdentityInput) + + if err != nil { + return err + } + + *o = IdentityInput(varIdentityInput) + + return err +} + +type NullableIdentityInput struct { + value *IdentityInput + isSet bool +} + +func (v NullableIdentityInput) Get() *IdentityInput { + return v.value +} + +func (v *NullableIdentityInput) Set(val *IdentityInput) { + v.value = val + v.isSet = true +} + +func (v NullableIdentityInput) IsSet() bool { + return v.isSet +} + +func (v *NullableIdentityInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIdentityInput(val *IdentityInput) *NullableIdentityInput { + return &NullableIdentityInput{value: val, isSet: true} +} + +func (v NullableIdentityInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIdentityInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_identity_output.go b/model_identity_output.go new file mode 100644 index 0000000..7a5dd35 --- /dev/null +++ b/model_identity_output.go @@ -0,0 +1,573 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IdentityOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IdentityOutput{} + +// IdentityOutput struct for IdentityOutput +type IdentityOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + IdentityClass *string `json:"identity_class,omitempty"` + Sectors []string `json:"sectors,omitempty"` + ContactInformation *string `json:"contact_information,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _IdentityOutput IdentityOutput + +// NewIdentityOutput instantiates a new IdentityOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIdentityOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *IdentityOutput { + this := IdentityOutput{} + var type_ string = "identity" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var identityClass string = "" + this.IdentityClass = &identityClass + var contactInformation string = "" + this.ContactInformation = &contactInformation + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewIdentityOutputWithDefaults instantiates a new IdentityOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIdentityOutputWithDefaults() *IdentityOutput { + this := IdentityOutput{} + var type_ string = "identity" + this.Type = &type_ + var description string = "" + this.Description = &description + var identityClass string = "" + this.IdentityClass = &identityClass + var contactInformation string = "" + this.ContactInformation = &contactInformation + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IdentityOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IdentityOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IdentityOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *IdentityOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *IdentityOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *IdentityOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *IdentityOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *IdentityOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IdentityOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IdentityOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IdentityOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IdentityOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IdentityOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IdentityOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *IdentityOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *IdentityOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *IdentityOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetIdentityClass returns the IdentityClass field value if set, zero value otherwise. +func (o *IdentityOutput) GetIdentityClass() string { + if o == nil || IsNil(o.IdentityClass) { + var ret string + return ret + } + return *o.IdentityClass +} + +// GetIdentityClassOk returns a tuple with the IdentityClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetIdentityClassOk() (*string, bool) { + if o == nil || IsNil(o.IdentityClass) { + return nil, false + } + return o.IdentityClass, true +} + +// HasIdentityClass returns a boolean if a field has been set. +func (o *IdentityOutput) HasIdentityClass() bool { + if o != nil && !IsNil(o.IdentityClass) { + return true + } + + return false +} + +// SetIdentityClass gets a reference to the given string and assigns it to the IdentityClass field. +func (o *IdentityOutput) SetIdentityClass(v string) { + o.IdentityClass = &v +} + +// GetSectors returns the Sectors field value if set, zero value otherwise. +func (o *IdentityOutput) GetSectors() []string { + if o == nil || IsNil(o.Sectors) { + var ret []string + return ret + } + return o.Sectors +} + +// GetSectorsOk returns a tuple with the Sectors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetSectorsOk() ([]string, bool) { + if o == nil || IsNil(o.Sectors) { + return nil, false + } + return o.Sectors, true +} + +// HasSectors returns a boolean if a field has been set. +func (o *IdentityOutput) HasSectors() bool { + if o != nil && !IsNil(o.Sectors) { + return true + } + + return false +} + +// SetSectors gets a reference to the given []string and assigns it to the Sectors field. +func (o *IdentityOutput) SetSectors(v []string) { + o.Sectors = v +} + +// GetContactInformation returns the ContactInformation field value if set, zero value otherwise. +func (o *IdentityOutput) GetContactInformation() string { + if o == nil || IsNil(o.ContactInformation) { + var ret string + return ret + } + return *o.ContactInformation +} + +// GetContactInformationOk returns a tuple with the ContactInformation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetContactInformationOk() (*string, bool) { + if o == nil || IsNil(o.ContactInformation) { + return nil, false + } + return o.ContactInformation, true +} + +// HasContactInformation returns a boolean if a field has been set. +func (o *IdentityOutput) HasContactInformation() bool { + if o != nil && !IsNil(o.ContactInformation) { + return true + } + + return false +} + +// SetContactInformation gets a reference to the given string and assigns it to the ContactInformation field. +func (o *IdentityOutput) SetContactInformation(v string) { + o.ContactInformation = &v +} + +// GetId returns the Id field value +func (o *IdentityOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *IdentityOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *IdentityOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *IdentityOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *IdentityOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *IdentityOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *IdentityOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *IdentityOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *IdentityOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o IdentityOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IdentityOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.IdentityClass) { + toSerialize["identity_class"] = o.IdentityClass + } + if !IsNil(o.Sectors) { + toSerialize["sectors"] = o.Sectors + } + if !IsNil(o.ContactInformation) { + toSerialize["contact_information"] = o.ContactInformation + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *IdentityOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIdentityOutput := _IdentityOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIdentityOutput) + + if err != nil { + return err + } + + *o = IdentityOutput(varIdentityOutput) + + return err +} + +type NullableIdentityOutput struct { + value *IdentityOutput + isSet bool +} + +func (v NullableIdentityOutput) Get() *IdentityOutput { + return v.value +} + +func (v *NullableIdentityOutput) Set(val *IdentityOutput) { + v.value = val + v.isSet = true +} + +func (v NullableIdentityOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableIdentityOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIdentityOutput(val *IdentityOutput) *NullableIdentityOutput { + return &NullableIdentityOutput{value: val, isSet: true} +} + +func (v NullableIdentityOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIdentityOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_imphash_input.go b/model_imphash_input.go new file mode 100644 index 0000000..ee8c8ae --- /dev/null +++ b/model_imphash_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ImphashInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImphashInput{} + +// ImphashInput struct for ImphashInput +type ImphashInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _ImphashInput ImphashInput + +// NewImphashInput instantiates a new ImphashInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImphashInput(value string) *ImphashInput { + this := ImphashInput{} + this.Value = value + var type_ string = "imphash" + this.Type = &type_ + return &this +} + +// NewImphashInputWithDefaults instantiates a new ImphashInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImphashInputWithDefaults() *ImphashInput { + this := ImphashInput{} + var type_ string = "imphash" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *ImphashInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *ImphashInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *ImphashInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ImphashInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImphashInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ImphashInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ImphashInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ImphashInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImphashInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ImphashInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ImphashInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *ImphashInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImphashInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *ImphashInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *ImphashInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *ImphashInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImphashInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *ImphashInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *ImphashInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o ImphashInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImphashInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *ImphashInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImphashInput := _ImphashInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImphashInput) + + if err != nil { + return err + } + + *o = ImphashInput(varImphashInput) + + return err +} + +type NullableImphashInput struct { + value *ImphashInput + isSet bool +} + +func (v NullableImphashInput) Get() *ImphashInput { + return v.value +} + +func (v *NullableImphashInput) Set(val *ImphashInput) { + v.value = val + v.isSet = true +} + +func (v NullableImphashInput) IsSet() bool { + return v.isSet +} + +func (v *NullableImphashInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImphashInput(val *ImphashInput) *NullableImphashInput { + return &NullableImphashInput{value: val, isSet: true} +} + +func (v NullableImphashInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImphashInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_imphash_output.go b/model_imphash_output.go new file mode 100644 index 0000000..28a20ce --- /dev/null +++ b/model_imphash_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ImphashOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImphashOutput{} + +// ImphashOutput struct for ImphashOutput +type ImphashOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _ImphashOutput ImphashOutput + +// NewImphashOutput instantiates a new ImphashOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImphashOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *ImphashOutput { + this := ImphashOutput{} + this.Value = value + var type_ string = "imphash" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewImphashOutputWithDefaults instantiates a new ImphashOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImphashOutputWithDefaults() *ImphashOutput { + this := ImphashOutput{} + var type_ string = "imphash" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *ImphashOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *ImphashOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *ImphashOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ImphashOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImphashOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ImphashOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ImphashOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ImphashOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImphashOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ImphashOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ImphashOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *ImphashOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImphashOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *ImphashOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *ImphashOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *ImphashOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImphashOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *ImphashOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *ImphashOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *ImphashOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ImphashOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ImphashOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *ImphashOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *ImphashOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *ImphashOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *ImphashOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *ImphashOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *ImphashOutput) SetRootType(v string) { + o.RootType = v +} + +func (o ImphashOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImphashOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *ImphashOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImphashOutput := _ImphashOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImphashOutput) + + if err != nil { + return err + } + + *o = ImphashOutput(varImphashOutput) + + return err +} + +type NullableImphashOutput struct { + value *ImphashOutput + isSet bool +} + +func (v NullableImphashOutput) Get() *ImphashOutput { + return v.value +} + +func (v *NullableImphashOutput) Set(val *ImphashOutput) { + v.value = val + v.isSet = true +} + +func (v NullableImphashOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableImphashOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImphashOutput(val *ImphashOutput) *NullableImphashOutput { + return &NullableImphashOutput{value: val, isSet: true} +} + +func (v NullableImphashOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImphashOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicator.go b/model_indicator.go new file mode 100644 index 0000000..9528125 --- /dev/null +++ b/model_indicator.go @@ -0,0 +1,621 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Indicator type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Indicator{} + +// Indicator struct for Indicator +type Indicator struct { + Name string `json:"name"` + Type string `json:"type"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _Indicator Indicator + +// NewIndicator instantiates a new Indicator object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIndicator(name string, type_ string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string) *Indicator { + this := Indicator{} + this.Name = name + this.Type = type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewIndicatorWithDefaults instantiates a new Indicator object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIndicatorWithDefaults() *Indicator { + this := Indicator{} + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *Indicator) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Indicator) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Indicator) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *Indicator) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Indicator) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Indicator) SetType(v string) { + o.Type = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Indicator) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Indicator) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Indicator) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Indicator) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *Indicator) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Indicator) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *Indicator) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *Indicator) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *Indicator) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Indicator) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *Indicator) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *Indicator) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *Indicator) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Indicator) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *Indicator) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *Indicator) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *Indicator) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Indicator) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *Indicator) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *Indicator) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *Indicator) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *Indicator) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *Indicator) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *Indicator) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Indicator) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *Indicator) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *Indicator) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *Indicator) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *Indicator) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *Indicator) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *Indicator) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Indicator) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *Indicator) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *Indicator) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *Indicator) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Indicator) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *Indicator) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *Indicator) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetId returns the Id field value +func (o *Indicator) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Indicator) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Indicator) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *Indicator) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *Indicator) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *Indicator) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *Indicator) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *Indicator) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *Indicator) SetRootType(v string) { + o.RootType = v +} + +func (o Indicator) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Indicator) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *Indicator) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + "pattern", + "diamond", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIndicator := _Indicator{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIndicator) + + if err != nil { + return err + } + + *o = Indicator(varIndicator) + + return err +} + +type NullableIndicator struct { + value *Indicator + isSet bool +} + +func (v NullableIndicator) Get() *Indicator { + return v.value +} + +func (v *NullableIndicator) Set(val *Indicator) { + v.value = val + v.isSet = true +} + +func (v NullableIndicator) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicator) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicator(val *Indicator) *NullableIndicator { + return &NullableIndicator{value: val, isSet: true} +} + +func (v NullableIndicator) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicator) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicator_1.go b/model_indicator_1.go new file mode 100644 index 0000000..b77e8be --- /dev/null +++ b/model_indicator_1.go @@ -0,0 +1,290 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// Indicator1 - struct for Indicator1 +type Indicator1 struct { + ForensicArtifactInput *ForensicArtifactInput + QueryInput *QueryInput + RegexInput *RegexInput + SigmaInput *SigmaInput + SuricataInput *SuricataInput + YaraInput *YaraInput +} + +// ForensicArtifactInputAsIndicator1 is a convenience function that returns ForensicArtifactInput wrapped in Indicator1 +func ForensicArtifactInputAsIndicator1(v *ForensicArtifactInput) Indicator1 { + return Indicator1{ + ForensicArtifactInput: v, + } +} + +// QueryInputAsIndicator1 is a convenience function that returns QueryInput wrapped in Indicator1 +func QueryInputAsIndicator1(v *QueryInput) Indicator1 { + return Indicator1{ + QueryInput: v, + } +} + +// RegexInputAsIndicator1 is a convenience function that returns RegexInput wrapped in Indicator1 +func RegexInputAsIndicator1(v *RegexInput) Indicator1 { + return Indicator1{ + RegexInput: v, + } +} + +// SigmaInputAsIndicator1 is a convenience function that returns SigmaInput wrapped in Indicator1 +func SigmaInputAsIndicator1(v *SigmaInput) Indicator1 { + return Indicator1{ + SigmaInput: v, + } +} + +// SuricataInputAsIndicator1 is a convenience function that returns SuricataInput wrapped in Indicator1 +func SuricataInputAsIndicator1(v *SuricataInput) Indicator1 { + return Indicator1{ + SuricataInput: v, + } +} + +// YaraInputAsIndicator1 is a convenience function that returns YaraInput wrapped in Indicator1 +func YaraInputAsIndicator1(v *YaraInput) Indicator1 { + return Indicator1{ + YaraInput: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *Indicator1) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ForensicArtifactInput + err = newStrictDecoder(data).Decode(&dst.ForensicArtifactInput) + if err == nil { + jsonForensicArtifactInput, _ := json.Marshal(dst.ForensicArtifactInput) + if string(jsonForensicArtifactInput) == "{}" { // empty struct + dst.ForensicArtifactInput = nil + } else { + if err = validator.Validate(dst.ForensicArtifactInput); err != nil { + dst.ForensicArtifactInput = nil + } else { + match++ + } + } + } else { + dst.ForensicArtifactInput = nil + } + + // try to unmarshal data into QueryInput + err = newStrictDecoder(data).Decode(&dst.QueryInput) + if err == nil { + jsonQueryInput, _ := json.Marshal(dst.QueryInput) + if string(jsonQueryInput) == "{}" { // empty struct + dst.QueryInput = nil + } else { + if err = validator.Validate(dst.QueryInput); err != nil { + dst.QueryInput = nil + } else { + match++ + } + } + } else { + dst.QueryInput = nil + } + + // try to unmarshal data into RegexInput + err = newStrictDecoder(data).Decode(&dst.RegexInput) + if err == nil { + jsonRegexInput, _ := json.Marshal(dst.RegexInput) + if string(jsonRegexInput) == "{}" { // empty struct + dst.RegexInput = nil + } else { + if err = validator.Validate(dst.RegexInput); err != nil { + dst.RegexInput = nil + } else { + match++ + } + } + } else { + dst.RegexInput = nil + } + + // try to unmarshal data into SigmaInput + err = newStrictDecoder(data).Decode(&dst.SigmaInput) + if err == nil { + jsonSigmaInput, _ := json.Marshal(dst.SigmaInput) + if string(jsonSigmaInput) == "{}" { // empty struct + dst.SigmaInput = nil + } else { + if err = validator.Validate(dst.SigmaInput); err != nil { + dst.SigmaInput = nil + } else { + match++ + } + } + } else { + dst.SigmaInput = nil + } + + // try to unmarshal data into SuricataInput + err = newStrictDecoder(data).Decode(&dst.SuricataInput) + if err == nil { + jsonSuricataInput, _ := json.Marshal(dst.SuricataInput) + if string(jsonSuricataInput) == "{}" { // empty struct + dst.SuricataInput = nil + } else { + if err = validator.Validate(dst.SuricataInput); err != nil { + dst.SuricataInput = nil + } else { + match++ + } + } + } else { + dst.SuricataInput = nil + } + + // try to unmarshal data into YaraInput + err = newStrictDecoder(data).Decode(&dst.YaraInput) + if err == nil { + jsonYaraInput, _ := json.Marshal(dst.YaraInput) + if string(jsonYaraInput) == "{}" { // empty struct + dst.YaraInput = nil + } else { + if err = validator.Validate(dst.YaraInput); err != nil { + dst.YaraInput = nil + } else { + match++ + } + } + } else { + dst.YaraInput = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ForensicArtifactInput = nil + dst.QueryInput = nil + dst.RegexInput = nil + dst.SigmaInput = nil + dst.SuricataInput = nil + dst.YaraInput = nil + + return fmt.Errorf("data matches more than one schema in oneOf(Indicator1)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(Indicator1)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Indicator1) MarshalJSON() ([]byte, error) { + if src.ForensicArtifactInput != nil { + return json.Marshal(&src.ForensicArtifactInput) + } + + if src.QueryInput != nil { + return json.Marshal(&src.QueryInput) + } + + if src.RegexInput != nil { + return json.Marshal(&src.RegexInput) + } + + if src.SigmaInput != nil { + return json.Marshal(&src.SigmaInput) + } + + if src.SuricataInput != nil { + return json.Marshal(&src.SuricataInput) + } + + if src.YaraInput != nil { + return json.Marshal(&src.YaraInput) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *Indicator1) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ForensicArtifactInput != nil { + return obj.ForensicArtifactInput + } + + if obj.QueryInput != nil { + return obj.QueryInput + } + + if obj.RegexInput != nil { + return obj.RegexInput + } + + if obj.SigmaInput != nil { + return obj.SigmaInput + } + + if obj.SuricataInput != nil { + return obj.SuricataInput + } + + if obj.YaraInput != nil { + return obj.YaraInput + } + + // all schemas are nil + return nil +} + +type NullableIndicator1 struct { + value *Indicator1 + isSet bool +} + +func (v NullableIndicator1) Get() *Indicator1 { + return v.value +} + +func (v *NullableIndicator1) Set(val *Indicator1) { + v.value = val + v.isSet = true +} + +func (v NullableIndicator1) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicator1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicator1(val *Indicator1) *NullableIndicator1 { + return &NullableIndicator1{value: val, isSet: true} +} + +func (v NullableIndicator1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicator1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicator_search_request.go b/model_indicator_search_request.go new file mode 100644 index 0000000..7e04251 --- /dev/null +++ b/model_indicator_search_request.go @@ -0,0 +1,346 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the IndicatorSearchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IndicatorSearchRequest{} + +// IndicatorSearchRequest struct for IndicatorSearchRequest +type IndicatorSearchRequest struct { + Query map[string]QueryValue `json:"query,omitempty"` + Type *IndicatorSearchRequestType `json:"type,omitempty"` + Sorting [][]interface{} `json:"sorting,omitempty"` + FilterAliases [][]interface{} `json:"filter_aliases,omitempty"` + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _IndicatorSearchRequest IndicatorSearchRequest + +// NewIndicatorSearchRequest instantiates a new IndicatorSearchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIndicatorSearchRequest() *IndicatorSearchRequest { + this := IndicatorSearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// NewIndicatorSearchRequestWithDefaults instantiates a new IndicatorSearchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIndicatorSearchRequestWithDefaults() *IndicatorSearchRequest { + this := IndicatorSearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *IndicatorSearchRequest) GetQuery() map[string]QueryValue { + if o == nil || IsNil(o.Query) { + var ret map[string]QueryValue + return ret + } + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorSearchRequest) GetQueryOk() (map[string]QueryValue, bool) { + if o == nil || IsNil(o.Query) { + return map[string]QueryValue{}, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *IndicatorSearchRequest) HasQuery() bool { + if o != nil && !IsNil(o.Query) { + return true + } + + return false +} + +// SetQuery gets a reference to the given map[string]QueryValue and assigns it to the Query field. +func (o *IndicatorSearchRequest) SetQuery(v map[string]QueryValue) { + o.Query = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IndicatorSearchRequest) GetType() IndicatorSearchRequestType { + if o == nil || IsNil(o.Type) { + var ret IndicatorSearchRequestType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorSearchRequest) GetTypeOk() (*IndicatorSearchRequestType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IndicatorSearchRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given IndicatorSearchRequestType and assigns it to the Type field. +func (o *IndicatorSearchRequest) SetType(v IndicatorSearchRequestType) { + o.Type = &v +} + +// GetSorting returns the Sorting field value if set, zero value otherwise. +func (o *IndicatorSearchRequest) GetSorting() [][]interface{} { + if o == nil || IsNil(o.Sorting) { + var ret [][]interface{} + return ret + } + return o.Sorting +} + +// GetSortingOk returns a tuple with the Sorting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorSearchRequest) GetSortingOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.Sorting) { + return nil, false + } + return o.Sorting, true +} + +// HasSorting returns a boolean if a field has been set. +func (o *IndicatorSearchRequest) HasSorting() bool { + if o != nil && !IsNil(o.Sorting) { + return true + } + + return false +} + +// SetSorting gets a reference to the given [][]interface{} and assigns it to the Sorting field. +func (o *IndicatorSearchRequest) SetSorting(v [][]interface{}) { + o.Sorting = v +} + +// GetFilterAliases returns the FilterAliases field value if set, zero value otherwise. +func (o *IndicatorSearchRequest) GetFilterAliases() [][]interface{} { + if o == nil || IsNil(o.FilterAliases) { + var ret [][]interface{} + return ret + } + return o.FilterAliases +} + +// GetFilterAliasesOk returns a tuple with the FilterAliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorSearchRequest) GetFilterAliasesOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.FilterAliases) { + return nil, false + } + return o.FilterAliases, true +} + +// HasFilterAliases returns a boolean if a field has been set. +func (o *IndicatorSearchRequest) HasFilterAliases() bool { + if o != nil && !IsNil(o.FilterAliases) { + return true + } + + return false +} + +// SetFilterAliases gets a reference to the given [][]interface{} and assigns it to the FilterAliases field. +func (o *IndicatorSearchRequest) SetFilterAliases(v [][]interface{}) { + o.FilterAliases = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *IndicatorSearchRequest) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorSearchRequest) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *IndicatorSearchRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *IndicatorSearchRequest) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *IndicatorSearchRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorSearchRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *IndicatorSearchRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *IndicatorSearchRequest) SetPage(v int32) { + o.Page = &v +} + +func (o IndicatorSearchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndicatorSearchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Query) { + toSerialize["query"] = o.Query + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Sorting) { + toSerialize["sorting"] = o.Sorting + } + if !IsNil(o.FilterAliases) { + toSerialize["filter_aliases"] = o.FilterAliases + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *IndicatorSearchRequest) UnmarshalJSON(data []byte) (err error) { + varIndicatorSearchRequest := _IndicatorSearchRequest{} + + err = json.Unmarshal(data, &varIndicatorSearchRequest) + + if err != nil { + return err + } + + *o = IndicatorSearchRequest(varIndicatorSearchRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "query") + delete(additionalProperties, "type") + delete(additionalProperties, "sorting") + delete(additionalProperties, "filter_aliases") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableIndicatorSearchRequest struct { + value *IndicatorSearchRequest + isSet bool +} + +func (v NullableIndicatorSearchRequest) Get() *IndicatorSearchRequest { + return v.value +} + +func (v *NullableIndicatorSearchRequest) Set(val *IndicatorSearchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorSearchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorSearchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorSearchRequest(val *IndicatorSearchRequest) *NullableIndicatorSearchRequest { + return &NullableIndicatorSearchRequest{value: val, isSet: true} +} + +func (v NullableIndicatorSearchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorSearchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicator_search_request_type.go b/model_indicator_search_request_type.go new file mode 100644 index 0000000..cbb1222 --- /dev/null +++ b/model_indicator_search_request_type.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// IndicatorSearchRequestType struct for IndicatorSearchRequestType +type IndicatorSearchRequestType struct { + IndicatorType *IndicatorType +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *IndicatorSearchRequestType) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into IndicatorType + err = json.Unmarshal(data, &dst.IndicatorType) + if err == nil { + jsonIndicatorType, _ := json.Marshal(dst.IndicatorType) + if string(jsonIndicatorType) == "{}" { // empty struct + dst.IndicatorType = nil + } else { + return nil // data stored in dst.IndicatorType, return on the first match + } + } else { + dst.IndicatorType = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(IndicatorSearchRequestType)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src IndicatorSearchRequestType) MarshalJSON() ([]byte, error) { + if src.IndicatorType != nil { + return json.Marshal(&src.IndicatorType) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableIndicatorSearchRequestType struct { + value *IndicatorSearchRequestType + isSet bool +} + +func (v NullableIndicatorSearchRequestType) Get() *IndicatorSearchRequestType { + return v.value +} + +func (v *NullableIndicatorSearchRequestType) Set(val *IndicatorSearchRequestType) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorSearchRequestType) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorSearchRequestType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorSearchRequestType(val *IndicatorSearchRequestType) *NullableIndicatorSearchRequestType { + return &NullableIndicatorSearchRequestType{value: val, isSet: true} +} + +func (v NullableIndicatorSearchRequestType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorSearchRequestType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicator_search_response.go b/model_indicator_search_response.go new file mode 100644 index 0000000..7b37d4e --- /dev/null +++ b/model_indicator_search_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the IndicatorSearchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IndicatorSearchResponse{} + +// IndicatorSearchResponse struct for IndicatorSearchResponse +type IndicatorSearchResponse struct { + Indicators []IndicatorsInner `json:"indicators"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _IndicatorSearchResponse IndicatorSearchResponse + +// NewIndicatorSearchResponse instantiates a new IndicatorSearchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIndicatorSearchResponse(indicators []IndicatorsInner, total int32) *IndicatorSearchResponse { + this := IndicatorSearchResponse{} + this.Indicators = indicators + this.Total = total + return &this +} + +// NewIndicatorSearchResponseWithDefaults instantiates a new IndicatorSearchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIndicatorSearchResponseWithDefaults() *IndicatorSearchResponse { + this := IndicatorSearchResponse{} + return &this +} + +// GetIndicators returns the Indicators field value +func (o *IndicatorSearchResponse) GetIndicators() []IndicatorsInner { + if o == nil { + var ret []IndicatorsInner + return ret + } + + return o.Indicators +} + +// GetIndicatorsOk returns a tuple with the Indicators field value +// and a boolean to check if the value has been set. +func (o *IndicatorSearchResponse) GetIndicatorsOk() ([]IndicatorsInner, bool) { + if o == nil { + return nil, false + } + return o.Indicators, true +} + +// SetIndicators sets field value +func (o *IndicatorSearchResponse) SetIndicators(v []IndicatorsInner) { + o.Indicators = v +} + +// GetTotal returns the Total field value +func (o *IndicatorSearchResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *IndicatorSearchResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *IndicatorSearchResponse) SetTotal(v int32) { + o.Total = v +} + +func (o IndicatorSearchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndicatorSearchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["indicators"] = o.Indicators + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *IndicatorSearchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "indicators", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIndicatorSearchResponse := _IndicatorSearchResponse{} + + err = json.Unmarshal(data, &varIndicatorSearchResponse) + + if err != nil { + return err + } + + *o = IndicatorSearchResponse(varIndicatorSearchResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "indicators") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableIndicatorSearchResponse struct { + value *IndicatorSearchResponse + isSet bool +} + +func (v NullableIndicatorSearchResponse) Get() *IndicatorSearchResponse { + return v.value +} + +func (v *NullableIndicatorSearchResponse) Set(val *IndicatorSearchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorSearchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorSearchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorSearchResponse(val *IndicatorSearchResponse) *NullableIndicatorSearchResponse { + return &NullableIndicatorSearchResponse{value: val, isSet: true} +} + +func (v NullableIndicatorSearchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorSearchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicator_tag_request.go b/model_indicator_tag_request.go new file mode 100644 index 0000000..f571137 --- /dev/null +++ b/model_indicator_tag_request.go @@ -0,0 +1,244 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the IndicatorTagRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IndicatorTagRequest{} + +// IndicatorTagRequest struct for IndicatorTagRequest +type IndicatorTagRequest struct { + Ids []string `json:"ids"` + Tags []string `json:"tags,omitempty"` + Strict *bool `json:"strict,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _IndicatorTagRequest IndicatorTagRequest + +// NewIndicatorTagRequest instantiates a new IndicatorTagRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIndicatorTagRequest(ids []string) *IndicatorTagRequest { + this := IndicatorTagRequest{} + this.Ids = ids + var strict bool = false + this.Strict = &strict + return &this +} + +// NewIndicatorTagRequestWithDefaults instantiates a new IndicatorTagRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIndicatorTagRequestWithDefaults() *IndicatorTagRequest { + this := IndicatorTagRequest{} + var strict bool = false + this.Strict = &strict + return &this +} + +// GetIds returns the Ids field value +func (o *IndicatorTagRequest) GetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value +// and a boolean to check if the value has been set. +func (o *IndicatorTagRequest) GetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Ids, true +} + +// SetIds sets field value +func (o *IndicatorTagRequest) SetIds(v []string) { + o.Ids = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *IndicatorTagRequest) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorTagRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *IndicatorTagRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *IndicatorTagRequest) SetTags(v []string) { + o.Tags = v +} + +// GetStrict returns the Strict field value if set, zero value otherwise. +func (o *IndicatorTagRequest) GetStrict() bool { + if o == nil || IsNil(o.Strict) { + var ret bool + return ret + } + return *o.Strict +} + +// GetStrictOk returns a tuple with the Strict field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorTagRequest) GetStrictOk() (*bool, bool) { + if o == nil || IsNil(o.Strict) { + return nil, false + } + return o.Strict, true +} + +// HasStrict returns a boolean if a field has been set. +func (o *IndicatorTagRequest) HasStrict() bool { + if o != nil && !IsNil(o.Strict) { + return true + } + + return false +} + +// SetStrict gets a reference to the given bool and assigns it to the Strict field. +func (o *IndicatorTagRequest) SetStrict(v bool) { + o.Strict = &v +} + +func (o IndicatorTagRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndicatorTagRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ids"] = o.Ids + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Strict) { + toSerialize["strict"] = o.Strict + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *IndicatorTagRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIndicatorTagRequest := _IndicatorTagRequest{} + + err = json.Unmarshal(data, &varIndicatorTagRequest) + + if err != nil { + return err + } + + *o = IndicatorTagRequest(varIndicatorTagRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "ids") + delete(additionalProperties, "tags") + delete(additionalProperties, "strict") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableIndicatorTagRequest struct { + value *IndicatorTagRequest + isSet bool +} + +func (v NullableIndicatorTagRequest) Get() *IndicatorTagRequest { + return v.value +} + +func (v *NullableIndicatorTagRequest) Set(val *IndicatorTagRequest) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorTagRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorTagRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorTagRequest(val *IndicatorTagRequest) *NullableIndicatorTagRequest { + return &NullableIndicatorTagRequest{value: val, isSet: true} +} + +func (v NullableIndicatorTagRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorTagRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicator_tag_response.go b/model_indicator_tag_response.go new file mode 100644 index 0000000..029716f --- /dev/null +++ b/model_indicator_tag_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the IndicatorTagResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IndicatorTagResponse{} + +// IndicatorTagResponse struct for IndicatorTagResponse +type IndicatorTagResponse struct { + Tagged int32 `json:"tagged"` + Tags map[string]map[string]TagRelationshipOutput `json:"tags"` + AdditionalProperties map[string]interface{} +} + +type _IndicatorTagResponse IndicatorTagResponse + +// NewIndicatorTagResponse instantiates a new IndicatorTagResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIndicatorTagResponse(tagged int32, tags map[string]map[string]TagRelationshipOutput) *IndicatorTagResponse { + this := IndicatorTagResponse{} + this.Tagged = tagged + this.Tags = tags + return &this +} + +// NewIndicatorTagResponseWithDefaults instantiates a new IndicatorTagResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIndicatorTagResponseWithDefaults() *IndicatorTagResponse { + this := IndicatorTagResponse{} + return &this +} + +// GetTagged returns the Tagged field value +func (o *IndicatorTagResponse) GetTagged() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Tagged +} + +// GetTaggedOk returns a tuple with the Tagged field value +// and a boolean to check if the value has been set. +func (o *IndicatorTagResponse) GetTaggedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Tagged, true +} + +// SetTagged sets field value +func (o *IndicatorTagResponse) SetTagged(v int32) { + o.Tagged = v +} + +// GetTags returns the Tags field value +func (o *IndicatorTagResponse) GetTags() map[string]map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *IndicatorTagResponse) GetTagsOk() (map[string]map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *IndicatorTagResponse) SetTags(v map[string]map[string]TagRelationshipOutput) { + o.Tags = v +} + +func (o IndicatorTagResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndicatorTagResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tagged"] = o.Tagged + toSerialize["tags"] = o.Tags + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *IndicatorTagResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tagged", + "tags", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIndicatorTagResponse := _IndicatorTagResponse{} + + err = json.Unmarshal(data, &varIndicatorTagResponse) + + if err != nil { + return err + } + + *o = IndicatorTagResponse(varIndicatorTagResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tagged") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableIndicatorTagResponse struct { + value *IndicatorTagResponse + isSet bool +} + +func (v NullableIndicatorTagResponse) Get() *IndicatorTagResponse { + return v.value +} + +func (v *NullableIndicatorTagResponse) Set(val *IndicatorTagResponse) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorTagResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorTagResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorTagResponse(val *IndicatorTagResponse) *NullableIndicatorTagResponse { + return &NullableIndicatorTagResponse{value: val, isSet: true} +} + +func (v NullableIndicatorTagResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorTagResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicator_type.go b/model_indicator_type.go new file mode 100644 index 0000000..4a0cf90 --- /dev/null +++ b/model_indicator_type.go @@ -0,0 +1,118 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// IndicatorType the model 'IndicatorType' +type IndicatorType string + +// List of IndicatorType +const ( + QUERY IndicatorType = "query" + SIGMA IndicatorType = "sigma" + REGEX IndicatorType = "regex" + FORENSICARTIFACT IndicatorType = "forensicartifact" + SURICATA IndicatorType = "suricata" + YARA IndicatorType = "yara" +) + +// All allowed values of IndicatorType enum +var AllowedIndicatorTypeEnumValues = []IndicatorType{ + "query", + "sigma", + "regex", + "forensicartifact", + "suricata", + "yara", +} + +func (v *IndicatorType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := IndicatorType(value) + for _, existing := range AllowedIndicatorTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid IndicatorType", value) +} + +// NewIndicatorTypeFromValue returns a pointer to a valid IndicatorType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewIndicatorTypeFromValue(v string) (*IndicatorType, error) { + ev := IndicatorType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for IndicatorType: valid values are %v", v, AllowedIndicatorTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v IndicatorType) IsValid() bool { + for _, existing := range AllowedIndicatorTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to IndicatorType value +func (v IndicatorType) Ptr() *IndicatorType { + return &v +} + +type NullableIndicatorType struct { + value *IndicatorType + isSet bool +} + +func (v NullableIndicatorType) Get() *IndicatorType { + return v.value +} + +func (v *NullableIndicatorType) Set(val *IndicatorType) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorType) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorType(val *IndicatorType) *NullableIndicatorType { + return &NullableIndicatorType{value: val, isSet: true} +} + +func (v NullableIndicatorType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_indicators_inner.go b/model_indicators_inner.go new file mode 100644 index 0000000..efe5f0a --- /dev/null +++ b/model_indicators_inner.go @@ -0,0 +1,175 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// IndicatorsInner struct for IndicatorsInner +type IndicatorsInner struct { + ForensicArtifactOutput *ForensicArtifactOutput + QueryOutput *QueryOutput + RegexOutput *RegexOutput + SigmaOutput *SigmaOutput + SuricataOutput *SuricataOutput + YaraOutput *YaraOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *IndicatorsInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ForensicArtifactOutput + err = json.Unmarshal(data, &dst.ForensicArtifactOutput) + if err == nil { + jsonForensicArtifactOutput, _ := json.Marshal(dst.ForensicArtifactOutput) + if string(jsonForensicArtifactOutput) == "{}" { // empty struct + dst.ForensicArtifactOutput = nil + } else { + return nil // data stored in dst.ForensicArtifactOutput, return on the first match + } + } else { + dst.ForensicArtifactOutput = nil + } + + // try to unmarshal JSON data into QueryOutput + err = json.Unmarshal(data, &dst.QueryOutput) + if err == nil { + jsonQueryOutput, _ := json.Marshal(dst.QueryOutput) + if string(jsonQueryOutput) == "{}" { // empty struct + dst.QueryOutput = nil + } else { + return nil // data stored in dst.QueryOutput, return on the first match + } + } else { + dst.QueryOutput = nil + } + + // try to unmarshal JSON data into RegexOutput + err = json.Unmarshal(data, &dst.RegexOutput) + if err == nil { + jsonRegexOutput, _ := json.Marshal(dst.RegexOutput) + if string(jsonRegexOutput) == "{}" { // empty struct + dst.RegexOutput = nil + } else { + return nil // data stored in dst.RegexOutput, return on the first match + } + } else { + dst.RegexOutput = nil + } + + // try to unmarshal JSON data into SigmaOutput + err = json.Unmarshal(data, &dst.SigmaOutput) + if err == nil { + jsonSigmaOutput, _ := json.Marshal(dst.SigmaOutput) + if string(jsonSigmaOutput) == "{}" { // empty struct + dst.SigmaOutput = nil + } else { + return nil // data stored in dst.SigmaOutput, return on the first match + } + } else { + dst.SigmaOutput = nil + } + + // try to unmarshal JSON data into SuricataOutput + err = json.Unmarshal(data, &dst.SuricataOutput) + if err == nil { + jsonSuricataOutput, _ := json.Marshal(dst.SuricataOutput) + if string(jsonSuricataOutput) == "{}" { // empty struct + dst.SuricataOutput = nil + } else { + return nil // data stored in dst.SuricataOutput, return on the first match + } + } else { + dst.SuricataOutput = nil + } + + // try to unmarshal JSON data into YaraOutput + err = json.Unmarshal(data, &dst.YaraOutput) + if err == nil { + jsonYaraOutput, _ := json.Marshal(dst.YaraOutput) + if string(jsonYaraOutput) == "{}" { // empty struct + dst.YaraOutput = nil + } else { + return nil // data stored in dst.YaraOutput, return on the first match + } + } else { + dst.YaraOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(IndicatorsInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src IndicatorsInner) MarshalJSON() ([]byte, error) { + if src.ForensicArtifactOutput != nil { + return json.Marshal(&src.ForensicArtifactOutput) + } + + if src.QueryOutput != nil { + return json.Marshal(&src.QueryOutput) + } + + if src.RegexOutput != nil { + return json.Marshal(&src.RegexOutput) + } + + if src.SigmaOutput != nil { + return json.Marshal(&src.SigmaOutput) + } + + if src.SuricataOutput != nil { + return json.Marshal(&src.SuricataOutput) + } + + if src.YaraOutput != nil { + return json.Marshal(&src.YaraOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableIndicatorsInner struct { + value *IndicatorsInner + isSet bool +} + +func (v NullableIndicatorsInner) Get() *IndicatorsInner { + return v.value +} + +func (v *NullableIndicatorsInner) Set(val *IndicatorsInner) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorsInner(val *IndicatorsInner) *NullableIndicatorsInner { + return &NullableIndicatorsInner{value: val, isSet: true} +} + +func (v NullableIndicatorsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_intrusion_set_input.go b/model_intrusion_set_input.go new file mode 100644 index 0000000..5814b73 --- /dev/null +++ b/model_intrusion_set_input.go @@ -0,0 +1,453 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IntrusionSetInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IntrusionSetInput{} + +// IntrusionSetInput struct for IntrusionSetInput +type IntrusionSetInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Aliases []string `json:"aliases,omitempty"` + FirstSeen *time.Time `json:"first_seen,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` +} + +type _IntrusionSetInput IntrusionSetInput + +// NewIntrusionSetInput instantiates a new IntrusionSetInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIntrusionSetInput(name string) *IntrusionSetInput { + this := IntrusionSetInput{} + var type_ string = "intrusion-set" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + return &this +} + +// NewIntrusionSetInputWithDefaults instantiates a new IntrusionSetInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIntrusionSetInputWithDefaults() *IntrusionSetInput { + this := IntrusionSetInput{} + var type_ string = "intrusion-set" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IntrusionSetInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IntrusionSetInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IntrusionSetInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *IntrusionSetInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *IntrusionSetInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *IntrusionSetInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *IntrusionSetInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *IntrusionSetInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IntrusionSetInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IntrusionSetInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IntrusionSetInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IntrusionSetInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IntrusionSetInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IntrusionSetInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *IntrusionSetInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *IntrusionSetInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *IntrusionSetInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *IntrusionSetInput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *IntrusionSetInput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *IntrusionSetInput) SetAliases(v []string) { + o.Aliases = v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *IntrusionSetInput) GetFirstSeen() time.Time { + if o == nil || IsNil(o.FirstSeen) { + var ret time.Time + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetFirstSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *IntrusionSetInput) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given time.Time and assigns it to the FirstSeen field. +func (o *IntrusionSetInput) SetFirstSeen(v time.Time) { + o.FirstSeen = &v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *IntrusionSetInput) GetLastSeen() time.Time { + if o == nil || IsNil(o.LastSeen) { + var ret time.Time + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetInput) GetLastSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *IntrusionSetInput) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given time.Time and assigns it to the LastSeen field. +func (o *IntrusionSetInput) SetLastSeen(v time.Time) { + o.LastSeen = &v +} + +func (o IntrusionSetInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IntrusionSetInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + return toSerialize, nil +} + +func (o *IntrusionSetInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIntrusionSetInput := _IntrusionSetInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIntrusionSetInput) + + if err != nil { + return err + } + + *o = IntrusionSetInput(varIntrusionSetInput) + + return err +} + +type NullableIntrusionSetInput struct { + value *IntrusionSetInput + isSet bool +} + +func (v NullableIntrusionSetInput) Get() *IntrusionSetInput { + return v.value +} + +func (v *NullableIntrusionSetInput) Set(val *IntrusionSetInput) { + v.value = val + v.isSet = true +} + +func (v NullableIntrusionSetInput) IsSet() bool { + return v.isSet +} + +func (v *NullableIntrusionSetInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIntrusionSetInput(val *IntrusionSetInput) *NullableIntrusionSetInput { + return &NullableIntrusionSetInput{value: val, isSet: true} +} + +func (v NullableIntrusionSetInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIntrusionSetInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_intrusion_set_output.go b/model_intrusion_set_output.go new file mode 100644 index 0000000..e0e8d05 --- /dev/null +++ b/model_intrusion_set_output.go @@ -0,0 +1,565 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IntrusionSetOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IntrusionSetOutput{} + +// IntrusionSetOutput struct for IntrusionSetOutput +type IntrusionSetOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Aliases []string `json:"aliases,omitempty"` + FirstSeen *time.Time `json:"first_seen,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _IntrusionSetOutput IntrusionSetOutput + +// NewIntrusionSetOutput instantiates a new IntrusionSetOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIntrusionSetOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *IntrusionSetOutput { + this := IntrusionSetOutput{} + var type_ string = "intrusion-set" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewIntrusionSetOutputWithDefaults instantiates a new IntrusionSetOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIntrusionSetOutputWithDefaults() *IntrusionSetOutput { + this := IntrusionSetOutput{} + var type_ string = "intrusion-set" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IntrusionSetOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IntrusionSetOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IntrusionSetOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *IntrusionSetOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *IntrusionSetOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *IntrusionSetOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *IntrusionSetOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *IntrusionSetOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IntrusionSetOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IntrusionSetOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IntrusionSetOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IntrusionSetOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IntrusionSetOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IntrusionSetOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *IntrusionSetOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *IntrusionSetOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *IntrusionSetOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *IntrusionSetOutput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *IntrusionSetOutput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *IntrusionSetOutput) SetAliases(v []string) { + o.Aliases = v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *IntrusionSetOutput) GetFirstSeen() time.Time { + if o == nil || IsNil(o.FirstSeen) { + var ret time.Time + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetFirstSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *IntrusionSetOutput) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given time.Time and assigns it to the FirstSeen field. +func (o *IntrusionSetOutput) SetFirstSeen(v time.Time) { + o.FirstSeen = &v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *IntrusionSetOutput) GetLastSeen() time.Time { + if o == nil || IsNil(o.LastSeen) { + var ret time.Time + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetLastSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *IntrusionSetOutput) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given time.Time and assigns it to the LastSeen field. +func (o *IntrusionSetOutput) SetLastSeen(v time.Time) { + o.LastSeen = &v +} + +// GetId returns the Id field value +func (o *IntrusionSetOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *IntrusionSetOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *IntrusionSetOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *IntrusionSetOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *IntrusionSetOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *IntrusionSetOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *IntrusionSetOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *IntrusionSetOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *IntrusionSetOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o IntrusionSetOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IntrusionSetOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *IntrusionSetOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIntrusionSetOutput := _IntrusionSetOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIntrusionSetOutput) + + if err != nil { + return err + } + + *o = IntrusionSetOutput(varIntrusionSetOutput) + + return err +} + +type NullableIntrusionSetOutput struct { + value *IntrusionSetOutput + isSet bool +} + +func (v NullableIntrusionSetOutput) Get() *IntrusionSetOutput { + return v.value +} + +func (v *NullableIntrusionSetOutput) Set(val *IntrusionSetOutput) { + v.value = val + v.isSet = true +} + +func (v NullableIntrusionSetOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableIntrusionSetOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIntrusionSetOutput(val *IntrusionSetOutput) *NullableIntrusionSetOutput { + return &NullableIntrusionSetOutput{value: val, isSet: true} +} + +func (v NullableIntrusionSetOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIntrusionSetOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_investigation_input.go b/model_investigation_input.go new file mode 100644 index 0000000..5469965 --- /dev/null +++ b/model_investigation_input.go @@ -0,0 +1,385 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the InvestigationInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InvestigationInput{} + +// InvestigationInput struct for InvestigationInput +type InvestigationInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Reference *string `json:"reference,omitempty"` +} + +type _InvestigationInput InvestigationInput + +// NewInvestigationInput instantiates a new InvestigationInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInvestigationInput(name string) *InvestigationInput { + this := InvestigationInput{} + var type_ string = "investigation" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var reference string = "" + this.Reference = &reference + return &this +} + +// NewInvestigationInputWithDefaults instantiates a new InvestigationInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInvestigationInputWithDefaults() *InvestigationInput { + this := InvestigationInput{} + var type_ string = "investigation" + this.Type = &type_ + var description string = "" + this.Description = &description + var reference string = "" + this.Reference = &reference + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *InvestigationInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *InvestigationInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *InvestigationInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *InvestigationInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *InvestigationInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *InvestigationInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *InvestigationInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *InvestigationInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *InvestigationInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *InvestigationInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *InvestigationInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *InvestigationInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *InvestigationInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *InvestigationInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *InvestigationInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *InvestigationInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *InvestigationInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *InvestigationInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *InvestigationInput) GetReference() string { + if o == nil || IsNil(o.Reference) { + var ret string + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationInput) GetReferenceOk() (*string, bool) { + if o == nil || IsNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *InvestigationInput) HasReference() bool { + if o != nil && !IsNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given string and assigns it to the Reference field. +func (o *InvestigationInput) SetReference(v string) { + o.Reference = &v +} + +func (o InvestigationInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InvestigationInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + return toSerialize, nil +} + +func (o *InvestigationInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInvestigationInput := _InvestigationInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInvestigationInput) + + if err != nil { + return err + } + + *o = InvestigationInput(varInvestigationInput) + + return err +} + +type NullableInvestigationInput struct { + value *InvestigationInput + isSet bool +} + +func (v NullableInvestigationInput) Get() *InvestigationInput { + return v.value +} + +func (v *NullableInvestigationInput) Set(val *InvestigationInput) { + v.value = val + v.isSet = true +} + +func (v NullableInvestigationInput) IsSet() bool { + return v.isSet +} + +func (v *NullableInvestigationInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInvestigationInput(val *InvestigationInput) *NullableInvestigationInput { + return &NullableInvestigationInput{value: val, isSet: true} +} + +func (v NullableInvestigationInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInvestigationInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_investigation_output.go b/model_investigation_output.go new file mode 100644 index 0000000..9485f6a --- /dev/null +++ b/model_investigation_output.go @@ -0,0 +1,497 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the InvestigationOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InvestigationOutput{} + +// InvestigationOutput struct for InvestigationOutput +type InvestigationOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Reference *string `json:"reference,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _InvestigationOutput InvestigationOutput + +// NewInvestigationOutput instantiates a new InvestigationOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInvestigationOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *InvestigationOutput { + this := InvestigationOutput{} + var type_ string = "investigation" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var reference string = "" + this.Reference = &reference + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewInvestigationOutputWithDefaults instantiates a new InvestigationOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInvestigationOutputWithDefaults() *InvestigationOutput { + this := InvestigationOutput{} + var type_ string = "investigation" + this.Type = &type_ + var description string = "" + this.Description = &description + var reference string = "" + this.Reference = &reference + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *InvestigationOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *InvestigationOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *InvestigationOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *InvestigationOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *InvestigationOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *InvestigationOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *InvestigationOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *InvestigationOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *InvestigationOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *InvestigationOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *InvestigationOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *InvestigationOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *InvestigationOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *InvestigationOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *InvestigationOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *InvestigationOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *InvestigationOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *InvestigationOutput) GetReference() string { + if o == nil || IsNil(o.Reference) { + var ret string + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetReferenceOk() (*string, bool) { + if o == nil || IsNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *InvestigationOutput) HasReference() bool { + if o != nil && !IsNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given string and assigns it to the Reference field. +func (o *InvestigationOutput) SetReference(v string) { + o.Reference = &v +} + +// GetId returns the Id field value +func (o *InvestigationOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *InvestigationOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *InvestigationOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *InvestigationOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *InvestigationOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *InvestigationOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *InvestigationOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *InvestigationOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *InvestigationOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o InvestigationOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InvestigationOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *InvestigationOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInvestigationOutput := _InvestigationOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInvestigationOutput) + + if err != nil { + return err + } + + *o = InvestigationOutput(varInvestigationOutput) + + return err +} + +type NullableInvestigationOutput struct { + value *InvestigationOutput + isSet bool +} + +func (v NullableInvestigationOutput) Get() *InvestigationOutput { + return v.value +} + +func (v *NullableInvestigationOutput) Set(val *InvestigationOutput) { + v.value = val + v.isSet = true +} + +func (v NullableInvestigationOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableInvestigationOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInvestigationOutput(val *InvestigationOutput) *NullableInvestigationOutput { + return &NullableInvestigationOutput{value: val, isSet: true} +} + +func (v NullableInvestigationOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInvestigationOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_ipv4_input.go b/model_ipv4_input.go new file mode 100644 index 0000000..ec22653 --- /dev/null +++ b/model_ipv4_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IPv4Input type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IPv4Input{} + +// IPv4Input struct for IPv4Input +type IPv4Input struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _IPv4Input IPv4Input + +// NewIPv4Input instantiates a new IPv4Input object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIPv4Input(value string) *IPv4Input { + this := IPv4Input{} + this.Value = value + var type_ string = "ipv4" + this.Type = &type_ + return &this +} + +// NewIPv4InputWithDefaults instantiates a new IPv4Input object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIPv4InputWithDefaults() *IPv4Input { + this := IPv4Input{} + var type_ string = "ipv4" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *IPv4Input) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *IPv4Input) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *IPv4Input) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IPv4Input) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv4Input) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IPv4Input) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IPv4Input) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IPv4Input) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv4Input) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IPv4Input) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IPv4Input) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IPv4Input) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv4Input) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IPv4Input) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IPv4Input) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *IPv4Input) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv4Input) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *IPv4Input) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *IPv4Input) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o IPv4Input) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IPv4Input) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *IPv4Input) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIPv4Input := _IPv4Input{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIPv4Input) + + if err != nil { + return err + } + + *o = IPv4Input(varIPv4Input) + + return err +} + +type NullableIPv4Input struct { + value *IPv4Input + isSet bool +} + +func (v NullableIPv4Input) Get() *IPv4Input { + return v.value +} + +func (v *NullableIPv4Input) Set(val *IPv4Input) { + v.value = val + v.isSet = true +} + +func (v NullableIPv4Input) IsSet() bool { + return v.isSet +} + +func (v *NullableIPv4Input) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIPv4Input(val *IPv4Input) *NullableIPv4Input { + return &NullableIPv4Input{value: val, isSet: true} +} + +func (v NullableIPv4Input) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIPv4Input) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_ipv4_output.go b/model_ipv4_output.go new file mode 100644 index 0000000..e810f1d --- /dev/null +++ b/model_ipv4_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IPv4Output type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IPv4Output{} + +// IPv4Output struct for IPv4Output +type IPv4Output struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _IPv4Output IPv4Output + +// NewIPv4Output instantiates a new IPv4Output object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIPv4Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *IPv4Output { + this := IPv4Output{} + this.Value = value + var type_ string = "ipv4" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewIPv4OutputWithDefaults instantiates a new IPv4Output object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIPv4OutputWithDefaults() *IPv4Output { + this := IPv4Output{} + var type_ string = "ipv4" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *IPv4Output) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *IPv4Output) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *IPv4Output) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IPv4Output) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv4Output) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IPv4Output) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IPv4Output) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IPv4Output) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv4Output) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IPv4Output) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IPv4Output) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IPv4Output) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv4Output) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IPv4Output) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IPv4Output) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *IPv4Output) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv4Output) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *IPv4Output) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *IPv4Output) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *IPv4Output) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *IPv4Output) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *IPv4Output) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *IPv4Output) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *IPv4Output) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *IPv4Output) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *IPv4Output) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *IPv4Output) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *IPv4Output) SetRootType(v string) { + o.RootType = v +} + +func (o IPv4Output) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IPv4Output) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *IPv4Output) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIPv4Output := _IPv4Output{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIPv4Output) + + if err != nil { + return err + } + + *o = IPv4Output(varIPv4Output) + + return err +} + +type NullableIPv4Output struct { + value *IPv4Output + isSet bool +} + +func (v NullableIPv4Output) Get() *IPv4Output { + return v.value +} + +func (v *NullableIPv4Output) Set(val *IPv4Output) { + v.value = val + v.isSet = true +} + +func (v NullableIPv4Output) IsSet() bool { + return v.isSet +} + +func (v *NullableIPv4Output) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIPv4Output(val *IPv4Output) *NullableIPv4Output { + return &NullableIPv4Output{value: val, isSet: true} +} + +func (v NullableIPv4Output) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIPv4Output) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_ipv6_input.go b/model_ipv6_input.go new file mode 100644 index 0000000..0b181d5 --- /dev/null +++ b/model_ipv6_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IPv6Input type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IPv6Input{} + +// IPv6Input struct for IPv6Input +type IPv6Input struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _IPv6Input IPv6Input + +// NewIPv6Input instantiates a new IPv6Input object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIPv6Input(value string) *IPv6Input { + this := IPv6Input{} + this.Value = value + var type_ string = "ipv6" + this.Type = &type_ + return &this +} + +// NewIPv6InputWithDefaults instantiates a new IPv6Input object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIPv6InputWithDefaults() *IPv6Input { + this := IPv6Input{} + var type_ string = "ipv6" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *IPv6Input) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *IPv6Input) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *IPv6Input) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IPv6Input) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv6Input) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IPv6Input) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IPv6Input) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IPv6Input) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv6Input) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IPv6Input) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IPv6Input) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IPv6Input) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv6Input) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IPv6Input) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IPv6Input) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *IPv6Input) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv6Input) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *IPv6Input) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *IPv6Input) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o IPv6Input) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IPv6Input) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *IPv6Input) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIPv6Input := _IPv6Input{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIPv6Input) + + if err != nil { + return err + } + + *o = IPv6Input(varIPv6Input) + + return err +} + +type NullableIPv6Input struct { + value *IPv6Input + isSet bool +} + +func (v NullableIPv6Input) Get() *IPv6Input { + return v.value +} + +func (v *NullableIPv6Input) Set(val *IPv6Input) { + v.value = val + v.isSet = true +} + +func (v NullableIPv6Input) IsSet() bool { + return v.isSet +} + +func (v *NullableIPv6Input) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIPv6Input(val *IPv6Input) *NullableIPv6Input { + return &NullableIPv6Input{value: val, isSet: true} +} + +func (v NullableIPv6Input) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIPv6Input) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_ipv6_output.go b/model_ipv6_output.go new file mode 100644 index 0000000..1594285 --- /dev/null +++ b/model_ipv6_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the IPv6Output type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IPv6Output{} + +// IPv6Output struct for IPv6Output +type IPv6Output struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _IPv6Output IPv6Output + +// NewIPv6Output instantiates a new IPv6Output object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIPv6Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *IPv6Output { + this := IPv6Output{} + this.Value = value + var type_ string = "ipv6" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewIPv6OutputWithDefaults instantiates a new IPv6Output object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIPv6OutputWithDefaults() *IPv6Output { + this := IPv6Output{} + var type_ string = "ipv6" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *IPv6Output) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *IPv6Output) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *IPv6Output) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IPv6Output) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv6Output) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IPv6Output) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IPv6Output) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IPv6Output) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv6Output) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IPv6Output) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IPv6Output) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *IPv6Output) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv6Output) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *IPv6Output) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *IPv6Output) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *IPv6Output) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IPv6Output) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *IPv6Output) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *IPv6Output) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *IPv6Output) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *IPv6Output) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *IPv6Output) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *IPv6Output) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *IPv6Output) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *IPv6Output) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *IPv6Output) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *IPv6Output) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *IPv6Output) SetRootType(v string) { + o.RootType = v +} + +func (o IPv6Output) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IPv6Output) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *IPv6Output) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIPv6Output := _IPv6Output{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIPv6Output) + + if err != nil { + return err + } + + *o = IPv6Output(varIPv6Output) + + return err +} + +type NullableIPv6Output struct { + value *IPv6Output + isSet bool +} + +func (v NullableIPv6Output) Get() *IPv6Output { + return v.value +} + +func (v *NullableIPv6Output) Set(val *IPv6Output) { + v.value = val + v.isSet = true +} + +func (v NullableIPv6Output) IsSet() bool { + return v.isSet +} + +func (v *NullableIPv6Output) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIPv6Output(val *IPv6Output) *NullableIPv6Output { + return &NullableIPv6Output{value: val, isSet: true} +} + +func (v NullableIPv6Output) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIPv6Output) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_ja3_input.go b/model_ja3_input.go new file mode 100644 index 0000000..608e15d --- /dev/null +++ b/model_ja3_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the JA3Input type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JA3Input{} + +// JA3Input struct for JA3Input +type JA3Input struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _JA3Input JA3Input + +// NewJA3Input instantiates a new JA3Input object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewJA3Input(value string) *JA3Input { + this := JA3Input{} + this.Value = value + var type_ string = "ja3" + this.Type = &type_ + return &this +} + +// NewJA3InputWithDefaults instantiates a new JA3Input object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewJA3InputWithDefaults() *JA3Input { + this := JA3Input{} + var type_ string = "ja3" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *JA3Input) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *JA3Input) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *JA3Input) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *JA3Input) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JA3Input) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *JA3Input) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *JA3Input) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *JA3Input) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JA3Input) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *JA3Input) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *JA3Input) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *JA3Input) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JA3Input) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *JA3Input) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *JA3Input) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *JA3Input) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JA3Input) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *JA3Input) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *JA3Input) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o JA3Input) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JA3Input) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *JA3Input) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varJA3Input := _JA3Input{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varJA3Input) + + if err != nil { + return err + } + + *o = JA3Input(varJA3Input) + + return err +} + +type NullableJA3Input struct { + value *JA3Input + isSet bool +} + +func (v NullableJA3Input) Get() *JA3Input { + return v.value +} + +func (v *NullableJA3Input) Set(val *JA3Input) { + v.value = val + v.isSet = true +} + +func (v NullableJA3Input) IsSet() bool { + return v.isSet +} + +func (v *NullableJA3Input) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJA3Input(val *JA3Input) *NullableJA3Input { + return &NullableJA3Input{value: val, isSet: true} +} + +func (v NullableJA3Input) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJA3Input) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_ja3_output.go b/model_ja3_output.go new file mode 100644 index 0000000..bcb3aa4 --- /dev/null +++ b/model_ja3_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the JA3Output type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JA3Output{} + +// JA3Output struct for JA3Output +type JA3Output struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _JA3Output JA3Output + +// NewJA3Output instantiates a new JA3Output object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewJA3Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *JA3Output { + this := JA3Output{} + this.Value = value + var type_ string = "ja3" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewJA3OutputWithDefaults instantiates a new JA3Output object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewJA3OutputWithDefaults() *JA3Output { + this := JA3Output{} + var type_ string = "ja3" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *JA3Output) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *JA3Output) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *JA3Output) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *JA3Output) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JA3Output) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *JA3Output) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *JA3Output) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *JA3Output) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JA3Output) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *JA3Output) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *JA3Output) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *JA3Output) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JA3Output) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *JA3Output) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *JA3Output) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *JA3Output) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JA3Output) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *JA3Output) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *JA3Output) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *JA3Output) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *JA3Output) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *JA3Output) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *JA3Output) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *JA3Output) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *JA3Output) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *JA3Output) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *JA3Output) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *JA3Output) SetRootType(v string) { + o.RootType = v +} + +func (o JA3Output) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JA3Output) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *JA3Output) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varJA3Output := _JA3Output{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varJA3Output) + + if err != nil { + return err + } + + *o = JA3Output(varJA3Output) + + return err +} + +type NullableJA3Output struct { + value *JA3Output + isSet bool +} + +func (v NullableJA3Output) Get() *JA3Output { + return v.value +} + +func (v *NullableJA3Output) Set(val *JA3Output) { + v.value = val + v.isSet = true +} + +func (v NullableJA3Output) IsSet() bool { + return v.isSet +} + +func (v *NullableJA3Output) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJA3Output(val *JA3Output) *NullableJA3Output { + return &NullableJA3Output{value: val, isSet: true} +} + +func (v NullableJA3Output) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJA3Output) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_jarm_input.go b/model_jarm_input.go new file mode 100644 index 0000000..199026f --- /dev/null +++ b/model_jarm_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the JARMInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JARMInput{} + +// JARMInput struct for JARMInput +type JARMInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _JARMInput JARMInput + +// NewJARMInput instantiates a new JARMInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewJARMInput(value string) *JARMInput { + this := JARMInput{} + this.Value = value + var type_ string = "jarm" + this.Type = &type_ + return &this +} + +// NewJARMInputWithDefaults instantiates a new JARMInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewJARMInputWithDefaults() *JARMInput { + this := JARMInput{} + var type_ string = "jarm" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *JARMInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *JARMInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *JARMInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *JARMInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JARMInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *JARMInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *JARMInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *JARMInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JARMInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *JARMInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *JARMInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *JARMInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JARMInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *JARMInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *JARMInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *JARMInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JARMInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *JARMInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *JARMInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o JARMInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JARMInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *JARMInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varJARMInput := _JARMInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varJARMInput) + + if err != nil { + return err + } + + *o = JARMInput(varJARMInput) + + return err +} + +type NullableJARMInput struct { + value *JARMInput + isSet bool +} + +func (v NullableJARMInput) Get() *JARMInput { + return v.value +} + +func (v *NullableJARMInput) Set(val *JARMInput) { + v.value = val + v.isSet = true +} + +func (v NullableJARMInput) IsSet() bool { + return v.isSet +} + +func (v *NullableJARMInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJARMInput(val *JARMInput) *NullableJARMInput { + return &NullableJARMInput{value: val, isSet: true} +} + +func (v NullableJARMInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJARMInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_jarm_output.go b/model_jarm_output.go new file mode 100644 index 0000000..da85bad --- /dev/null +++ b/model_jarm_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the JARMOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JARMOutput{} + +// JARMOutput struct for JARMOutput +type JARMOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _JARMOutput JARMOutput + +// NewJARMOutput instantiates a new JARMOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewJARMOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *JARMOutput { + this := JARMOutput{} + this.Value = value + var type_ string = "jarm" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewJARMOutputWithDefaults instantiates a new JARMOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewJARMOutputWithDefaults() *JARMOutput { + this := JARMOutput{} + var type_ string = "jarm" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *JARMOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *JARMOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *JARMOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *JARMOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JARMOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *JARMOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *JARMOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *JARMOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JARMOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *JARMOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *JARMOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *JARMOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JARMOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *JARMOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *JARMOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *JARMOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JARMOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *JARMOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *JARMOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *JARMOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *JARMOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *JARMOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *JARMOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *JARMOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *JARMOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *JARMOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *JARMOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *JARMOutput) SetRootType(v string) { + o.RootType = v +} + +func (o JARMOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JARMOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *JARMOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varJARMOutput := _JARMOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varJARMOutput) + + if err != nil { + return err + } + + *o = JARMOutput(varJARMOutput) + + return err +} + +type NullableJARMOutput struct { + value *JARMOutput + isSet bool +} + +func (v NullableJARMOutput) Get() *JARMOutput { + return v.value +} + +func (v *NullableJARMOutput) Set(val *JARMOutput) { + v.value = val + v.isSet = true +} + +func (v NullableJARMOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableJARMOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJARMOutput(val *JARMOutput) *NullableJARMOutput { + return &NullableJARMOutput{value: val, isSet: true} +} + +func (v NullableJARMOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJARMOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_mac_address_input.go b/model_mac_address_input.go new file mode 100644 index 0000000..70292b8 --- /dev/null +++ b/model_mac_address_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the MacAddressInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MacAddressInput{} + +// MacAddressInput struct for MacAddressInput +type MacAddressInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _MacAddressInput MacAddressInput + +// NewMacAddressInput instantiates a new MacAddressInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMacAddressInput(value string) *MacAddressInput { + this := MacAddressInput{} + this.Value = value + var type_ string = "mac_address" + this.Type = &type_ + return &this +} + +// NewMacAddressInputWithDefaults instantiates a new MacAddressInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMacAddressInputWithDefaults() *MacAddressInput { + this := MacAddressInput{} + var type_ string = "mac_address" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *MacAddressInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *MacAddressInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *MacAddressInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MacAddressInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MacAddressInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MacAddressInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MacAddressInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *MacAddressInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MacAddressInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *MacAddressInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *MacAddressInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *MacAddressInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MacAddressInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *MacAddressInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *MacAddressInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *MacAddressInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MacAddressInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *MacAddressInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *MacAddressInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o MacAddressInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MacAddressInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *MacAddressInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMacAddressInput := _MacAddressInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMacAddressInput) + + if err != nil { + return err + } + + *o = MacAddressInput(varMacAddressInput) + + return err +} + +type NullableMacAddressInput struct { + value *MacAddressInput + isSet bool +} + +func (v NullableMacAddressInput) Get() *MacAddressInput { + return v.value +} + +func (v *NullableMacAddressInput) Set(val *MacAddressInput) { + v.value = val + v.isSet = true +} + +func (v NullableMacAddressInput) IsSet() bool { + return v.isSet +} + +func (v *NullableMacAddressInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMacAddressInput(val *MacAddressInput) *NullableMacAddressInput { + return &NullableMacAddressInput{value: val, isSet: true} +} + +func (v NullableMacAddressInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMacAddressInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_mac_address_output.go b/model_mac_address_output.go new file mode 100644 index 0000000..d354dfe --- /dev/null +++ b/model_mac_address_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the MacAddressOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MacAddressOutput{} + +// MacAddressOutput struct for MacAddressOutput +type MacAddressOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _MacAddressOutput MacAddressOutput + +// NewMacAddressOutput instantiates a new MacAddressOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMacAddressOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *MacAddressOutput { + this := MacAddressOutput{} + this.Value = value + var type_ string = "mac_address" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewMacAddressOutputWithDefaults instantiates a new MacAddressOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMacAddressOutputWithDefaults() *MacAddressOutput { + this := MacAddressOutput{} + var type_ string = "mac_address" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *MacAddressOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *MacAddressOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *MacAddressOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MacAddressOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MacAddressOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MacAddressOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MacAddressOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *MacAddressOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MacAddressOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *MacAddressOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *MacAddressOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *MacAddressOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MacAddressOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *MacAddressOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *MacAddressOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *MacAddressOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MacAddressOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *MacAddressOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *MacAddressOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *MacAddressOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *MacAddressOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *MacAddressOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *MacAddressOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *MacAddressOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *MacAddressOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *MacAddressOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *MacAddressOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *MacAddressOutput) SetRootType(v string) { + o.RootType = v +} + +func (o MacAddressOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MacAddressOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *MacAddressOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMacAddressOutput := _MacAddressOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMacAddressOutput) + + if err != nil { + return err + } + + *o = MacAddressOutput(varMacAddressOutput) + + return err +} + +type NullableMacAddressOutput struct { + value *MacAddressOutput + isSet bool +} + +func (v NullableMacAddressOutput) Get() *MacAddressOutput { + return v.value +} + +func (v *NullableMacAddressOutput) Set(val *MacAddressOutput) { + v.value = val + v.isSet = true +} + +func (v NullableMacAddressOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableMacAddressOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMacAddressOutput(val *MacAddressOutput) *NullableMacAddressOutput { + return &NullableMacAddressOutput{value: val, isSet: true} +} + +func (v NullableMacAddressOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMacAddressOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_malware_input.go b/model_malware_input.go new file mode 100644 index 0000000..652eec4 --- /dev/null +++ b/model_malware_input.go @@ -0,0 +1,457 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the MalwareInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MalwareInput{} + +// MalwareInput struct for MalwareInput +type MalwareInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + Aliases []string `json:"aliases,omitempty"` + Family *string `json:"family,omitempty"` +} + +type _MalwareInput MalwareInput + +// NewMalwareInput instantiates a new MalwareInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMalwareInput(name string) *MalwareInput { + this := MalwareInput{} + var type_ string = "malware" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var family string = "" + this.Family = &family + return &this +} + +// NewMalwareInputWithDefaults instantiates a new MalwareInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMalwareInputWithDefaults() *MalwareInput { + this := MalwareInput{} + var type_ string = "malware" + this.Type = &type_ + var description string = "" + this.Description = &description + var family string = "" + this.Family = &family + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MalwareInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MalwareInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MalwareInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *MalwareInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MalwareInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *MalwareInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *MalwareInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *MalwareInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *MalwareInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *MalwareInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *MalwareInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *MalwareInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *MalwareInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *MalwareInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *MalwareInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *MalwareInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *MalwareInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *MalwareInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *MalwareInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *MalwareInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *MalwareInput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *MalwareInput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *MalwareInput) SetAliases(v []string) { + o.Aliases = v +} + +// GetFamily returns the Family field value if set, zero value otherwise. +func (o *MalwareInput) GetFamily() string { + if o == nil || IsNil(o.Family) { + var ret string + return ret + } + return *o.Family +} + +// GetFamilyOk returns a tuple with the Family field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareInput) GetFamilyOk() (*string, bool) { + if o == nil || IsNil(o.Family) { + return nil, false + } + return o.Family, true +} + +// HasFamily returns a boolean if a field has been set. +func (o *MalwareInput) HasFamily() bool { + if o != nil && !IsNil(o.Family) { + return true + } + + return false +} + +// SetFamily gets a reference to the given string and assigns it to the Family field. +func (o *MalwareInput) SetFamily(v string) { + o.Family = &v +} + +func (o MalwareInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MalwareInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.Family) { + toSerialize["family"] = o.Family + } + return toSerialize, nil +} + +func (o *MalwareInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMalwareInput := _MalwareInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMalwareInput) + + if err != nil { + return err + } + + *o = MalwareInput(varMalwareInput) + + return err +} + +type NullableMalwareInput struct { + value *MalwareInput + isSet bool +} + +func (v NullableMalwareInput) Get() *MalwareInput { + return v.value +} + +func (v *NullableMalwareInput) Set(val *MalwareInput) { + v.value = val + v.isSet = true +} + +func (v NullableMalwareInput) IsSet() bool { + return v.isSet +} + +func (v *NullableMalwareInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMalwareInput(val *MalwareInput) *NullableMalwareInput { + return &NullableMalwareInput{value: val, isSet: true} +} + +func (v NullableMalwareInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMalwareInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_malware_output.go b/model_malware_output.go new file mode 100644 index 0000000..03f5e11 --- /dev/null +++ b/model_malware_output.go @@ -0,0 +1,569 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the MalwareOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MalwareOutput{} + +// MalwareOutput struct for MalwareOutput +type MalwareOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + Aliases []string `json:"aliases,omitempty"` + Family *string `json:"family,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _MalwareOutput MalwareOutput + +// NewMalwareOutput instantiates a new MalwareOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMalwareOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *MalwareOutput { + this := MalwareOutput{} + var type_ string = "malware" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var family string = "" + this.Family = &family + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewMalwareOutputWithDefaults instantiates a new MalwareOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMalwareOutputWithDefaults() *MalwareOutput { + this := MalwareOutput{} + var type_ string = "malware" + this.Type = &type_ + var description string = "" + this.Description = &description + var family string = "" + this.Family = &family + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MalwareOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MalwareOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MalwareOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *MalwareOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MalwareOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *MalwareOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *MalwareOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *MalwareOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *MalwareOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *MalwareOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *MalwareOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *MalwareOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *MalwareOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *MalwareOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *MalwareOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *MalwareOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *MalwareOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *MalwareOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *MalwareOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *MalwareOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *MalwareOutput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *MalwareOutput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *MalwareOutput) SetAliases(v []string) { + o.Aliases = v +} + +// GetFamily returns the Family field value if set, zero value otherwise. +func (o *MalwareOutput) GetFamily() string { + if o == nil || IsNil(o.Family) { + var ret string + return ret + } + return *o.Family +} + +// GetFamilyOk returns a tuple with the Family field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetFamilyOk() (*string, bool) { + if o == nil || IsNil(o.Family) { + return nil, false + } + return o.Family, true +} + +// HasFamily returns a boolean if a field has been set. +func (o *MalwareOutput) HasFamily() bool { + if o != nil && !IsNil(o.Family) { + return true + } + + return false +} + +// SetFamily gets a reference to the given string and assigns it to the Family field. +func (o *MalwareOutput) SetFamily(v string) { + o.Family = &v +} + +// GetId returns the Id field value +func (o *MalwareOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *MalwareOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *MalwareOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *MalwareOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *MalwareOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *MalwareOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *MalwareOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *MalwareOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *MalwareOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o MalwareOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MalwareOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.Family) { + toSerialize["family"] = o.Family + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *MalwareOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMalwareOutput := _MalwareOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMalwareOutput) + + if err != nil { + return err + } + + *o = MalwareOutput(varMalwareOutput) + + return err +} + +type NullableMalwareOutput struct { + value *MalwareOutput + isSet bool +} + +func (v NullableMalwareOutput) Get() *MalwareOutput { + return v.value +} + +func (v *NullableMalwareOutput) Set(val *MalwareOutput) { + v.value = val + v.isSet = true +} + +func (v NullableMalwareOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableMalwareOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMalwareOutput(val *MalwareOutput) *NullableMalwareOutput { + return &NullableMalwareOutput{value: val, isSet: true} +} + +func (v NullableMalwareOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMalwareOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_max_hops.go b/model_max_hops.go new file mode 100644 index 0000000..62c7485 --- /dev/null +++ b/model_max_hops.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// MaxHops struct for MaxHops +type MaxHops struct { + Int32 *int32 +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *MaxHops) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into Int32 + err = json.Unmarshal(data, &dst.Int32) + if err == nil { + jsonInt32, _ := json.Marshal(dst.Int32) + if string(jsonInt32) == "{}" { // empty struct + dst.Int32 = nil + } else { + return nil // data stored in dst.Int32, return on the first match + } + } else { + dst.Int32 = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(MaxHops)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src MaxHops) MarshalJSON() ([]byte, error) { + if src.Int32 != nil { + return json.Marshal(&src.Int32) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableMaxHops struct { + value *MaxHops + isSet bool +} + +func (v NullableMaxHops) Get() *MaxHops { + return v.value +} + +func (v *NullableMaxHops) Set(val *MaxHops) { + v.value = val + v.isSet = true +} + +func (v NullableMaxHops) IsSet() bool { + return v.isSet +} + +func (v *NullableMaxHops) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaxHops(val *MaxHops) *NullableMaxHops { + return &NullableMaxHops{value: val, isSet: true} +} + +func (v NullableMaxHops) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaxHops) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_md5_input.go b/model_md5_input.go new file mode 100644 index 0000000..3a4e632 --- /dev/null +++ b/model_md5_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the MD5Input type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MD5Input{} + +// MD5Input struct for MD5Input +type MD5Input struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _MD5Input MD5Input + +// NewMD5Input instantiates a new MD5Input object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMD5Input(value string) *MD5Input { + this := MD5Input{} + this.Value = value + var type_ string = "md5" + this.Type = &type_ + return &this +} + +// NewMD5InputWithDefaults instantiates a new MD5Input object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMD5InputWithDefaults() *MD5Input { + this := MD5Input{} + var type_ string = "md5" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *MD5Input) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *MD5Input) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *MD5Input) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MD5Input) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MD5Input) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MD5Input) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MD5Input) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *MD5Input) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MD5Input) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *MD5Input) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *MD5Input) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *MD5Input) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MD5Input) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *MD5Input) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *MD5Input) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *MD5Input) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MD5Input) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *MD5Input) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *MD5Input) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o MD5Input) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MD5Input) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *MD5Input) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMD5Input := _MD5Input{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMD5Input) + + if err != nil { + return err + } + + *o = MD5Input(varMD5Input) + + return err +} + +type NullableMD5Input struct { + value *MD5Input + isSet bool +} + +func (v NullableMD5Input) Get() *MD5Input { + return v.value +} + +func (v *NullableMD5Input) Set(val *MD5Input) { + v.value = val + v.isSet = true +} + +func (v NullableMD5Input) IsSet() bool { + return v.isSet +} + +func (v *NullableMD5Input) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMD5Input(val *MD5Input) *NullableMD5Input { + return &NullableMD5Input{value: val, isSet: true} +} + +func (v NullableMD5Input) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMD5Input) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_md5_output.go b/model_md5_output.go new file mode 100644 index 0000000..3887bd3 --- /dev/null +++ b/model_md5_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the MD5Output type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MD5Output{} + +// MD5Output struct for MD5Output +type MD5Output struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _MD5Output MD5Output + +// NewMD5Output instantiates a new MD5Output object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMD5Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *MD5Output { + this := MD5Output{} + this.Value = value + var type_ string = "md5" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewMD5OutputWithDefaults instantiates a new MD5Output object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMD5OutputWithDefaults() *MD5Output { + this := MD5Output{} + var type_ string = "md5" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *MD5Output) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *MD5Output) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *MD5Output) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MD5Output) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MD5Output) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MD5Output) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MD5Output) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *MD5Output) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MD5Output) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *MD5Output) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *MD5Output) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *MD5Output) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MD5Output) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *MD5Output) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *MD5Output) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *MD5Output) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MD5Output) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *MD5Output) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *MD5Output) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *MD5Output) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *MD5Output) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *MD5Output) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *MD5Output) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *MD5Output) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *MD5Output) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *MD5Output) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *MD5Output) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *MD5Output) SetRootType(v string) { + o.RootType = v +} + +func (o MD5Output) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MD5Output) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *MD5Output) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMD5Output := _MD5Output{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMD5Output) + + if err != nil { + return err + } + + *o = MD5Output(varMD5Output) + + return err +} + +type NullableMD5Output struct { + value *MD5Output + isSet bool +} + +func (v NullableMD5Output) Get() *MD5Output { + return v.value +} + +func (v *NullableMD5Output) Set(val *MD5Output) { + v.value = val + v.isSet = true +} + +func (v NullableMD5Output) IsSet() bool { + return v.isSet +} + +func (v *NullableMD5Output) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMD5Output(val *MD5Output) *NullableMD5Output { + return &NullableMD5Output{value: val, isSet: true} +} + +func (v NullableMD5Output) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMD5Output) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_merge_tag_request.go b/model_merge_tag_request.go new file mode 100644 index 0000000..3dc43bd --- /dev/null +++ b/model_merge_tag_request.go @@ -0,0 +1,236 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the MergeTagRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MergeTagRequest{} + +// MergeTagRequest struct for MergeTagRequest +type MergeTagRequest struct { + Merge []string `json:"merge"` + MergeInto string `json:"merge_into"` + Permanent *bool `json:"permanent,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MergeTagRequest MergeTagRequest + +// NewMergeTagRequest instantiates a new MergeTagRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMergeTagRequest(merge []string, mergeInto string) *MergeTagRequest { + this := MergeTagRequest{} + this.Merge = merge + this.MergeInto = mergeInto + var permanent bool = false + this.Permanent = &permanent + return &this +} + +// NewMergeTagRequestWithDefaults instantiates a new MergeTagRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMergeTagRequestWithDefaults() *MergeTagRequest { + this := MergeTagRequest{} + var permanent bool = false + this.Permanent = &permanent + return &this +} + +// GetMerge returns the Merge field value +func (o *MergeTagRequest) GetMerge() []string { + if o == nil { + var ret []string + return ret + } + + return o.Merge +} + +// GetMergeOk returns a tuple with the Merge field value +// and a boolean to check if the value has been set. +func (o *MergeTagRequest) GetMergeOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Merge, true +} + +// SetMerge sets field value +func (o *MergeTagRequest) SetMerge(v []string) { + o.Merge = v +} + +// GetMergeInto returns the MergeInto field value +func (o *MergeTagRequest) GetMergeInto() string { + if o == nil { + var ret string + return ret + } + + return o.MergeInto +} + +// GetMergeIntoOk returns a tuple with the MergeInto field value +// and a boolean to check if the value has been set. +func (o *MergeTagRequest) GetMergeIntoOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MergeInto, true +} + +// SetMergeInto sets field value +func (o *MergeTagRequest) SetMergeInto(v string) { + o.MergeInto = v +} + +// GetPermanent returns the Permanent field value if set, zero value otherwise. +func (o *MergeTagRequest) GetPermanent() bool { + if o == nil || IsNil(o.Permanent) { + var ret bool + return ret + } + return *o.Permanent +} + +// GetPermanentOk returns a tuple with the Permanent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MergeTagRequest) GetPermanentOk() (*bool, bool) { + if o == nil || IsNil(o.Permanent) { + return nil, false + } + return o.Permanent, true +} + +// HasPermanent returns a boolean if a field has been set. +func (o *MergeTagRequest) HasPermanent() bool { + if o != nil && !IsNil(o.Permanent) { + return true + } + + return false +} + +// SetPermanent gets a reference to the given bool and assigns it to the Permanent field. +func (o *MergeTagRequest) SetPermanent(v bool) { + o.Permanent = &v +} + +func (o MergeTagRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MergeTagRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["merge"] = o.Merge + toSerialize["merge_into"] = o.MergeInto + if !IsNil(o.Permanent) { + toSerialize["permanent"] = o.Permanent + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MergeTagRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "merge", + "merge_into", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMergeTagRequest := _MergeTagRequest{} + + err = json.Unmarshal(data, &varMergeTagRequest) + + if err != nil { + return err + } + + *o = MergeTagRequest(varMergeTagRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "merge") + delete(additionalProperties, "merge_into") + delete(additionalProperties, "permanent") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMergeTagRequest struct { + value *MergeTagRequest + isSet bool +} + +func (v NullableMergeTagRequest) Get() *MergeTagRequest { + return v.value +} + +func (v *NullableMergeTagRequest) Set(val *MergeTagRequest) { + v.value = val + v.isSet = true +} + +func (v NullableMergeTagRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableMergeTagRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMergeTagRequest(val *MergeTagRequest) *NullableMergeTagRequest { + return &NullableMergeTagRequest{value: val, isSet: true} +} + +func (v NullableMergeTagRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMergeTagRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_merge_tag_result.go b/model_merge_tag_result.go new file mode 100644 index 0000000..9070e8e --- /dev/null +++ b/model_merge_tag_result.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the MergeTagResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MergeTagResult{} + +// MergeTagResult struct for MergeTagResult +type MergeTagResult struct { + Merged int32 `json:"merged"` + Into Tag `json:"into"` + AdditionalProperties map[string]interface{} +} + +type _MergeTagResult MergeTagResult + +// NewMergeTagResult instantiates a new MergeTagResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMergeTagResult(merged int32, into Tag) *MergeTagResult { + this := MergeTagResult{} + this.Merged = merged + this.Into = into + return &this +} + +// NewMergeTagResultWithDefaults instantiates a new MergeTagResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMergeTagResultWithDefaults() *MergeTagResult { + this := MergeTagResult{} + return &this +} + +// GetMerged returns the Merged field value +func (o *MergeTagResult) GetMerged() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Merged +} + +// GetMergedOk returns a tuple with the Merged field value +// and a boolean to check if the value has been set. +func (o *MergeTagResult) GetMergedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Merged, true +} + +// SetMerged sets field value +func (o *MergeTagResult) SetMerged(v int32) { + o.Merged = v +} + +// GetInto returns the Into field value +func (o *MergeTagResult) GetInto() Tag { + if o == nil { + var ret Tag + return ret + } + + return o.Into +} + +// GetIntoOk returns a tuple with the Into field value +// and a boolean to check if the value has been set. +func (o *MergeTagResult) GetIntoOk() (*Tag, bool) { + if o == nil { + return nil, false + } + return &o.Into, true +} + +// SetInto sets field value +func (o *MergeTagResult) SetInto(v Tag) { + o.Into = v +} + +func (o MergeTagResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MergeTagResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["merged"] = o.Merged + toSerialize["into"] = o.Into + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MergeTagResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "merged", + "into", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMergeTagResult := _MergeTagResult{} + + err = json.Unmarshal(data, &varMergeTagResult) + + if err != nil { + return err + } + + *o = MergeTagResult(varMergeTagResult) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "merged") + delete(additionalProperties, "into") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMergeTagResult struct { + value *MergeTagResult + isSet bool +} + +func (v NullableMergeTagResult) Get() *MergeTagResult { + return v.value +} + +func (v *NullableMergeTagResult) Set(val *MergeTagResult) { + v.value = val + v.isSet = true +} + +func (v NullableMergeTagResult) IsSet() bool { + return v.isSet +} + +func (v *NullableMergeTagResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMergeTagResult(val *MergeTagResult) *NullableMergeTagResult { + return &NullableMergeTagResult{value: val, isSet: true} +} + +func (v NullableMergeTagResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMergeTagResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_min_hops.go b/model_min_hops.go new file mode 100644 index 0000000..327553c --- /dev/null +++ b/model_min_hops.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// MinHops struct for MinHops +type MinHops struct { + Int32 *int32 +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *MinHops) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into Int32 + err = json.Unmarshal(data, &dst.Int32) + if err == nil { + jsonInt32, _ := json.Marshal(dst.Int32) + if string(jsonInt32) == "{}" { // empty struct + dst.Int32 = nil + } else { + return nil // data stored in dst.Int32, return on the first match + } + } else { + dst.Int32 = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(MinHops)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src MinHops) MarshalJSON() ([]byte, error) { + if src.Int32 != nil { + return json.Marshal(&src.Int32) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableMinHops struct { + value *MinHops + isSet bool +} + +func (v NullableMinHops) Get() *MinHops { + return v.value +} + +func (v *NullableMinHops) Set(val *MinHops) { + v.value = val + v.isSet = true +} + +func (v NullableMinHops) IsSet() bool { + return v.isSet +} + +func (v *NullableMinHops) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMinHops(val *MinHops) *NullableMinHops { + return &NullableMinHops{value: val, isSet: true} +} + +func (v NullableMinHops) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMinHops) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_mutex_input.go b/model_mutex_input.go new file mode 100644 index 0000000..6a725bb --- /dev/null +++ b/model_mutex_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the MutexInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MutexInput{} + +// MutexInput struct for MutexInput +type MutexInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _MutexInput MutexInput + +// NewMutexInput instantiates a new MutexInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMutexInput(value string) *MutexInput { + this := MutexInput{} + this.Value = value + var type_ string = "mutex" + this.Type = &type_ + return &this +} + +// NewMutexInputWithDefaults instantiates a new MutexInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMutexInputWithDefaults() *MutexInput { + this := MutexInput{} + var type_ string = "mutex" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *MutexInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *MutexInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *MutexInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MutexInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MutexInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MutexInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MutexInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *MutexInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MutexInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *MutexInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *MutexInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *MutexInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MutexInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *MutexInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *MutexInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *MutexInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MutexInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *MutexInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *MutexInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o MutexInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MutexInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *MutexInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMutexInput := _MutexInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMutexInput) + + if err != nil { + return err + } + + *o = MutexInput(varMutexInput) + + return err +} + +type NullableMutexInput struct { + value *MutexInput + isSet bool +} + +func (v NullableMutexInput) Get() *MutexInput { + return v.value +} + +func (v *NullableMutexInput) Set(val *MutexInput) { + v.value = val + v.isSet = true +} + +func (v NullableMutexInput) IsSet() bool { + return v.isSet +} + +func (v *NullableMutexInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMutexInput(val *MutexInput) *NullableMutexInput { + return &NullableMutexInput{value: val, isSet: true} +} + +func (v NullableMutexInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMutexInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_mutex_output.go b/model_mutex_output.go new file mode 100644 index 0000000..0577569 --- /dev/null +++ b/model_mutex_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the MutexOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MutexOutput{} + +// MutexOutput struct for MutexOutput +type MutexOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _MutexOutput MutexOutput + +// NewMutexOutput instantiates a new MutexOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMutexOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *MutexOutput { + this := MutexOutput{} + this.Value = value + var type_ string = "mutex" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewMutexOutputWithDefaults instantiates a new MutexOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMutexOutputWithDefaults() *MutexOutput { + this := MutexOutput{} + var type_ string = "mutex" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *MutexOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *MutexOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *MutexOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MutexOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MutexOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MutexOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MutexOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *MutexOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MutexOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *MutexOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *MutexOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *MutexOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MutexOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *MutexOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *MutexOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *MutexOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MutexOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *MutexOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *MutexOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *MutexOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *MutexOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *MutexOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *MutexOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *MutexOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *MutexOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *MutexOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *MutexOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *MutexOutput) SetRootType(v string) { + o.RootType = v +} + +func (o MutexOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MutexOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *MutexOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMutexOutput := _MutexOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMutexOutput) + + if err != nil { + return err + } + + *o = MutexOutput(varMutexOutput) + + return err +} + +type NullableMutexOutput struct { + value *MutexOutput + isSet bool +} + +func (v NullableMutexOutput) Get() *MutexOutput { + return v.value +} + +func (v *NullableMutexOutput) Set(val *MutexOutput) { + v.value = val + v.isSet = true +} + +func (v NullableMutexOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableMutexOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMutexOutput(val *MutexOutput) *NullableMutexOutput { + return &NullableMutexOutput{value: val, isSet: true} +} + +func (v NullableMutexOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMutexOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_name.go b/model_name.go new file mode 100644 index 0000000..a1af90b --- /dev/null +++ b/model_name.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// Name struct for Name +type Name struct { + String *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *Name) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into String + err = json.Unmarshal(data, &dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + return nil // data stored in dst.String, return on the first match + } + } else { + dst.String = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(Name)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Name) MarshalJSON() ([]byte, error) { + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableName struct { + value *Name + isSet bool +} + +func (v NullableName) Get() *Name { + return v.value +} + +func (v *NullableName) Set(val *Name) { + v.value = val + v.isSet = true +} + +func (v NullableName) IsSet() bool { + return v.isSet +} + +func (v *NullableName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableName(val *Name) *NullableName { + return &NullableName{value: val, isSet: true} +} + +func (v NullableName) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableName) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_named_pipe_input.go b/model_named_pipe_input.go new file mode 100644 index 0000000..2078dc7 --- /dev/null +++ b/model_named_pipe_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the NamedPipeInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NamedPipeInput{} + +// NamedPipeInput struct for NamedPipeInput +type NamedPipeInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _NamedPipeInput NamedPipeInput + +// NewNamedPipeInput instantiates a new NamedPipeInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNamedPipeInput(value string) *NamedPipeInput { + this := NamedPipeInput{} + this.Value = value + var type_ string = "named_pipe" + this.Type = &type_ + return &this +} + +// NewNamedPipeInputWithDefaults instantiates a new NamedPipeInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNamedPipeInputWithDefaults() *NamedPipeInput { + this := NamedPipeInput{} + var type_ string = "named_pipe" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *NamedPipeInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *NamedPipeInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *NamedPipeInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *NamedPipeInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NamedPipeInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *NamedPipeInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *NamedPipeInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *NamedPipeInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NamedPipeInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *NamedPipeInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *NamedPipeInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *NamedPipeInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NamedPipeInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *NamedPipeInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *NamedPipeInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *NamedPipeInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NamedPipeInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *NamedPipeInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *NamedPipeInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o NamedPipeInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NamedPipeInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *NamedPipeInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNamedPipeInput := _NamedPipeInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNamedPipeInput) + + if err != nil { + return err + } + + *o = NamedPipeInput(varNamedPipeInput) + + return err +} + +type NullableNamedPipeInput struct { + value *NamedPipeInput + isSet bool +} + +func (v NullableNamedPipeInput) Get() *NamedPipeInput { + return v.value +} + +func (v *NullableNamedPipeInput) Set(val *NamedPipeInput) { + v.value = val + v.isSet = true +} + +func (v NullableNamedPipeInput) IsSet() bool { + return v.isSet +} + +func (v *NullableNamedPipeInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNamedPipeInput(val *NamedPipeInput) *NullableNamedPipeInput { + return &NullableNamedPipeInput{value: val, isSet: true} +} + +func (v NullableNamedPipeInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNamedPipeInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_named_pipe_output.go b/model_named_pipe_output.go new file mode 100644 index 0000000..bd4f556 --- /dev/null +++ b/model_named_pipe_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the NamedPipeOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NamedPipeOutput{} + +// NamedPipeOutput struct for NamedPipeOutput +type NamedPipeOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _NamedPipeOutput NamedPipeOutput + +// NewNamedPipeOutput instantiates a new NamedPipeOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNamedPipeOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *NamedPipeOutput { + this := NamedPipeOutput{} + this.Value = value + var type_ string = "named_pipe" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewNamedPipeOutputWithDefaults instantiates a new NamedPipeOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNamedPipeOutputWithDefaults() *NamedPipeOutput { + this := NamedPipeOutput{} + var type_ string = "named_pipe" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *NamedPipeOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *NamedPipeOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *NamedPipeOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *NamedPipeOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NamedPipeOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *NamedPipeOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *NamedPipeOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *NamedPipeOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NamedPipeOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *NamedPipeOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *NamedPipeOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *NamedPipeOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NamedPipeOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *NamedPipeOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *NamedPipeOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *NamedPipeOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NamedPipeOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *NamedPipeOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *NamedPipeOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *NamedPipeOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *NamedPipeOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *NamedPipeOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *NamedPipeOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *NamedPipeOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *NamedPipeOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *NamedPipeOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *NamedPipeOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *NamedPipeOutput) SetRootType(v string) { + o.RootType = v +} + +func (o NamedPipeOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NamedPipeOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *NamedPipeOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNamedPipeOutput := _NamedPipeOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNamedPipeOutput) + + if err != nil { + return err + } + + *o = NamedPipeOutput(varNamedPipeOutput) + + return err +} + +type NullableNamedPipeOutput struct { + value *NamedPipeOutput + isSet bool +} + +func (v NullableNamedPipeOutput) Get() *NamedPipeOutput { + return v.value +} + +func (v *NullableNamedPipeOutput) Set(val *NamedPipeOutput) { + v.value = val + v.isSet = true +} + +func (v NullableNamedPipeOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableNamedPipeOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNamedPipeOutput(val *NamedPipeOutput) *NullableNamedPipeOutput { + return &NullableNamedPipeOutput{value: val, isSet: true} +} + +func (v NullableNamedPipeOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNamedPipeOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_bulk_observable_add_request.go b/model_new_bulk_observable_add_request.go new file mode 100644 index 0000000..212993a --- /dev/null +++ b/model_new_bulk_observable_add_request.go @@ -0,0 +1,166 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewBulkObservableAddRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewBulkObservableAddRequest{} + +// NewBulkObservableAddRequest struct for NewBulkObservableAddRequest +type NewBulkObservableAddRequest struct { + Observables []NewObservableRequest `json:"observables"` + AdditionalProperties map[string]interface{} +} + +type _NewBulkObservableAddRequest NewBulkObservableAddRequest + +// NewNewBulkObservableAddRequest instantiates a new NewBulkObservableAddRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewBulkObservableAddRequest(observables []NewObservableRequest) *NewBulkObservableAddRequest { + this := NewBulkObservableAddRequest{} + this.Observables = observables + return &this +} + +// NewNewBulkObservableAddRequestWithDefaults instantiates a new NewBulkObservableAddRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewBulkObservableAddRequestWithDefaults() *NewBulkObservableAddRequest { + this := NewBulkObservableAddRequest{} + return &this +} + +// GetObservables returns the Observables field value +func (o *NewBulkObservableAddRequest) GetObservables() []NewObservableRequest { + if o == nil { + var ret []NewObservableRequest + return ret + } + + return o.Observables +} + +// GetObservablesOk returns a tuple with the Observables field value +// and a boolean to check if the value has been set. +func (o *NewBulkObservableAddRequest) GetObservablesOk() ([]NewObservableRequest, bool) { + if o == nil { + return nil, false + } + return o.Observables, true +} + +// SetObservables sets field value +func (o *NewBulkObservableAddRequest) SetObservables(v []NewObservableRequest) { + o.Observables = v +} + +func (o NewBulkObservableAddRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewBulkObservableAddRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["observables"] = o.Observables + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewBulkObservableAddRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "observables", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewBulkObservableAddRequest := _NewBulkObservableAddRequest{} + + err = json.Unmarshal(data, &varNewBulkObservableAddRequest) + + if err != nil { + return err + } + + *o = NewBulkObservableAddRequest(varNewBulkObservableAddRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "observables") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewBulkObservableAddRequest struct { + value *NewBulkObservableAddRequest + isSet bool +} + +func (v NullableNewBulkObservableAddRequest) Get() *NewBulkObservableAddRequest { + return v.value +} + +func (v *NullableNewBulkObservableAddRequest) Set(val *NewBulkObservableAddRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewBulkObservableAddRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewBulkObservableAddRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewBulkObservableAddRequest(val *NewBulkObservableAddRequest) *NullableNewBulkObservableAddRequest { + return &NullableNewBulkObservableAddRequest{value: val, isSet: true} +} + +func (v NullableNewBulkObservableAddRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewBulkObservableAddRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_dfiq_request.go b/model_new_dfiq_request.go new file mode 100644 index 0000000..563e52d --- /dev/null +++ b/model_new_dfiq_request.go @@ -0,0 +1,236 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewDFIQRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewDFIQRequest{} + +// NewDFIQRequest struct for NewDFIQRequest +type NewDFIQRequest struct { + DfiqYaml string `json:"dfiq_yaml"` + DfiqType DFIQType `json:"dfiq_type"` + UpdateIndicators *bool `json:"update_indicators,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NewDFIQRequest NewDFIQRequest + +// NewNewDFIQRequest instantiates a new NewDFIQRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewDFIQRequest(dfiqYaml string, dfiqType DFIQType) *NewDFIQRequest { + this := NewDFIQRequest{} + this.DfiqYaml = dfiqYaml + this.DfiqType = dfiqType + var updateIndicators bool = false + this.UpdateIndicators = &updateIndicators + return &this +} + +// NewNewDFIQRequestWithDefaults instantiates a new NewDFIQRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewDFIQRequestWithDefaults() *NewDFIQRequest { + this := NewDFIQRequest{} + var updateIndicators bool = false + this.UpdateIndicators = &updateIndicators + return &this +} + +// GetDfiqYaml returns the DfiqYaml field value +func (o *NewDFIQRequest) GetDfiqYaml() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqYaml +} + +// GetDfiqYamlOk returns a tuple with the DfiqYaml field value +// and a boolean to check if the value has been set. +func (o *NewDFIQRequest) GetDfiqYamlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqYaml, true +} + +// SetDfiqYaml sets field value +func (o *NewDFIQRequest) SetDfiqYaml(v string) { + o.DfiqYaml = v +} + +// GetDfiqType returns the DfiqType field value +func (o *NewDFIQRequest) GetDfiqType() DFIQType { + if o == nil { + var ret DFIQType + return ret + } + + return o.DfiqType +} + +// GetDfiqTypeOk returns a tuple with the DfiqType field value +// and a boolean to check if the value has been set. +func (o *NewDFIQRequest) GetDfiqTypeOk() (*DFIQType, bool) { + if o == nil { + return nil, false + } + return &o.DfiqType, true +} + +// SetDfiqType sets field value +func (o *NewDFIQRequest) SetDfiqType(v DFIQType) { + o.DfiqType = v +} + +// GetUpdateIndicators returns the UpdateIndicators field value if set, zero value otherwise. +func (o *NewDFIQRequest) GetUpdateIndicators() bool { + if o == nil || IsNil(o.UpdateIndicators) { + var ret bool + return ret + } + return *o.UpdateIndicators +} + +// GetUpdateIndicatorsOk returns a tuple with the UpdateIndicators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewDFIQRequest) GetUpdateIndicatorsOk() (*bool, bool) { + if o == nil || IsNil(o.UpdateIndicators) { + return nil, false + } + return o.UpdateIndicators, true +} + +// HasUpdateIndicators returns a boolean if a field has been set. +func (o *NewDFIQRequest) HasUpdateIndicators() bool { + if o != nil && !IsNil(o.UpdateIndicators) { + return true + } + + return false +} + +// SetUpdateIndicators gets a reference to the given bool and assigns it to the UpdateIndicators field. +func (o *NewDFIQRequest) SetUpdateIndicators(v bool) { + o.UpdateIndicators = &v +} + +func (o NewDFIQRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewDFIQRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dfiq_yaml"] = o.DfiqYaml + toSerialize["dfiq_type"] = o.DfiqType + if !IsNil(o.UpdateIndicators) { + toSerialize["update_indicators"] = o.UpdateIndicators + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewDFIQRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dfiq_yaml", + "dfiq_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewDFIQRequest := _NewDFIQRequest{} + + err = json.Unmarshal(data, &varNewDFIQRequest) + + if err != nil { + return err + } + + *o = NewDFIQRequest(varNewDFIQRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "dfiq_yaml") + delete(additionalProperties, "dfiq_type") + delete(additionalProperties, "update_indicators") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewDFIQRequest struct { + value *NewDFIQRequest + isSet bool +} + +func (v NullableNewDFIQRequest) Get() *NewDFIQRequest { + return v.value +} + +func (v *NullableNewDFIQRequest) Set(val *NewDFIQRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewDFIQRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewDFIQRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewDFIQRequest(val *NewDFIQRequest) *NullableNewDFIQRequest { + return &NullableNewDFIQRequest{value: val, isSet: true} +} + +func (v NullableNewDFIQRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewDFIQRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_entity_request.go b/model_new_entity_request.go new file mode 100644 index 0000000..0b869ea --- /dev/null +++ b/model_new_entity_request.go @@ -0,0 +1,203 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewEntityRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewEntityRequest{} + +// NewEntityRequest struct for NewEntityRequest +type NewEntityRequest struct { + Entity Entity1 `json:"entity"` + Tags []string `json:"tags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NewEntityRequest NewEntityRequest + +// NewNewEntityRequest instantiates a new NewEntityRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewEntityRequest(entity Entity1) *NewEntityRequest { + this := NewEntityRequest{} + this.Entity = entity + return &this +} + +// NewNewEntityRequestWithDefaults instantiates a new NewEntityRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewEntityRequestWithDefaults() *NewEntityRequest { + this := NewEntityRequest{} + return &this +} + +// GetEntity returns the Entity field value +func (o *NewEntityRequest) GetEntity() Entity1 { + if o == nil { + var ret Entity1 + return ret + } + + return o.Entity +} + +// GetEntityOk returns a tuple with the Entity field value +// and a boolean to check if the value has been set. +func (o *NewEntityRequest) GetEntityOk() (*Entity1, bool) { + if o == nil { + return nil, false + } + return &o.Entity, true +} + +// SetEntity sets field value +func (o *NewEntityRequest) SetEntity(v Entity1) { + o.Entity = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *NewEntityRequest) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewEntityRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *NewEntityRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *NewEntityRequest) SetTags(v []string) { + o.Tags = v +} + +func (o NewEntityRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewEntityRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["entity"] = o.Entity + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewEntityRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "entity", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewEntityRequest := _NewEntityRequest{} + + err = json.Unmarshal(data, &varNewEntityRequest) + + if err != nil { + return err + } + + *o = NewEntityRequest(varNewEntityRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "entity") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewEntityRequest struct { + value *NewEntityRequest + isSet bool +} + +func (v NullableNewEntityRequest) Get() *NewEntityRequest { + return v.value +} + +func (v *NullableNewEntityRequest) Set(val *NewEntityRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewEntityRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewEntityRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewEntityRequest(val *NewEntityRequest) *NullableNewEntityRequest { + return &NullableNewEntityRequest{value: val, isSet: true} +} + +func (v NullableNewEntityRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewEntityRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_export_request.go b/model_new_export_request.go new file mode 100644 index 0000000..cf5faff --- /dev/null +++ b/model_new_export_request.go @@ -0,0 +1,166 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewExportRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewExportRequest{} + +// NewExportRequest struct for NewExportRequest +type NewExportRequest struct { + Export ExportTaskInput `json:"export"` + AdditionalProperties map[string]interface{} +} + +type _NewExportRequest NewExportRequest + +// NewNewExportRequest instantiates a new NewExportRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewExportRequest(export ExportTaskInput) *NewExportRequest { + this := NewExportRequest{} + this.Export = export + return &this +} + +// NewNewExportRequestWithDefaults instantiates a new NewExportRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewExportRequestWithDefaults() *NewExportRequest { + this := NewExportRequest{} + return &this +} + +// GetExport returns the Export field value +func (o *NewExportRequest) GetExport() ExportTaskInput { + if o == nil { + var ret ExportTaskInput + return ret + } + + return o.Export +} + +// GetExportOk returns a tuple with the Export field value +// and a boolean to check if the value has been set. +func (o *NewExportRequest) GetExportOk() (*ExportTaskInput, bool) { + if o == nil { + return nil, false + } + return &o.Export, true +} + +// SetExport sets field value +func (o *NewExportRequest) SetExport(v ExportTaskInput) { + o.Export = v +} + +func (o NewExportRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewExportRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["export"] = o.Export + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewExportRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "export", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewExportRequest := _NewExportRequest{} + + err = json.Unmarshal(data, &varNewExportRequest) + + if err != nil { + return err + } + + *o = NewExportRequest(varNewExportRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "export") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewExportRequest struct { + value *NewExportRequest + isSet bool +} + +func (v NullableNewExportRequest) Get() *NewExportRequest { + return v.value +} + +func (v *NullableNewExportRequest) Set(val *NewExportRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewExportRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewExportRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewExportRequest(val *NewExportRequest) *NullableNewExportRequest { + return &NullableNewExportRequest{value: val, isSet: true} +} + +func (v NullableNewExportRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewExportRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_extended_observable_request.go b/model_new_extended_observable_request.go new file mode 100644 index 0000000..c6039a2 --- /dev/null +++ b/model_new_extended_observable_request.go @@ -0,0 +1,203 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewExtendedObservableRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewExtendedObservableRequest{} + +// NewExtendedObservableRequest struct for NewExtendedObservableRequest +type NewExtendedObservableRequest struct { + Tags []string `json:"tags,omitempty"` + Observable Observable1 `json:"observable"` + AdditionalProperties map[string]interface{} +} + +type _NewExtendedObservableRequest NewExtendedObservableRequest + +// NewNewExtendedObservableRequest instantiates a new NewExtendedObservableRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewExtendedObservableRequest(observable Observable1) *NewExtendedObservableRequest { + this := NewExtendedObservableRequest{} + this.Observable = observable + return &this +} + +// NewNewExtendedObservableRequestWithDefaults instantiates a new NewExtendedObservableRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewExtendedObservableRequestWithDefaults() *NewExtendedObservableRequest { + this := NewExtendedObservableRequest{} + return &this +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *NewExtendedObservableRequest) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewExtendedObservableRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *NewExtendedObservableRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *NewExtendedObservableRequest) SetTags(v []string) { + o.Tags = v +} + +// GetObservable returns the Observable field value +func (o *NewExtendedObservableRequest) GetObservable() Observable1 { + if o == nil { + var ret Observable1 + return ret + } + + return o.Observable +} + +// GetObservableOk returns a tuple with the Observable field value +// and a boolean to check if the value has been set. +func (o *NewExtendedObservableRequest) GetObservableOk() (*Observable1, bool) { + if o == nil { + return nil, false + } + return &o.Observable, true +} + +// SetObservable sets field value +func (o *NewExtendedObservableRequest) SetObservable(v Observable1) { + o.Observable = v +} + +func (o NewExtendedObservableRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewExtendedObservableRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + toSerialize["observable"] = o.Observable + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewExtendedObservableRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "observable", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewExtendedObservableRequest := _NewExtendedObservableRequest{} + + err = json.Unmarshal(data, &varNewExtendedObservableRequest) + + if err != nil { + return err + } + + *o = NewExtendedObservableRequest(varNewExtendedObservableRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tags") + delete(additionalProperties, "observable") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewExtendedObservableRequest struct { + value *NewExtendedObservableRequest + isSet bool +} + +func (v NullableNewExtendedObservableRequest) Get() *NewExtendedObservableRequest { + return v.value +} + +func (v *NullableNewExtendedObservableRequest) Set(val *NewExtendedObservableRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewExtendedObservableRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewExtendedObservableRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewExtendedObservableRequest(val *NewExtendedObservableRequest) *NullableNewExtendedObservableRequest { + return &NullableNewExtendedObservableRequest{value: val, isSet: true} +} + +func (v NullableNewExtendedObservableRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewExtendedObservableRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_indicator_request.go b/model_new_indicator_request.go new file mode 100644 index 0000000..3b465f7 --- /dev/null +++ b/model_new_indicator_request.go @@ -0,0 +1,166 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewIndicatorRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewIndicatorRequest{} + +// NewIndicatorRequest struct for NewIndicatorRequest +type NewIndicatorRequest struct { + Indicator Indicator1 `json:"indicator"` + AdditionalProperties map[string]interface{} +} + +type _NewIndicatorRequest NewIndicatorRequest + +// NewNewIndicatorRequest instantiates a new NewIndicatorRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewIndicatorRequest(indicator Indicator1) *NewIndicatorRequest { + this := NewIndicatorRequest{} + this.Indicator = indicator + return &this +} + +// NewNewIndicatorRequestWithDefaults instantiates a new NewIndicatorRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewIndicatorRequestWithDefaults() *NewIndicatorRequest { + this := NewIndicatorRequest{} + return &this +} + +// GetIndicator returns the Indicator field value +func (o *NewIndicatorRequest) GetIndicator() Indicator1 { + if o == nil { + var ret Indicator1 + return ret + } + + return o.Indicator +} + +// GetIndicatorOk returns a tuple with the Indicator field value +// and a boolean to check if the value has been set. +func (o *NewIndicatorRequest) GetIndicatorOk() (*Indicator1, bool) { + if o == nil { + return nil, false + } + return &o.Indicator, true +} + +// SetIndicator sets field value +func (o *NewIndicatorRequest) SetIndicator(v Indicator1) { + o.Indicator = v +} + +func (o NewIndicatorRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewIndicatorRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["indicator"] = o.Indicator + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewIndicatorRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "indicator", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewIndicatorRequest := _NewIndicatorRequest{} + + err = json.Unmarshal(data, &varNewIndicatorRequest) + + if err != nil { + return err + } + + *o = NewIndicatorRequest(varNewIndicatorRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "indicator") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewIndicatorRequest struct { + value *NewIndicatorRequest + isSet bool +} + +func (v NullableNewIndicatorRequest) Get() *NewIndicatorRequest { + return v.value +} + +func (v *NullableNewIndicatorRequest) Set(val *NewIndicatorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewIndicatorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewIndicatorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewIndicatorRequest(val *NewIndicatorRequest) *NullableNewIndicatorRequest { + return &NullableNewIndicatorRequest{value: val, isSet: true} +} + +func (v NullableNewIndicatorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewIndicatorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_observable_request.go b/model_new_observable_request.go new file mode 100644 index 0000000..63dbdca --- /dev/null +++ b/model_new_observable_request.go @@ -0,0 +1,232 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewObservableRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewObservableRequest{} + +// NewObservableRequest struct for NewObservableRequest +type NewObservableRequest struct { + Tags []string `json:"tags,omitempty"` + Value string `json:"value"` + Type ObservableTypeInput `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _NewObservableRequest NewObservableRequest + +// NewNewObservableRequest instantiates a new NewObservableRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewObservableRequest(value string, type_ ObservableTypeInput) *NewObservableRequest { + this := NewObservableRequest{} + this.Value = value + this.Type = type_ + return &this +} + +// NewNewObservableRequestWithDefaults instantiates a new NewObservableRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewObservableRequestWithDefaults() *NewObservableRequest { + this := NewObservableRequest{} + return &this +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *NewObservableRequest) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewObservableRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *NewObservableRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *NewObservableRequest) SetTags(v []string) { + o.Tags = v +} + +// GetValue returns the Value field value +func (o *NewObservableRequest) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *NewObservableRequest) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *NewObservableRequest) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value +func (o *NewObservableRequest) GetType() ObservableTypeInput { + if o == nil { + var ret ObservableTypeInput + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *NewObservableRequest) GetTypeOk() (*ObservableTypeInput, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NewObservableRequest) SetType(v ObservableTypeInput) { + o.Type = v +} + +func (o NewObservableRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewObservableRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + toSerialize["value"] = o.Value + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewObservableRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewObservableRequest := _NewObservableRequest{} + + err = json.Unmarshal(data, &varNewObservableRequest) + + if err != nil { + return err + } + + *o = NewObservableRequest(varNewObservableRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tags") + delete(additionalProperties, "value") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewObservableRequest struct { + value *NewObservableRequest + isSet bool +} + +func (v NullableNewObservableRequest) Get() *NewObservableRequest { + return v.value +} + +func (v *NullableNewObservableRequest) Set(val *NewObservableRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewObservableRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewObservableRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewObservableRequest(val *NewObservableRequest) *NullableNewObservableRequest { + return &NullableNewObservableRequest{value: val, isSet: true} +} + +func (v NullableNewObservableRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewObservableRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_request.go b/model_new_request.go new file mode 100644 index 0000000..137bc3c --- /dev/null +++ b/model_new_request.go @@ -0,0 +1,281 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewRequest{} + +// NewRequest struct for NewRequest +type NewRequest struct { + Name string `json:"name"` + DefaultExpiration *string `json:"default_expiration,omitempty"` + Produces []string `json:"produces,omitempty"` + Replaces []string `json:"replaces,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NewRequest NewRequest + +// NewNewRequest instantiates a new NewRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewRequest(name string) *NewRequest { + this := NewRequest{} + this.Name = name + var defaultExpiration string = "P90D" + this.DefaultExpiration = &defaultExpiration + return &this +} + +// NewNewRequestWithDefaults instantiates a new NewRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewRequestWithDefaults() *NewRequest { + this := NewRequest{} + var defaultExpiration string = "P90D" + this.DefaultExpiration = &defaultExpiration + return &this +} + +// GetName returns the Name field value +func (o *NewRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NewRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NewRequest) SetName(v string) { + o.Name = v +} + +// GetDefaultExpiration returns the DefaultExpiration field value if set, zero value otherwise. +func (o *NewRequest) GetDefaultExpiration() string { + if o == nil || IsNil(o.DefaultExpiration) { + var ret string + return ret + } + return *o.DefaultExpiration +} + +// GetDefaultExpirationOk returns a tuple with the DefaultExpiration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewRequest) GetDefaultExpirationOk() (*string, bool) { + if o == nil || IsNil(o.DefaultExpiration) { + return nil, false + } + return o.DefaultExpiration, true +} + +// HasDefaultExpiration returns a boolean if a field has been set. +func (o *NewRequest) HasDefaultExpiration() bool { + if o != nil && !IsNil(o.DefaultExpiration) { + return true + } + + return false +} + +// SetDefaultExpiration gets a reference to the given string and assigns it to the DefaultExpiration field. +func (o *NewRequest) SetDefaultExpiration(v string) { + o.DefaultExpiration = &v +} + +// GetProduces returns the Produces field value if set, zero value otherwise. +func (o *NewRequest) GetProduces() []string { + if o == nil || IsNil(o.Produces) { + var ret []string + return ret + } + return o.Produces +} + +// GetProducesOk returns a tuple with the Produces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewRequest) GetProducesOk() ([]string, bool) { + if o == nil || IsNil(o.Produces) { + return nil, false + } + return o.Produces, true +} + +// HasProduces returns a boolean if a field has been set. +func (o *NewRequest) HasProduces() bool { + if o != nil && !IsNil(o.Produces) { + return true + } + + return false +} + +// SetProduces gets a reference to the given []string and assigns it to the Produces field. +func (o *NewRequest) SetProduces(v []string) { + o.Produces = v +} + +// GetReplaces returns the Replaces field value if set, zero value otherwise. +func (o *NewRequest) GetReplaces() []string { + if o == nil || IsNil(o.Replaces) { + var ret []string + return ret + } + return o.Replaces +} + +// GetReplacesOk returns a tuple with the Replaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewRequest) GetReplacesOk() ([]string, bool) { + if o == nil || IsNil(o.Replaces) { + return nil, false + } + return o.Replaces, true +} + +// HasReplaces returns a boolean if a field has been set. +func (o *NewRequest) HasReplaces() bool { + if o != nil && !IsNil(o.Replaces) { + return true + } + + return false +} + +// SetReplaces gets a reference to the given []string and assigns it to the Replaces field. +func (o *NewRequest) SetReplaces(v []string) { + o.Replaces = v +} + +func (o NewRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.DefaultExpiration) { + toSerialize["default_expiration"] = o.DefaultExpiration + } + if !IsNil(o.Produces) { + toSerialize["produces"] = o.Produces + } + if !IsNil(o.Replaces) { + toSerialize["replaces"] = o.Replaces + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewRequest := _NewRequest{} + + err = json.Unmarshal(data, &varNewRequest) + + if err != nil { + return err + } + + *o = NewRequest(varNewRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "default_expiration") + delete(additionalProperties, "produces") + delete(additionalProperties, "replaces") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewRequest struct { + value *NewRequest + isSet bool +} + +func (v NullableNewRequest) Get() *NewRequest { + return v.value +} + +func (v *NullableNewRequest) Set(val *NewRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewRequest(val *NewRequest) *NullableNewRequest { + return &NullableNewRequest{value: val, isSet: true} +} + +func (v NullableNewRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_new_user_request.go b/model_new_user_request.go new file mode 100644 index 0000000..ebcbbcc --- /dev/null +++ b/model_new_user_request.go @@ -0,0 +1,224 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the NewUserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewUserRequest{} + +// NewUserRequest struct for NewUserRequest +type NewUserRequest struct { + Username string `json:"username"` + Password string `json:"password"` + Admin bool `json:"admin"` + AdditionalProperties map[string]interface{} +} + +type _NewUserRequest NewUserRequest + +// NewNewUserRequest instantiates a new NewUserRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewUserRequest(username string, password string, admin bool) *NewUserRequest { + this := NewUserRequest{} + this.Username = username + this.Password = password + this.Admin = admin + return &this +} + +// NewNewUserRequestWithDefaults instantiates a new NewUserRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewUserRequestWithDefaults() *NewUserRequest { + this := NewUserRequest{} + return &this +} + +// GetUsername returns the Username field value +func (o *NewUserRequest) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *NewUserRequest) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *NewUserRequest) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *NewUserRequest) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *NewUserRequest) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *NewUserRequest) SetPassword(v string) { + o.Password = v +} + +// GetAdmin returns the Admin field value +func (o *NewUserRequest) GetAdmin() bool { + if o == nil { + var ret bool + return ret + } + + return o.Admin +} + +// GetAdminOk returns a tuple with the Admin field value +// and a boolean to check if the value has been set. +func (o *NewUserRequest) GetAdminOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Admin, true +} + +// SetAdmin sets field value +func (o *NewUserRequest) SetAdmin(v bool) { + o.Admin = v +} + +func (o NewUserRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewUserRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + toSerialize["admin"] = o.Admin + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NewUserRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "username", + "password", + "admin", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNewUserRequest := _NewUserRequest{} + + err = json.Unmarshal(data, &varNewUserRequest) + + if err != nil { + return err + } + + *o = NewUserRequest(varNewUserRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "admin") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNewUserRequest struct { + value *NewUserRequest + isSet bool +} + +func (v NullableNewUserRequest) Get() *NewUserRequest { + return v.value +} + +func (v *NullableNewUserRequest) Set(val *NewUserRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNewUserRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNewUserRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewUserRequest(val *NewUserRequest) *NullableNewUserRequest { + return &NullableNewUserRequest{value: val, isSet: true} +} + +func (v NullableNewUserRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewUserRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_note_input.go b/model_note_input.go new file mode 100644 index 0000000..79709b2 --- /dev/null +++ b/model_note_input.go @@ -0,0 +1,345 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the NoteInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NoteInput{} + +// NoteInput struct for NoteInput +type NoteInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` +} + +type _NoteInput NoteInput + +// NewNoteInput instantiates a new NoteInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNoteInput(name string) *NoteInput { + this := NoteInput{} + var type_ string = "note" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + return &this +} + +// NewNoteInputWithDefaults instantiates a new NoteInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNoteInputWithDefaults() *NoteInput { + this := NoteInput{} + var type_ string = "note" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *NoteInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *NoteInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *NoteInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *NoteInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NoteInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NoteInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *NoteInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *NoteInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *NoteInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *NoteInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *NoteInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *NoteInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *NoteInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *NoteInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *NoteInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *NoteInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *NoteInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *NoteInput) SetModified(v time.Time) { + o.Modified = &v +} + +func (o NoteInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NoteInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + return toSerialize, nil +} + +func (o *NoteInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNoteInput := _NoteInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNoteInput) + + if err != nil { + return err + } + + *o = NoteInput(varNoteInput) + + return err +} + +type NullableNoteInput struct { + value *NoteInput + isSet bool +} + +func (v NullableNoteInput) Get() *NoteInput { + return v.value +} + +func (v *NullableNoteInput) Set(val *NoteInput) { + v.value = val + v.isSet = true +} + +func (v NullableNoteInput) IsSet() bool { + return v.isSet +} + +func (v *NullableNoteInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNoteInput(val *NoteInput) *NullableNoteInput { + return &NullableNoteInput{value: val, isSet: true} +} + +func (v NullableNoteInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNoteInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_note_output.go b/model_note_output.go new file mode 100644 index 0000000..35d81ad --- /dev/null +++ b/model_note_output.go @@ -0,0 +1,457 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the NoteOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NoteOutput{} + +// NoteOutput struct for NoteOutput +type NoteOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _NoteOutput NoteOutput + +// NewNoteOutput instantiates a new NoteOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNoteOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *NoteOutput { + this := NoteOutput{} + var type_ string = "note" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewNoteOutputWithDefaults instantiates a new NoteOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNoteOutputWithDefaults() *NoteOutput { + this := NoteOutput{} + var type_ string = "note" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *NoteOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *NoteOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *NoteOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *NoteOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NoteOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *NoteOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *NoteOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *NoteOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *NoteOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *NoteOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *NoteOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *NoteOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *NoteOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *NoteOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *NoteOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *NoteOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *NoteOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetId returns the Id field value +func (o *NoteOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *NoteOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *NoteOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *NoteOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *NoteOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *NoteOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *NoteOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *NoteOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *NoteOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o NoteOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NoteOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *NoteOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNoteOutput := _NoteOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNoteOutput) + + if err != nil { + return err + } + + *o = NoteOutput(varNoteOutput) + + return err +} + +type NullableNoteOutput struct { + value *NoteOutput + isSet bool +} + +func (v NullableNoteOutput) Get() *NoteOutput { + return v.value +} + +func (v *NullableNoteOutput) Set(val *NoteOutput) { + v.value = val + v.isSet = true +} + +func (v NullableNoteOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableNoteOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNoteOutput(val *NoteOutput) *NullableNoteOutput { + return &NullableNoteOutput{value: val, isSet: true} +} + +func (v NullableNoteOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNoteOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_observable.go b/model_observable.go new file mode 100644 index 0000000..8a25614 --- /dev/null +++ b/model_observable.go @@ -0,0 +1,377 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Observable type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Observable{} + +// Observable struct for Observable +type Observable struct { + Value string `json:"value"` + Type string `json:"type"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _Observable Observable + +// NewObservable instantiates a new Observable object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObservable(value string, type_ string, id string, tags map[string]TagRelationshipOutput, rootType string) *Observable { + this := Observable{} + this.Value = value + this.Type = type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewObservableWithDefaults instantiates a new Observable object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObservableWithDefaults() *Observable { + this := Observable{} + return &this +} + +// GetValue returns the Value field value +func (o *Observable) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *Observable) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *Observable) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value +func (o *Observable) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Observable) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Observable) SetType(v string) { + o.Type = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *Observable) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Observable) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *Observable) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *Observable) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *Observable) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Observable) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *Observable) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *Observable) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *Observable) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Observable) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *Observable) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *Observable) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *Observable) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Observable) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Observable) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *Observable) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *Observable) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *Observable) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *Observable) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *Observable) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *Observable) SetRootType(v string) { + o.RootType = v +} + +func (o Observable) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Observable) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + toSerialize["type"] = o.Type + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *Observable) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "type", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObservable := _Observable{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varObservable) + + if err != nil { + return err + } + + *o = Observable(varObservable) + + return err +} + +type NullableObservable struct { + value *Observable + isSet bool +} + +func (v NullableObservable) Get() *Observable { + return v.value +} + +func (v *NullableObservable) Set(val *Observable) { + v.value = val + v.isSet = true +} + +func (v NullableObservable) IsSet() bool { + return v.isSet +} + +func (v *NullableObservable) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservable(val *Observable) *NullableObservable { + return &NullableObservable{value: val, isSet: true} +} + +func (v NullableObservable) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservable) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_observable_1.go b/model_observable_1.go new file mode 100644 index 0000000..6243b38 --- /dev/null +++ b/model_observable_1.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// Observable1 struct for Observable1 +type Observable1 struct { + ASNInput *ASNInput + BICInput *BICInput + CIDRInput *CIDRInput + CertificateInput *CertificateInput + CommandLineInput *CommandLineInput + DockerImageInput *DockerImageInput + EmailInput *EmailInput + FileInput *FileInput + GenericInput *GenericInput + HostnameInput *HostnameInput + IBANInput *IBANInput + IPv4Input *IPv4Input + IPv6Input *IPv6Input + ImphashInput *ImphashInput + JA3Input *JA3Input + JARMInput *JARMInput + MD5Input *MD5Input + MacAddressInput *MacAddressInput + MutexInput *MutexInput + NamedPipeInput *NamedPipeInput + PackageInput *PackageInput + PathInput *PathInput + RegistryKeyInput *RegistryKeyInput + SHA1Input *SHA1Input + SHA256Input *SHA256Input + SsdeepInput *SsdeepInput + TLSHInput *TLSHInput + UrlInput *UrlInput + UserAccountInput *UserAccountInput + UserAgentInput *UserAgentInput + WalletInput *WalletInput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *Observable1) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNInput + err = json.Unmarshal(data, &dst.ASNInput) + if err == nil { + jsonASNInput, _ := json.Marshal(dst.ASNInput) + if string(jsonASNInput) == "{}" { // empty struct + dst.ASNInput = nil + } else { + return nil // data stored in dst.ASNInput, return on the first match + } + } else { + dst.ASNInput = nil + } + + // try to unmarshal JSON data into BICInput + err = json.Unmarshal(data, &dst.BICInput) + if err == nil { + jsonBICInput, _ := json.Marshal(dst.BICInput) + if string(jsonBICInput) == "{}" { // empty struct + dst.BICInput = nil + } else { + return nil // data stored in dst.BICInput, return on the first match + } + } else { + dst.BICInput = nil + } + + // try to unmarshal JSON data into CIDRInput + err = json.Unmarshal(data, &dst.CIDRInput) + if err == nil { + jsonCIDRInput, _ := json.Marshal(dst.CIDRInput) + if string(jsonCIDRInput) == "{}" { // empty struct + dst.CIDRInput = nil + } else { + return nil // data stored in dst.CIDRInput, return on the first match + } + } else { + dst.CIDRInput = nil + } + + // try to unmarshal JSON data into CertificateInput + err = json.Unmarshal(data, &dst.CertificateInput) + if err == nil { + jsonCertificateInput, _ := json.Marshal(dst.CertificateInput) + if string(jsonCertificateInput) == "{}" { // empty struct + dst.CertificateInput = nil + } else { + return nil // data stored in dst.CertificateInput, return on the first match + } + } else { + dst.CertificateInput = nil + } + + // try to unmarshal JSON data into CommandLineInput + err = json.Unmarshal(data, &dst.CommandLineInput) + if err == nil { + jsonCommandLineInput, _ := json.Marshal(dst.CommandLineInput) + if string(jsonCommandLineInput) == "{}" { // empty struct + dst.CommandLineInput = nil + } else { + return nil // data stored in dst.CommandLineInput, return on the first match + } + } else { + dst.CommandLineInput = nil + } + + // try to unmarshal JSON data into DockerImageInput + err = json.Unmarshal(data, &dst.DockerImageInput) + if err == nil { + jsonDockerImageInput, _ := json.Marshal(dst.DockerImageInput) + if string(jsonDockerImageInput) == "{}" { // empty struct + dst.DockerImageInput = nil + } else { + return nil // data stored in dst.DockerImageInput, return on the first match + } + } else { + dst.DockerImageInput = nil + } + + // try to unmarshal JSON data into EmailInput + err = json.Unmarshal(data, &dst.EmailInput) + if err == nil { + jsonEmailInput, _ := json.Marshal(dst.EmailInput) + if string(jsonEmailInput) == "{}" { // empty struct + dst.EmailInput = nil + } else { + return nil // data stored in dst.EmailInput, return on the first match + } + } else { + dst.EmailInput = nil + } + + // try to unmarshal JSON data into FileInput + err = json.Unmarshal(data, &dst.FileInput) + if err == nil { + jsonFileInput, _ := json.Marshal(dst.FileInput) + if string(jsonFileInput) == "{}" { // empty struct + dst.FileInput = nil + } else { + return nil // data stored in dst.FileInput, return on the first match + } + } else { + dst.FileInput = nil + } + + // try to unmarshal JSON data into GenericInput + err = json.Unmarshal(data, &dst.GenericInput) + if err == nil { + jsonGenericInput, _ := json.Marshal(dst.GenericInput) + if string(jsonGenericInput) == "{}" { // empty struct + dst.GenericInput = nil + } else { + return nil // data stored in dst.GenericInput, return on the first match + } + } else { + dst.GenericInput = nil + } + + // try to unmarshal JSON data into HostnameInput + err = json.Unmarshal(data, &dst.HostnameInput) + if err == nil { + jsonHostnameInput, _ := json.Marshal(dst.HostnameInput) + if string(jsonHostnameInput) == "{}" { // empty struct + dst.HostnameInput = nil + } else { + return nil // data stored in dst.HostnameInput, return on the first match + } + } else { + dst.HostnameInput = nil + } + + // try to unmarshal JSON data into IBANInput + err = json.Unmarshal(data, &dst.IBANInput) + if err == nil { + jsonIBANInput, _ := json.Marshal(dst.IBANInput) + if string(jsonIBANInput) == "{}" { // empty struct + dst.IBANInput = nil + } else { + return nil // data stored in dst.IBANInput, return on the first match + } + } else { + dst.IBANInput = nil + } + + // try to unmarshal JSON data into IPv4Input + err = json.Unmarshal(data, &dst.IPv4Input) + if err == nil { + jsonIPv4Input, _ := json.Marshal(dst.IPv4Input) + if string(jsonIPv4Input) == "{}" { // empty struct + dst.IPv4Input = nil + } else { + return nil // data stored in dst.IPv4Input, return on the first match + } + } else { + dst.IPv4Input = nil + } + + // try to unmarshal JSON data into IPv6Input + err = json.Unmarshal(data, &dst.IPv6Input) + if err == nil { + jsonIPv6Input, _ := json.Marshal(dst.IPv6Input) + if string(jsonIPv6Input) == "{}" { // empty struct + dst.IPv6Input = nil + } else { + return nil // data stored in dst.IPv6Input, return on the first match + } + } else { + dst.IPv6Input = nil + } + + // try to unmarshal JSON data into ImphashInput + err = json.Unmarshal(data, &dst.ImphashInput) + if err == nil { + jsonImphashInput, _ := json.Marshal(dst.ImphashInput) + if string(jsonImphashInput) == "{}" { // empty struct + dst.ImphashInput = nil + } else { + return nil // data stored in dst.ImphashInput, return on the first match + } + } else { + dst.ImphashInput = nil + } + + // try to unmarshal JSON data into JA3Input + err = json.Unmarshal(data, &dst.JA3Input) + if err == nil { + jsonJA3Input, _ := json.Marshal(dst.JA3Input) + if string(jsonJA3Input) == "{}" { // empty struct + dst.JA3Input = nil + } else { + return nil // data stored in dst.JA3Input, return on the first match + } + } else { + dst.JA3Input = nil + } + + // try to unmarshal JSON data into JARMInput + err = json.Unmarshal(data, &dst.JARMInput) + if err == nil { + jsonJARMInput, _ := json.Marshal(dst.JARMInput) + if string(jsonJARMInput) == "{}" { // empty struct + dst.JARMInput = nil + } else { + return nil // data stored in dst.JARMInput, return on the first match + } + } else { + dst.JARMInput = nil + } + + // try to unmarshal JSON data into MD5Input + err = json.Unmarshal(data, &dst.MD5Input) + if err == nil { + jsonMD5Input, _ := json.Marshal(dst.MD5Input) + if string(jsonMD5Input) == "{}" { // empty struct + dst.MD5Input = nil + } else { + return nil // data stored in dst.MD5Input, return on the first match + } + } else { + dst.MD5Input = nil + } + + // try to unmarshal JSON data into MacAddressInput + err = json.Unmarshal(data, &dst.MacAddressInput) + if err == nil { + jsonMacAddressInput, _ := json.Marshal(dst.MacAddressInput) + if string(jsonMacAddressInput) == "{}" { // empty struct + dst.MacAddressInput = nil + } else { + return nil // data stored in dst.MacAddressInput, return on the first match + } + } else { + dst.MacAddressInput = nil + } + + // try to unmarshal JSON data into MutexInput + err = json.Unmarshal(data, &dst.MutexInput) + if err == nil { + jsonMutexInput, _ := json.Marshal(dst.MutexInput) + if string(jsonMutexInput) == "{}" { // empty struct + dst.MutexInput = nil + } else { + return nil // data stored in dst.MutexInput, return on the first match + } + } else { + dst.MutexInput = nil + } + + // try to unmarshal JSON data into NamedPipeInput + err = json.Unmarshal(data, &dst.NamedPipeInput) + if err == nil { + jsonNamedPipeInput, _ := json.Marshal(dst.NamedPipeInput) + if string(jsonNamedPipeInput) == "{}" { // empty struct + dst.NamedPipeInput = nil + } else { + return nil // data stored in dst.NamedPipeInput, return on the first match + } + } else { + dst.NamedPipeInput = nil + } + + // try to unmarshal JSON data into PackageInput + err = json.Unmarshal(data, &dst.PackageInput) + if err == nil { + jsonPackageInput, _ := json.Marshal(dst.PackageInput) + if string(jsonPackageInput) == "{}" { // empty struct + dst.PackageInput = nil + } else { + return nil // data stored in dst.PackageInput, return on the first match + } + } else { + dst.PackageInput = nil + } + + // try to unmarshal JSON data into PathInput + err = json.Unmarshal(data, &dst.PathInput) + if err == nil { + jsonPathInput, _ := json.Marshal(dst.PathInput) + if string(jsonPathInput) == "{}" { // empty struct + dst.PathInput = nil + } else { + return nil // data stored in dst.PathInput, return on the first match + } + } else { + dst.PathInput = nil + } + + // try to unmarshal JSON data into RegistryKeyInput + err = json.Unmarshal(data, &dst.RegistryKeyInput) + if err == nil { + jsonRegistryKeyInput, _ := json.Marshal(dst.RegistryKeyInput) + if string(jsonRegistryKeyInput) == "{}" { // empty struct + dst.RegistryKeyInput = nil + } else { + return nil // data stored in dst.RegistryKeyInput, return on the first match + } + } else { + dst.RegistryKeyInput = nil + } + + // try to unmarshal JSON data into SHA1Input + err = json.Unmarshal(data, &dst.SHA1Input) + if err == nil { + jsonSHA1Input, _ := json.Marshal(dst.SHA1Input) + if string(jsonSHA1Input) == "{}" { // empty struct + dst.SHA1Input = nil + } else { + return nil // data stored in dst.SHA1Input, return on the first match + } + } else { + dst.SHA1Input = nil + } + + // try to unmarshal JSON data into SHA256Input + err = json.Unmarshal(data, &dst.SHA256Input) + if err == nil { + jsonSHA256Input, _ := json.Marshal(dst.SHA256Input) + if string(jsonSHA256Input) == "{}" { // empty struct + dst.SHA256Input = nil + } else { + return nil // data stored in dst.SHA256Input, return on the first match + } + } else { + dst.SHA256Input = nil + } + + // try to unmarshal JSON data into SsdeepInput + err = json.Unmarshal(data, &dst.SsdeepInput) + if err == nil { + jsonSsdeepInput, _ := json.Marshal(dst.SsdeepInput) + if string(jsonSsdeepInput) == "{}" { // empty struct + dst.SsdeepInput = nil + } else { + return nil // data stored in dst.SsdeepInput, return on the first match + } + } else { + dst.SsdeepInput = nil + } + + // try to unmarshal JSON data into TLSHInput + err = json.Unmarshal(data, &dst.TLSHInput) + if err == nil { + jsonTLSHInput, _ := json.Marshal(dst.TLSHInput) + if string(jsonTLSHInput) == "{}" { // empty struct + dst.TLSHInput = nil + } else { + return nil // data stored in dst.TLSHInput, return on the first match + } + } else { + dst.TLSHInput = nil + } + + // try to unmarshal JSON data into UrlInput + err = json.Unmarshal(data, &dst.UrlInput) + if err == nil { + jsonUrlInput, _ := json.Marshal(dst.UrlInput) + if string(jsonUrlInput) == "{}" { // empty struct + dst.UrlInput = nil + } else { + return nil // data stored in dst.UrlInput, return on the first match + } + } else { + dst.UrlInput = nil + } + + // try to unmarshal JSON data into UserAccountInput + err = json.Unmarshal(data, &dst.UserAccountInput) + if err == nil { + jsonUserAccountInput, _ := json.Marshal(dst.UserAccountInput) + if string(jsonUserAccountInput) == "{}" { // empty struct + dst.UserAccountInput = nil + } else { + return nil // data stored in dst.UserAccountInput, return on the first match + } + } else { + dst.UserAccountInput = nil + } + + // try to unmarshal JSON data into UserAgentInput + err = json.Unmarshal(data, &dst.UserAgentInput) + if err == nil { + jsonUserAgentInput, _ := json.Marshal(dst.UserAgentInput) + if string(jsonUserAgentInput) == "{}" { // empty struct + dst.UserAgentInput = nil + } else { + return nil // data stored in dst.UserAgentInput, return on the first match + } + } else { + dst.UserAgentInput = nil + } + + // try to unmarshal JSON data into WalletInput + err = json.Unmarshal(data, &dst.WalletInput) + if err == nil { + jsonWalletInput, _ := json.Marshal(dst.WalletInput) + if string(jsonWalletInput) == "{}" { // empty struct + dst.WalletInput = nil + } else { + return nil // data stored in dst.WalletInput, return on the first match + } + } else { + dst.WalletInput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(Observable1)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Observable1) MarshalJSON() ([]byte, error) { + if src.ASNInput != nil { + return json.Marshal(&src.ASNInput) + } + + if src.BICInput != nil { + return json.Marshal(&src.BICInput) + } + + if src.CIDRInput != nil { + return json.Marshal(&src.CIDRInput) + } + + if src.CertificateInput != nil { + return json.Marshal(&src.CertificateInput) + } + + if src.CommandLineInput != nil { + return json.Marshal(&src.CommandLineInput) + } + + if src.DockerImageInput != nil { + return json.Marshal(&src.DockerImageInput) + } + + if src.EmailInput != nil { + return json.Marshal(&src.EmailInput) + } + + if src.FileInput != nil { + return json.Marshal(&src.FileInput) + } + + if src.GenericInput != nil { + return json.Marshal(&src.GenericInput) + } + + if src.HostnameInput != nil { + return json.Marshal(&src.HostnameInput) + } + + if src.IBANInput != nil { + return json.Marshal(&src.IBANInput) + } + + if src.IPv4Input != nil { + return json.Marshal(&src.IPv4Input) + } + + if src.IPv6Input != nil { + return json.Marshal(&src.IPv6Input) + } + + if src.ImphashInput != nil { + return json.Marshal(&src.ImphashInput) + } + + if src.JA3Input != nil { + return json.Marshal(&src.JA3Input) + } + + if src.JARMInput != nil { + return json.Marshal(&src.JARMInput) + } + + if src.MD5Input != nil { + return json.Marshal(&src.MD5Input) + } + + if src.MacAddressInput != nil { + return json.Marshal(&src.MacAddressInput) + } + + if src.MutexInput != nil { + return json.Marshal(&src.MutexInput) + } + + if src.NamedPipeInput != nil { + return json.Marshal(&src.NamedPipeInput) + } + + if src.PackageInput != nil { + return json.Marshal(&src.PackageInput) + } + + if src.PathInput != nil { + return json.Marshal(&src.PathInput) + } + + if src.RegistryKeyInput != nil { + return json.Marshal(&src.RegistryKeyInput) + } + + if src.SHA1Input != nil { + return json.Marshal(&src.SHA1Input) + } + + if src.SHA256Input != nil { + return json.Marshal(&src.SHA256Input) + } + + if src.SsdeepInput != nil { + return json.Marshal(&src.SsdeepInput) + } + + if src.TLSHInput != nil { + return json.Marshal(&src.TLSHInput) + } + + if src.UrlInput != nil { + return json.Marshal(&src.UrlInput) + } + + if src.UserAccountInput != nil { + return json.Marshal(&src.UserAccountInput) + } + + if src.UserAgentInput != nil { + return json.Marshal(&src.UserAgentInput) + } + + if src.WalletInput != nil { + return json.Marshal(&src.WalletInput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableObservable1 struct { + value *Observable1 + isSet bool +} + +func (v NullableObservable1) Get() *Observable1 { + return v.value +} + +func (v *NullableObservable1) Set(val *Observable1) { + v.value = val + v.isSet = true +} + +func (v NullableObservable1) IsSet() bool { + return v.isSet +} + +func (v *NullableObservable1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservable1(val *Observable1) *NullableObservable1 { + return &NullableObservable1{value: val, isSet: true} +} + +func (v NullableObservable1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservable1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_observable_search_request.go b/model_observable_search_request.go new file mode 100644 index 0000000..450849d --- /dev/null +++ b/model_observable_search_request.go @@ -0,0 +1,309 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the ObservableSearchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObservableSearchRequest{} + +// ObservableSearchRequest struct for ObservableSearchRequest +type ObservableSearchRequest struct { + Query map[string]QueryValue `json:"query,omitempty"` + Type *ObservableSearchRequestType `json:"type,omitempty"` + Sorting [][]interface{} `json:"sorting,omitempty"` + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ObservableSearchRequest ObservableSearchRequest + +// NewObservableSearchRequest instantiates a new ObservableSearchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObservableSearchRequest() *ObservableSearchRequest { + this := ObservableSearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// NewObservableSearchRequestWithDefaults instantiates a new ObservableSearchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObservableSearchRequestWithDefaults() *ObservableSearchRequest { + this := ObservableSearchRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *ObservableSearchRequest) GetQuery() map[string]QueryValue { + if o == nil || IsNil(o.Query) { + var ret map[string]QueryValue + return ret + } + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObservableSearchRequest) GetQueryOk() (map[string]QueryValue, bool) { + if o == nil || IsNil(o.Query) { + return map[string]QueryValue{}, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *ObservableSearchRequest) HasQuery() bool { + if o != nil && !IsNil(o.Query) { + return true + } + + return false +} + +// SetQuery gets a reference to the given map[string]QueryValue and assigns it to the Query field. +func (o *ObservableSearchRequest) SetQuery(v map[string]QueryValue) { + o.Query = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ObservableSearchRequest) GetType() ObservableSearchRequestType { + if o == nil || IsNil(o.Type) { + var ret ObservableSearchRequestType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObservableSearchRequest) GetTypeOk() (*ObservableSearchRequestType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ObservableSearchRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given ObservableSearchRequestType and assigns it to the Type field. +func (o *ObservableSearchRequest) SetType(v ObservableSearchRequestType) { + o.Type = &v +} + +// GetSorting returns the Sorting field value if set, zero value otherwise. +func (o *ObservableSearchRequest) GetSorting() [][]interface{} { + if o == nil || IsNil(o.Sorting) { + var ret [][]interface{} + return ret + } + return o.Sorting +} + +// GetSortingOk returns a tuple with the Sorting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObservableSearchRequest) GetSortingOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.Sorting) { + return nil, false + } + return o.Sorting, true +} + +// HasSorting returns a boolean if a field has been set. +func (o *ObservableSearchRequest) HasSorting() bool { + if o != nil && !IsNil(o.Sorting) { + return true + } + + return false +} + +// SetSorting gets a reference to the given [][]interface{} and assigns it to the Sorting field. +func (o *ObservableSearchRequest) SetSorting(v [][]interface{}) { + o.Sorting = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ObservableSearchRequest) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObservableSearchRequest) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ObservableSearchRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *ObservableSearchRequest) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *ObservableSearchRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObservableSearchRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *ObservableSearchRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *ObservableSearchRequest) SetPage(v int32) { + o.Page = &v +} + +func (o ObservableSearchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObservableSearchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Query) { + toSerialize["query"] = o.Query + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Sorting) { + toSerialize["sorting"] = o.Sorting + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ObservableSearchRequest) UnmarshalJSON(data []byte) (err error) { + varObservableSearchRequest := _ObservableSearchRequest{} + + err = json.Unmarshal(data, &varObservableSearchRequest) + + if err != nil { + return err + } + + *o = ObservableSearchRequest(varObservableSearchRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "query") + delete(additionalProperties, "type") + delete(additionalProperties, "sorting") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableObservableSearchRequest struct { + value *ObservableSearchRequest + isSet bool +} + +func (v NullableObservableSearchRequest) Get() *ObservableSearchRequest { + return v.value +} + +func (v *NullableObservableSearchRequest) Set(val *ObservableSearchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableObservableSearchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableObservableSearchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservableSearchRequest(val *ObservableSearchRequest) *NullableObservableSearchRequest { + return &NullableObservableSearchRequest{value: val, isSet: true} +} + +func (v NullableObservableSearchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservableSearchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_observable_search_request_type.go b/model_observable_search_request_type.go new file mode 100644 index 0000000..e61a284 --- /dev/null +++ b/model_observable_search_request_type.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ObservableSearchRequestType struct for ObservableSearchRequestType +type ObservableSearchRequestType struct { + ObservableTypeInput *ObservableTypeInput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ObservableSearchRequestType) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into ObservableTypeInput + err = json.Unmarshal(data, &dst.ObservableTypeInput) + if err == nil { + jsonObservableTypeInput, _ := json.Marshal(dst.ObservableTypeInput) + if string(jsonObservableTypeInput) == "{}" { // empty struct + dst.ObservableTypeInput = nil + } else { + return nil // data stored in dst.ObservableTypeInput, return on the first match + } + } else { + dst.ObservableTypeInput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ObservableSearchRequestType)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ObservableSearchRequestType) MarshalJSON() ([]byte, error) { + if src.ObservableTypeInput != nil { + return json.Marshal(&src.ObservableTypeInput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableObservableSearchRequestType struct { + value *ObservableSearchRequestType + isSet bool +} + +func (v NullableObservableSearchRequestType) Get() *ObservableSearchRequestType { + return v.value +} + +func (v *NullableObservableSearchRequestType) Set(val *ObservableSearchRequestType) { + v.value = val + v.isSet = true +} + +func (v NullableObservableSearchRequestType) IsSet() bool { + return v.isSet +} + +func (v *NullableObservableSearchRequestType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservableSearchRequestType(val *ObservableSearchRequestType) *NullableObservableSearchRequestType { + return &NullableObservableSearchRequestType{value: val, isSet: true} +} + +func (v NullableObservableSearchRequestType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservableSearchRequestType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_observable_search_response.go b/model_observable_search_response.go new file mode 100644 index 0000000..1fec6ed --- /dev/null +++ b/model_observable_search_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the ObservableSearchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObservableSearchResponse{} + +// ObservableSearchResponse struct for ObservableSearchResponse +type ObservableSearchResponse struct { + Observables []AddedInner `json:"observables"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _ObservableSearchResponse ObservableSearchResponse + +// NewObservableSearchResponse instantiates a new ObservableSearchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObservableSearchResponse(observables []AddedInner, total int32) *ObservableSearchResponse { + this := ObservableSearchResponse{} + this.Observables = observables + this.Total = total + return &this +} + +// NewObservableSearchResponseWithDefaults instantiates a new ObservableSearchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObservableSearchResponseWithDefaults() *ObservableSearchResponse { + this := ObservableSearchResponse{} + return &this +} + +// GetObservables returns the Observables field value +func (o *ObservableSearchResponse) GetObservables() []AddedInner { + if o == nil { + var ret []AddedInner + return ret + } + + return o.Observables +} + +// GetObservablesOk returns a tuple with the Observables field value +// and a boolean to check if the value has been set. +func (o *ObservableSearchResponse) GetObservablesOk() ([]AddedInner, bool) { + if o == nil { + return nil, false + } + return o.Observables, true +} + +// SetObservables sets field value +func (o *ObservableSearchResponse) SetObservables(v []AddedInner) { + o.Observables = v +} + +// GetTotal returns the Total field value +func (o *ObservableSearchResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *ObservableSearchResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *ObservableSearchResponse) SetTotal(v int32) { + o.Total = v +} + +func (o ObservableSearchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObservableSearchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["observables"] = o.Observables + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ObservableSearchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "observables", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObservableSearchResponse := _ObservableSearchResponse{} + + err = json.Unmarshal(data, &varObservableSearchResponse) + + if err != nil { + return err + } + + *o = ObservableSearchResponse(varObservableSearchResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "observables") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableObservableSearchResponse struct { + value *ObservableSearchResponse + isSet bool +} + +func (v NullableObservableSearchResponse) Get() *ObservableSearchResponse { + return v.value +} + +func (v *NullableObservableSearchResponse) Set(val *ObservableSearchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableObservableSearchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableObservableSearchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservableSearchResponse(val *ObservableSearchResponse) *NullableObservableSearchResponse { + return &NullableObservableSearchResponse{value: val, isSet: true} +} + +func (v NullableObservableSearchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservableSearchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_observable_tag_request.go b/model_observable_tag_request.go new file mode 100644 index 0000000..626d455 --- /dev/null +++ b/model_observable_tag_request.go @@ -0,0 +1,244 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the ObservableTagRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObservableTagRequest{} + +// ObservableTagRequest struct for ObservableTagRequest +type ObservableTagRequest struct { + Tags []string `json:"tags,omitempty"` + Ids []string `json:"ids"` + Strict *bool `json:"strict,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ObservableTagRequest ObservableTagRequest + +// NewObservableTagRequest instantiates a new ObservableTagRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObservableTagRequest(ids []string) *ObservableTagRequest { + this := ObservableTagRequest{} + this.Ids = ids + var strict bool = false + this.Strict = &strict + return &this +} + +// NewObservableTagRequestWithDefaults instantiates a new ObservableTagRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObservableTagRequestWithDefaults() *ObservableTagRequest { + this := ObservableTagRequest{} + var strict bool = false + this.Strict = &strict + return &this +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ObservableTagRequest) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObservableTagRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ObservableTagRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ObservableTagRequest) SetTags(v []string) { + o.Tags = v +} + +// GetIds returns the Ids field value +func (o *ObservableTagRequest) GetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value +// and a boolean to check if the value has been set. +func (o *ObservableTagRequest) GetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Ids, true +} + +// SetIds sets field value +func (o *ObservableTagRequest) SetIds(v []string) { + o.Ids = v +} + +// GetStrict returns the Strict field value if set, zero value otherwise. +func (o *ObservableTagRequest) GetStrict() bool { + if o == nil || IsNil(o.Strict) { + var ret bool + return ret + } + return *o.Strict +} + +// GetStrictOk returns a tuple with the Strict field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObservableTagRequest) GetStrictOk() (*bool, bool) { + if o == nil || IsNil(o.Strict) { + return nil, false + } + return o.Strict, true +} + +// HasStrict returns a boolean if a field has been set. +func (o *ObservableTagRequest) HasStrict() bool { + if o != nil && !IsNil(o.Strict) { + return true + } + + return false +} + +// SetStrict gets a reference to the given bool and assigns it to the Strict field. +func (o *ObservableTagRequest) SetStrict(v bool) { + o.Strict = &v +} + +func (o ObservableTagRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObservableTagRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + toSerialize["ids"] = o.Ids + if !IsNil(o.Strict) { + toSerialize["strict"] = o.Strict + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ObservableTagRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObservableTagRequest := _ObservableTagRequest{} + + err = json.Unmarshal(data, &varObservableTagRequest) + + if err != nil { + return err + } + + *o = ObservableTagRequest(varObservableTagRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tags") + delete(additionalProperties, "ids") + delete(additionalProperties, "strict") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableObservableTagRequest struct { + value *ObservableTagRequest + isSet bool +} + +func (v NullableObservableTagRequest) Get() *ObservableTagRequest { + return v.value +} + +func (v *NullableObservableTagRequest) Set(val *ObservableTagRequest) { + v.value = val + v.isSet = true +} + +func (v NullableObservableTagRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableObservableTagRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservableTagRequest(val *ObservableTagRequest) *NullableObservableTagRequest { + return &NullableObservableTagRequest{value: val, isSet: true} +} + +func (v NullableObservableTagRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservableTagRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_observable_tag_response.go b/model_observable_tag_response.go new file mode 100644 index 0000000..37922a6 --- /dev/null +++ b/model_observable_tag_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the ObservableTagResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObservableTagResponse{} + +// ObservableTagResponse struct for ObservableTagResponse +type ObservableTagResponse struct { + Tagged int32 `json:"tagged"` + Tags map[string]map[string]TagRelationshipOutput `json:"tags"` + AdditionalProperties map[string]interface{} +} + +type _ObservableTagResponse ObservableTagResponse + +// NewObservableTagResponse instantiates a new ObservableTagResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObservableTagResponse(tagged int32, tags map[string]map[string]TagRelationshipOutput) *ObservableTagResponse { + this := ObservableTagResponse{} + this.Tagged = tagged + this.Tags = tags + return &this +} + +// NewObservableTagResponseWithDefaults instantiates a new ObservableTagResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObservableTagResponseWithDefaults() *ObservableTagResponse { + this := ObservableTagResponse{} + return &this +} + +// GetTagged returns the Tagged field value +func (o *ObservableTagResponse) GetTagged() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Tagged +} + +// GetTaggedOk returns a tuple with the Tagged field value +// and a boolean to check if the value has been set. +func (o *ObservableTagResponse) GetTaggedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Tagged, true +} + +// SetTagged sets field value +func (o *ObservableTagResponse) SetTagged(v int32) { + o.Tagged = v +} + +// GetTags returns the Tags field value +func (o *ObservableTagResponse) GetTags() map[string]map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *ObservableTagResponse) GetTagsOk() (map[string]map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *ObservableTagResponse) SetTags(v map[string]map[string]TagRelationshipOutput) { + o.Tags = v +} + +func (o ObservableTagResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObservableTagResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tagged"] = o.Tagged + toSerialize["tags"] = o.Tags + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ObservableTagResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tagged", + "tags", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObservableTagResponse := _ObservableTagResponse{} + + err = json.Unmarshal(data, &varObservableTagResponse) + + if err != nil { + return err + } + + *o = ObservableTagResponse(varObservableTagResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tagged") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableObservableTagResponse struct { + value *ObservableTagResponse + isSet bool +} + +func (v NullableObservableTagResponse) Get() *ObservableTagResponse { + return v.value +} + +func (v *NullableObservableTagResponse) Set(val *ObservableTagResponse) { + v.value = val + v.isSet = true +} + +func (v NullableObservableTagResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableObservableTagResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservableTagResponse(val *ObservableTagResponse) *NullableObservableTagResponse { + return &NullableObservableTagResponse{value: val, isSet: true} +} + +func (v NullableObservableTagResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservableTagResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_observable_type_input.go b/model_observable_type_input.go new file mode 100644 index 0000000..924fdec --- /dev/null +++ b/model_observable_type_input.go @@ -0,0 +1,170 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ObservableTypeInput the model 'ObservableTypeInput' +type ObservableTypeInput string + +// List of ObservableType-Input +const ( + CIDR ObservableTypeInput = "cidr" + HOSTNAME ObservableTypeInput = "hostname" + MAC_ADDRESS ObservableTypeInput = "mac_address" + CERTIFICATE ObservableTypeInput = "certificate" + IPV6 ObservableTypeInput = "ipv6" + USER_ACCOUNT ObservableTypeInput = "user_account" + SSDEEP ObservableTypeInput = "ssdeep" + BIC ObservableTypeInput = "bic" + PACKAGE ObservableTypeInput = "package" + SHA256 ObservableTypeInput = "sha256" + DOCKER_IMAGE ObservableTypeInput = "docker_image" + EMAIL ObservableTypeInput = "email" + JARM ObservableTypeInput = "jarm" + FILE ObservableTypeInput = "file" + MUTEX ObservableTypeInput = "mutex" + IBAN ObservableTypeInput = "iban" + COMMAND_LINE ObservableTypeInput = "command_line" + URL ObservableTypeInput = "url" + REGISTRY_KEY ObservableTypeInput = "registry_key" + PATH ObservableTypeInput = "path" + IPV4 ObservableTypeInput = "ipv4" + TLSH ObservableTypeInput = "tlsh" + GENERIC ObservableTypeInput = "generic" + SHA1 ObservableTypeInput = "sha1" + USER_AGENT ObservableTypeInput = "user_agent" + WALLET ObservableTypeInput = "wallet" + MD5 ObservableTypeInput = "md5" + IMPHASH ObservableTypeInput = "imphash" + ASN ObservableTypeInput = "asn" + NAMED_PIPE ObservableTypeInput = "named_pipe" + JA3 ObservableTypeInput = "ja3" + GUESS ObservableTypeInput = "guess" +) + +// All allowed values of ObservableTypeInput enum +var AllowedObservableTypeInputEnumValues = []ObservableTypeInput{ + "cidr", + "hostname", + "mac_address", + "certificate", + "ipv6", + "user_account", + "ssdeep", + "bic", + "package", + "sha256", + "docker_image", + "email", + "jarm", + "file", + "mutex", + "iban", + "command_line", + "url", + "registry_key", + "path", + "ipv4", + "tlsh", + "generic", + "sha1", + "user_agent", + "wallet", + "md5", + "imphash", + "asn", + "named_pipe", + "ja3", + "guess", +} + +func (v *ObservableTypeInput) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ObservableTypeInput(value) + for _, existing := range AllowedObservableTypeInputEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ObservableTypeInput", value) +} + +// NewObservableTypeInputFromValue returns a pointer to a valid ObservableTypeInput +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewObservableTypeInputFromValue(v string) (*ObservableTypeInput, error) { + ev := ObservableTypeInput(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ObservableTypeInput: valid values are %v", v, AllowedObservableTypeInputEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ObservableTypeInput) IsValid() bool { + for _, existing := range AllowedObservableTypeInputEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ObservableType-Input value +func (v ObservableTypeInput) Ptr() *ObservableTypeInput { + return &v +} + +type NullableObservableTypeInput struct { + value *ObservableTypeInput + isSet bool +} + +func (v NullableObservableTypeInput) Get() *ObservableTypeInput { + return v.value +} + +func (v *NullableObservableTypeInput) Set(val *ObservableTypeInput) { + v.value = val + v.isSet = true +} + +func (v NullableObservableTypeInput) IsSet() bool { + return v.isSet +} + +func (v *NullableObservableTypeInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservableTypeInput(val *ObservableTypeInput) *NullableObservableTypeInput { + return &NullableObservableTypeInput{value: val, isSet: true} +} + +func (v NullableObservableTypeInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservableTypeInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_one_shot_task.go b/model_one_shot_task.go new file mode 100644 index 0000000..2bca6a7 --- /dev/null +++ b/model_one_shot_task.go @@ -0,0 +1,511 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the OneShotTask type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OneShotTask{} + +// OneShotTask struct for OneShotTask +type OneShotTask struct { + Name string `json:"name"` + Enabled *bool `json:"enabled,omitempty"` + Description *string `json:"description,omitempty"` + Status *TaskStatus `json:"status,omitempty"` + StatusMessage *string `json:"status_message,omitempty"` + LastRun NullableTime `json:"last_run,omitempty"` + Frequency NullableString `json:"frequency,omitempty"` + Type *string `json:"type,omitempty"` + ActsOn []string `json:"acts_on,omitempty"` + Id string `json:"id"` +} + +type _OneShotTask OneShotTask + +// NewOneShotTask instantiates a new OneShotTask object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOneShotTask(name string, id string) *OneShotTask { + this := OneShotTask{} + this.Name = name + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "oneshot" + this.Type = &type_ + this.Id = id + return &this +} + +// NewOneShotTaskWithDefaults instantiates a new OneShotTask object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOneShotTaskWithDefaults() *OneShotTask { + this := OneShotTask{} + var enabled bool = false + this.Enabled = &enabled + var description string = "" + this.Description = &description + var statusMessage string = "" + this.StatusMessage = &statusMessage + var type_ string = "oneshot" + this.Type = &type_ + return &this +} + +// GetName returns the Name field value +func (o *OneShotTask) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OneShotTask) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OneShotTask) SetName(v string) { + o.Name = v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *OneShotTask) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OneShotTask) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *OneShotTask) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *OneShotTask) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *OneShotTask) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OneShotTask) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *OneShotTask) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *OneShotTask) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *OneShotTask) GetStatus() TaskStatus { + if o == nil || IsNil(o.Status) { + var ret TaskStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OneShotTask) GetStatusOk() (*TaskStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *OneShotTask) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given TaskStatus and assigns it to the Status field. +func (o *OneShotTask) SetStatus(v TaskStatus) { + o.Status = &v +} + +// GetStatusMessage returns the StatusMessage field value if set, zero value otherwise. +func (o *OneShotTask) GetStatusMessage() string { + if o == nil || IsNil(o.StatusMessage) { + var ret string + return ret + } + return *o.StatusMessage +} + +// GetStatusMessageOk returns a tuple with the StatusMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OneShotTask) GetStatusMessageOk() (*string, bool) { + if o == nil || IsNil(o.StatusMessage) { + return nil, false + } + return o.StatusMessage, true +} + +// HasStatusMessage returns a boolean if a field has been set. +func (o *OneShotTask) HasStatusMessage() bool { + if o != nil && !IsNil(o.StatusMessage) { + return true + } + + return false +} + +// SetStatusMessage gets a reference to the given string and assigns it to the StatusMessage field. +func (o *OneShotTask) SetStatusMessage(v string) { + o.StatusMessage = &v +} + +// GetLastRun returns the LastRun field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OneShotTask) GetLastRun() time.Time { + if o == nil || IsNil(o.LastRun.Get()) { + var ret time.Time + return ret + } + return *o.LastRun.Get() +} + +// GetLastRunOk returns a tuple with the LastRun field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OneShotTask) GetLastRunOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRun.Get(), o.LastRun.IsSet() +} + +// HasLastRun returns a boolean if a field has been set. +func (o *OneShotTask) HasLastRun() bool { + if o != nil && o.LastRun.IsSet() { + return true + } + + return false +} + +// SetLastRun gets a reference to the given NullableTime and assigns it to the LastRun field. +func (o *OneShotTask) SetLastRun(v time.Time) { + o.LastRun.Set(&v) +} + +// SetLastRunNil sets the value for LastRun to be an explicit nil +func (o *OneShotTask) SetLastRunNil() { + o.LastRun.Set(nil) +} + +// UnsetLastRun ensures that no value is present for LastRun, not even an explicit nil +func (o *OneShotTask) UnsetLastRun() { + o.LastRun.Unset() +} + +// GetFrequency returns the Frequency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OneShotTask) GetFrequency() string { + if o == nil || IsNil(o.Frequency.Get()) { + var ret string + return ret + } + return *o.Frequency.Get() +} + +// GetFrequencyOk returns a tuple with the Frequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OneShotTask) GetFrequencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Frequency.Get(), o.Frequency.IsSet() +} + +// HasFrequency returns a boolean if a field has been set. +func (o *OneShotTask) HasFrequency() bool { + if o != nil && o.Frequency.IsSet() { + return true + } + + return false +} + +// SetFrequency gets a reference to the given NullableString and assigns it to the Frequency field. +func (o *OneShotTask) SetFrequency(v string) { + o.Frequency.Set(&v) +} + +// SetFrequencyNil sets the value for Frequency to be an explicit nil +func (o *OneShotTask) SetFrequencyNil() { + o.Frequency.Set(nil) +} + +// UnsetFrequency ensures that no value is present for Frequency, not even an explicit nil +func (o *OneShotTask) UnsetFrequency() { + o.Frequency.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *OneShotTask) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OneShotTask) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *OneShotTask) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *OneShotTask) SetType(v string) { + o.Type = &v +} + +// GetActsOn returns the ActsOn field value if set, zero value otherwise. +func (o *OneShotTask) GetActsOn() []string { + if o == nil || IsNil(o.ActsOn) { + var ret []string + return ret + } + return o.ActsOn +} + +// GetActsOnOk returns a tuple with the ActsOn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OneShotTask) GetActsOnOk() ([]string, bool) { + if o == nil || IsNil(o.ActsOn) { + return nil, false + } + return o.ActsOn, true +} + +// HasActsOn returns a boolean if a field has been set. +func (o *OneShotTask) HasActsOn() bool { + if o != nil && !IsNil(o.ActsOn) { + return true + } + + return false +} + +// SetActsOn gets a reference to the given []string and assigns it to the ActsOn field. +func (o *OneShotTask) SetActsOn(v []string) { + o.ActsOn = v +} + +// GetId returns the Id field value +func (o *OneShotTask) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *OneShotTask) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *OneShotTask) SetId(v string) { + o.Id = v +} + +func (o OneShotTask) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OneShotTask) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusMessage) { + toSerialize["status_message"] = o.StatusMessage + } + if o.LastRun.IsSet() { + toSerialize["last_run"] = o.LastRun.Get() + } + if o.Frequency.IsSet() { + toSerialize["frequency"] = o.Frequency.Get() + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.ActsOn) { + toSerialize["acts_on"] = o.ActsOn + } + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *OneShotTask) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOneShotTask := _OneShotTask{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOneShotTask) + + if err != nil { + return err + } + + *o = OneShotTask(varOneShotTask) + + return err +} + +type NullableOneShotTask struct { + value *OneShotTask + isSet bool +} + +func (v NullableOneShotTask) Get() *OneShotTask { + return v.value +} + +func (v *NullableOneShotTask) Set(val *OneShotTask) { + v.value = val + v.isSet = true +} + +func (v NullableOneShotTask) IsSet() bool { + return v.isSet +} + +func (v *NullableOneShotTask) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOneShotTask(val *OneShotTask) *NullableOneShotTask { + return &NullableOneShotTask{value: val, isSet: true} +} + +func (v NullableOneShotTask) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOneShotTask) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_package_input.go b/model_package_input.go new file mode 100644 index 0000000..d72c085 --- /dev/null +++ b/model_package_input.go @@ -0,0 +1,377 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PackageInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PackageInput{} + +// PackageInput struct for PackageInput +type PackageInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Version *string `json:"version,omitempty"` + RegitryType *string `json:"regitry_type,omitempty"` +} + +type _PackageInput PackageInput + +// NewPackageInput instantiates a new PackageInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPackageInput(value string) *PackageInput { + this := PackageInput{} + this.Value = value + var type_ string = "package" + this.Type = &type_ + return &this +} + +// NewPackageInputWithDefaults instantiates a new PackageInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPackageInputWithDefaults() *PackageInput { + this := PackageInput{} + var type_ string = "package" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *PackageInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *PackageInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *PackageInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PackageInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PackageInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PackageInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *PackageInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *PackageInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *PackageInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *PackageInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *PackageInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *PackageInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *PackageInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *PackageInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *PackageInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PackageInput) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageInput) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PackageInput) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PackageInput) SetVersion(v string) { + o.Version = &v +} + +// GetRegitryType returns the RegitryType field value if set, zero value otherwise. +func (o *PackageInput) GetRegitryType() string { + if o == nil || IsNil(o.RegitryType) { + var ret string + return ret + } + return *o.RegitryType +} + +// GetRegitryTypeOk returns a tuple with the RegitryType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageInput) GetRegitryTypeOk() (*string, bool) { + if o == nil || IsNil(o.RegitryType) { + return nil, false + } + return o.RegitryType, true +} + +// HasRegitryType returns a boolean if a field has been set. +func (o *PackageInput) HasRegitryType() bool { + if o != nil && !IsNil(o.RegitryType) { + return true + } + + return false +} + +// SetRegitryType gets a reference to the given string and assigns it to the RegitryType field. +func (o *PackageInput) SetRegitryType(v string) { + o.RegitryType = &v +} + +func (o PackageInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PackageInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.RegitryType) { + toSerialize["regitry_type"] = o.RegitryType + } + return toSerialize, nil +} + +func (o *PackageInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPackageInput := _PackageInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPackageInput) + + if err != nil { + return err + } + + *o = PackageInput(varPackageInput) + + return err +} + +type NullablePackageInput struct { + value *PackageInput + isSet bool +} + +func (v NullablePackageInput) Get() *PackageInput { + return v.value +} + +func (v *NullablePackageInput) Set(val *PackageInput) { + v.value = val + v.isSet = true +} + +func (v NullablePackageInput) IsSet() bool { + return v.isSet +} + +func (v *NullablePackageInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePackageInput(val *PackageInput) *NullablePackageInput { + return &NullablePackageInput{value: val, isSet: true} +} + +func (v NullablePackageInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePackageInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_package_output.go b/model_package_output.go new file mode 100644 index 0000000..cb9743d --- /dev/null +++ b/model_package_output.go @@ -0,0 +1,461 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PackageOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PackageOutput{} + +// PackageOutput struct for PackageOutput +type PackageOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Version *string `json:"version,omitempty"` + RegitryType *string `json:"regitry_type,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _PackageOutput PackageOutput + +// NewPackageOutput instantiates a new PackageOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPackageOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *PackageOutput { + this := PackageOutput{} + this.Value = value + var type_ string = "package" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewPackageOutputWithDefaults instantiates a new PackageOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPackageOutputWithDefaults() *PackageOutput { + this := PackageOutput{} + var type_ string = "package" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *PackageOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *PackageOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PackageOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PackageOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PackageOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *PackageOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *PackageOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *PackageOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *PackageOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *PackageOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *PackageOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *PackageOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *PackageOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *PackageOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PackageOutput) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PackageOutput) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PackageOutput) SetVersion(v string) { + o.Version = &v +} + +// GetRegitryType returns the RegitryType field value if set, zero value otherwise. +func (o *PackageOutput) GetRegitryType() string { + if o == nil || IsNil(o.RegitryType) { + var ret string + return ret + } + return *o.RegitryType +} + +// GetRegitryTypeOk returns a tuple with the RegitryType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetRegitryTypeOk() (*string, bool) { + if o == nil || IsNil(o.RegitryType) { + return nil, false + } + return o.RegitryType, true +} + +// HasRegitryType returns a boolean if a field has been set. +func (o *PackageOutput) HasRegitryType() bool { + if o != nil && !IsNil(o.RegitryType) { + return true + } + + return false +} + +// SetRegitryType gets a reference to the given string and assigns it to the RegitryType field. +func (o *PackageOutput) SetRegitryType(v string) { + o.RegitryType = &v +} + +// GetId returns the Id field value +func (o *PackageOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *PackageOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *PackageOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *PackageOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *PackageOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *PackageOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *PackageOutput) SetRootType(v string) { + o.RootType = v +} + +func (o PackageOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PackageOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.RegitryType) { + toSerialize["regitry_type"] = o.RegitryType + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *PackageOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPackageOutput := _PackageOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPackageOutput) + + if err != nil { + return err + } + + *o = PackageOutput(varPackageOutput) + + return err +} + +type NullablePackageOutput struct { + value *PackageOutput + isSet bool +} + +func (v NullablePackageOutput) Get() *PackageOutput { + return v.value +} + +func (v *NullablePackageOutput) Set(val *PackageOutput) { + v.value = val + v.isSet = true +} + +func (v NullablePackageOutput) IsSet() bool { + return v.isSet +} + +func (v *NullablePackageOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePackageOutput(val *PackageOutput) *NullablePackageOutput { + return &NullablePackageOutput{value: val, isSet: true} +} + +func (v NullablePackageOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePackageOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_patch_dfiq_request.go b/model_patch_dfiq_request.go new file mode 100644 index 0000000..d47739c --- /dev/null +++ b/model_patch_dfiq_request.go @@ -0,0 +1,236 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the PatchDFIQRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchDFIQRequest{} + +// PatchDFIQRequest struct for PatchDFIQRequest +type PatchDFIQRequest struct { + DfiqYaml string `json:"dfiq_yaml"` + DfiqType DFIQType `json:"dfiq_type"` + UpdateIndicators *bool `json:"update_indicators,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchDFIQRequest PatchDFIQRequest + +// NewPatchDFIQRequest instantiates a new PatchDFIQRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchDFIQRequest(dfiqYaml string, dfiqType DFIQType) *PatchDFIQRequest { + this := PatchDFIQRequest{} + this.DfiqYaml = dfiqYaml + this.DfiqType = dfiqType + var updateIndicators bool = false + this.UpdateIndicators = &updateIndicators + return &this +} + +// NewPatchDFIQRequestWithDefaults instantiates a new PatchDFIQRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchDFIQRequestWithDefaults() *PatchDFIQRequest { + this := PatchDFIQRequest{} + var updateIndicators bool = false + this.UpdateIndicators = &updateIndicators + return &this +} + +// GetDfiqYaml returns the DfiqYaml field value +func (o *PatchDFIQRequest) GetDfiqYaml() string { + if o == nil { + var ret string + return ret + } + + return o.DfiqYaml +} + +// GetDfiqYamlOk returns a tuple with the DfiqYaml field value +// and a boolean to check if the value has been set. +func (o *PatchDFIQRequest) GetDfiqYamlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DfiqYaml, true +} + +// SetDfiqYaml sets field value +func (o *PatchDFIQRequest) SetDfiqYaml(v string) { + o.DfiqYaml = v +} + +// GetDfiqType returns the DfiqType field value +func (o *PatchDFIQRequest) GetDfiqType() DFIQType { + if o == nil { + var ret DFIQType + return ret + } + + return o.DfiqType +} + +// GetDfiqTypeOk returns a tuple with the DfiqType field value +// and a boolean to check if the value has been set. +func (o *PatchDFIQRequest) GetDfiqTypeOk() (*DFIQType, bool) { + if o == nil { + return nil, false + } + return &o.DfiqType, true +} + +// SetDfiqType sets field value +func (o *PatchDFIQRequest) SetDfiqType(v DFIQType) { + o.DfiqType = v +} + +// GetUpdateIndicators returns the UpdateIndicators field value if set, zero value otherwise. +func (o *PatchDFIQRequest) GetUpdateIndicators() bool { + if o == nil || IsNil(o.UpdateIndicators) { + var ret bool + return ret + } + return *o.UpdateIndicators +} + +// GetUpdateIndicatorsOk returns a tuple with the UpdateIndicators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchDFIQRequest) GetUpdateIndicatorsOk() (*bool, bool) { + if o == nil || IsNil(o.UpdateIndicators) { + return nil, false + } + return o.UpdateIndicators, true +} + +// HasUpdateIndicators returns a boolean if a field has been set. +func (o *PatchDFIQRequest) HasUpdateIndicators() bool { + if o != nil && !IsNil(o.UpdateIndicators) { + return true + } + + return false +} + +// SetUpdateIndicators gets a reference to the given bool and assigns it to the UpdateIndicators field. +func (o *PatchDFIQRequest) SetUpdateIndicators(v bool) { + o.UpdateIndicators = &v +} + +func (o PatchDFIQRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchDFIQRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dfiq_yaml"] = o.DfiqYaml + toSerialize["dfiq_type"] = o.DfiqType + if !IsNil(o.UpdateIndicators) { + toSerialize["update_indicators"] = o.UpdateIndicators + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchDFIQRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dfiq_yaml", + "dfiq_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchDFIQRequest := _PatchDFIQRequest{} + + err = json.Unmarshal(data, &varPatchDFIQRequest) + + if err != nil { + return err + } + + *o = PatchDFIQRequest(varPatchDFIQRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "dfiq_yaml") + delete(additionalProperties, "dfiq_type") + delete(additionalProperties, "update_indicators") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchDFIQRequest struct { + value *PatchDFIQRequest + isSet bool +} + +func (v NullablePatchDFIQRequest) Get() *PatchDFIQRequest { + return v.value +} + +func (v *NullablePatchDFIQRequest) Set(val *PatchDFIQRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchDFIQRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchDFIQRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchDFIQRequest(val *PatchDFIQRequest) *NullablePatchDFIQRequest { + return &NullablePatchDFIQRequest{value: val, isSet: true} +} + +func (v NullablePatchDFIQRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchDFIQRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_patch_entity_request.go b/model_patch_entity_request.go new file mode 100644 index 0000000..2074746 --- /dev/null +++ b/model_patch_entity_request.go @@ -0,0 +1,166 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the PatchEntityRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchEntityRequest{} + +// PatchEntityRequest struct for PatchEntityRequest +type PatchEntityRequest struct { + Entity Entity1 `json:"entity"` + AdditionalProperties map[string]interface{} +} + +type _PatchEntityRequest PatchEntityRequest + +// NewPatchEntityRequest instantiates a new PatchEntityRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchEntityRequest(entity Entity1) *PatchEntityRequest { + this := PatchEntityRequest{} + this.Entity = entity + return &this +} + +// NewPatchEntityRequestWithDefaults instantiates a new PatchEntityRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchEntityRequestWithDefaults() *PatchEntityRequest { + this := PatchEntityRequest{} + return &this +} + +// GetEntity returns the Entity field value +func (o *PatchEntityRequest) GetEntity() Entity1 { + if o == nil { + var ret Entity1 + return ret + } + + return o.Entity +} + +// GetEntityOk returns a tuple with the Entity field value +// and a boolean to check if the value has been set. +func (o *PatchEntityRequest) GetEntityOk() (*Entity1, bool) { + if o == nil { + return nil, false + } + return &o.Entity, true +} + +// SetEntity sets field value +func (o *PatchEntityRequest) SetEntity(v Entity1) { + o.Entity = v +} + +func (o PatchEntityRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchEntityRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["entity"] = o.Entity + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchEntityRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "entity", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchEntityRequest := _PatchEntityRequest{} + + err = json.Unmarshal(data, &varPatchEntityRequest) + + if err != nil { + return err + } + + *o = PatchEntityRequest(varPatchEntityRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "entity") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchEntityRequest struct { + value *PatchEntityRequest + isSet bool +} + +func (v NullablePatchEntityRequest) Get() *PatchEntityRequest { + return v.value +} + +func (v *NullablePatchEntityRequest) Set(val *PatchEntityRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchEntityRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchEntityRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchEntityRequest(val *PatchEntityRequest) *NullablePatchEntityRequest { + return &NullablePatchEntityRequest{value: val, isSet: true} +} + +func (v NullablePatchEntityRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchEntityRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_patch_export_request.go b/model_patch_export_request.go new file mode 100644 index 0000000..4e9f1d6 --- /dev/null +++ b/model_patch_export_request.go @@ -0,0 +1,166 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the PatchExportRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchExportRequest{} + +// PatchExportRequest struct for PatchExportRequest +type PatchExportRequest struct { + Export ExportTaskInput `json:"export"` + AdditionalProperties map[string]interface{} +} + +type _PatchExportRequest PatchExportRequest + +// NewPatchExportRequest instantiates a new PatchExportRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchExportRequest(export ExportTaskInput) *PatchExportRequest { + this := PatchExportRequest{} + this.Export = export + return &this +} + +// NewPatchExportRequestWithDefaults instantiates a new PatchExportRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchExportRequestWithDefaults() *PatchExportRequest { + this := PatchExportRequest{} + return &this +} + +// GetExport returns the Export field value +func (o *PatchExportRequest) GetExport() ExportTaskInput { + if o == nil { + var ret ExportTaskInput + return ret + } + + return o.Export +} + +// GetExportOk returns a tuple with the Export field value +// and a boolean to check if the value has been set. +func (o *PatchExportRequest) GetExportOk() (*ExportTaskInput, bool) { + if o == nil { + return nil, false + } + return &o.Export, true +} + +// SetExport sets field value +func (o *PatchExportRequest) SetExport(v ExportTaskInput) { + o.Export = v +} + +func (o PatchExportRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchExportRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["export"] = o.Export + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchExportRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "export", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchExportRequest := _PatchExportRequest{} + + err = json.Unmarshal(data, &varPatchExportRequest) + + if err != nil { + return err + } + + *o = PatchExportRequest(varPatchExportRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "export") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchExportRequest struct { + value *PatchExportRequest + isSet bool +} + +func (v NullablePatchExportRequest) Get() *PatchExportRequest { + return v.value +} + +func (v *NullablePatchExportRequest) Set(val *PatchExportRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchExportRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchExportRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchExportRequest(val *PatchExportRequest) *NullablePatchExportRequest { + return &NullablePatchExportRequest{value: val, isSet: true} +} + +func (v NullablePatchExportRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchExportRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_patch_indicator_request.go b/model_patch_indicator_request.go new file mode 100644 index 0000000..af8f7c8 --- /dev/null +++ b/model_patch_indicator_request.go @@ -0,0 +1,166 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the PatchIndicatorRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchIndicatorRequest{} + +// PatchIndicatorRequest struct for PatchIndicatorRequest +type PatchIndicatorRequest struct { + Indicator Indicator1 `json:"indicator"` + AdditionalProperties map[string]interface{} +} + +type _PatchIndicatorRequest PatchIndicatorRequest + +// NewPatchIndicatorRequest instantiates a new PatchIndicatorRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchIndicatorRequest(indicator Indicator1) *PatchIndicatorRequest { + this := PatchIndicatorRequest{} + this.Indicator = indicator + return &this +} + +// NewPatchIndicatorRequestWithDefaults instantiates a new PatchIndicatorRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchIndicatorRequestWithDefaults() *PatchIndicatorRequest { + this := PatchIndicatorRequest{} + return &this +} + +// GetIndicator returns the Indicator field value +func (o *PatchIndicatorRequest) GetIndicator() Indicator1 { + if o == nil { + var ret Indicator1 + return ret + } + + return o.Indicator +} + +// GetIndicatorOk returns a tuple with the Indicator field value +// and a boolean to check if the value has been set. +func (o *PatchIndicatorRequest) GetIndicatorOk() (*Indicator1, bool) { + if o == nil { + return nil, false + } + return &o.Indicator, true +} + +// SetIndicator sets field value +func (o *PatchIndicatorRequest) SetIndicator(v Indicator1) { + o.Indicator = v +} + +func (o PatchIndicatorRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchIndicatorRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["indicator"] = o.Indicator + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchIndicatorRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "indicator", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchIndicatorRequest := _PatchIndicatorRequest{} + + err = json.Unmarshal(data, &varPatchIndicatorRequest) + + if err != nil { + return err + } + + *o = PatchIndicatorRequest(varPatchIndicatorRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "indicator") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchIndicatorRequest struct { + value *PatchIndicatorRequest + isSet bool +} + +func (v NullablePatchIndicatorRequest) Get() *PatchIndicatorRequest { + return v.value +} + +func (v *NullablePatchIndicatorRequest) Set(val *PatchIndicatorRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchIndicatorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchIndicatorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchIndicatorRequest(val *PatchIndicatorRequest) *NullablePatchIndicatorRequest { + return &NullablePatchIndicatorRequest{value: val, isSet: true} +} + +func (v NullablePatchIndicatorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchIndicatorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_patch_observable_request.go b/model_patch_observable_request.go new file mode 100644 index 0000000..d50e26a --- /dev/null +++ b/model_patch_observable_request.go @@ -0,0 +1,166 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the PatchObservableRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchObservableRequest{} + +// PatchObservableRequest struct for PatchObservableRequest +type PatchObservableRequest struct { + Observable Observable1 `json:"observable"` + AdditionalProperties map[string]interface{} +} + +type _PatchObservableRequest PatchObservableRequest + +// NewPatchObservableRequest instantiates a new PatchObservableRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchObservableRequest(observable Observable1) *PatchObservableRequest { + this := PatchObservableRequest{} + this.Observable = observable + return &this +} + +// NewPatchObservableRequestWithDefaults instantiates a new PatchObservableRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchObservableRequestWithDefaults() *PatchObservableRequest { + this := PatchObservableRequest{} + return &this +} + +// GetObservable returns the Observable field value +func (o *PatchObservableRequest) GetObservable() Observable1 { + if o == nil { + var ret Observable1 + return ret + } + + return o.Observable +} + +// GetObservableOk returns a tuple with the Observable field value +// and a boolean to check if the value has been set. +func (o *PatchObservableRequest) GetObservableOk() (*Observable1, bool) { + if o == nil { + return nil, false + } + return &o.Observable, true +} + +// SetObservable sets field value +func (o *PatchObservableRequest) SetObservable(v Observable1) { + o.Observable = v +} + +func (o PatchObservableRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchObservableRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["observable"] = o.Observable + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchObservableRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "observable", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchObservableRequest := _PatchObservableRequest{} + + err = json.Unmarshal(data, &varPatchObservableRequest) + + if err != nil { + return err + } + + *o = PatchObservableRequest(varPatchObservableRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "observable") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchObservableRequest struct { + value *PatchObservableRequest + isSet bool +} + +func (v NullablePatchObservableRequest) Get() *PatchObservableRequest { + return v.value +} + +func (v *NullablePatchObservableRequest) Set(val *PatchObservableRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchObservableRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchObservableRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchObservableRequest(val *PatchObservableRequest) *NullablePatchObservableRequest { + return &NullablePatchObservableRequest{value: val, isSet: true} +} + +func (v NullablePatchObservableRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchObservableRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_path_input.go b/model_path_input.go new file mode 100644 index 0000000..76c7b2e --- /dev/null +++ b/model_path_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PathInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PathInput{} + +// PathInput struct for PathInput +type PathInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _PathInput PathInput + +// NewPathInput instantiates a new PathInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPathInput(value string) *PathInput { + this := PathInput{} + this.Value = value + var type_ string = "path" + this.Type = &type_ + return &this +} + +// NewPathInputWithDefaults instantiates a new PathInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPathInputWithDefaults() *PathInput { + this := PathInput{} + var type_ string = "path" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *PathInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *PathInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *PathInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PathInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PathInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PathInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PathInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *PathInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PathInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *PathInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *PathInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *PathInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PathInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *PathInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *PathInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *PathInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PathInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *PathInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *PathInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o PathInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PathInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *PathInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPathInput := _PathInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPathInput) + + if err != nil { + return err + } + + *o = PathInput(varPathInput) + + return err +} + +type NullablePathInput struct { + value *PathInput + isSet bool +} + +func (v NullablePathInput) Get() *PathInput { + return v.value +} + +func (v *NullablePathInput) Set(val *PathInput) { + v.value = val + v.isSet = true +} + +func (v NullablePathInput) IsSet() bool { + return v.isSet +} + +func (v *NullablePathInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePathInput(val *PathInput) *NullablePathInput { + return &NullablePathInput{value: val, isSet: true} +} + +func (v NullablePathInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePathInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_path_output.go b/model_path_output.go new file mode 100644 index 0000000..0aca4e3 --- /dev/null +++ b/model_path_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PathOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PathOutput{} + +// PathOutput struct for PathOutput +type PathOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _PathOutput PathOutput + +// NewPathOutput instantiates a new PathOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPathOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *PathOutput { + this := PathOutput{} + this.Value = value + var type_ string = "path" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewPathOutputWithDefaults instantiates a new PathOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPathOutputWithDefaults() *PathOutput { + this := PathOutput{} + var type_ string = "path" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *PathOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *PathOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *PathOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PathOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PathOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PathOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PathOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *PathOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PathOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *PathOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *PathOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *PathOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PathOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *PathOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *PathOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *PathOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PathOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *PathOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *PathOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *PathOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *PathOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *PathOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *PathOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *PathOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *PathOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *PathOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *PathOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *PathOutput) SetRootType(v string) { + o.RootType = v +} + +func (o PathOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PathOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *PathOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPathOutput := _PathOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPathOutput) + + if err != nil { + return err + } + + *o = PathOutput(varPathOutput) + + return err +} + +type NullablePathOutput struct { + value *PathOutput + isSet bool +} + +func (v NullablePathOutput) Get() *PathOutput { + return v.value +} + +func (v *NullablePathOutput) Set(val *PathOutput) { + v.value = val + v.isSet = true +} + +func (v NullablePathOutput) IsSet() bool { + return v.isSet +} + +func (v *NullablePathOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePathOutput(val *PathOutput) *NullablePathOutput { + return &NullablePathOutput{value: val, isSet: true} +} + +func (v NullablePathOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePathOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_paths_inner_inner.go b/model_paths_inner_inner.go new file mode 100644 index 0000000..e40d91f --- /dev/null +++ b/model_paths_inner_inner.go @@ -0,0 +1,103 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// PathsInnerInner struct for PathsInnerInner +type PathsInnerInner struct { + Relationship *Relationship + TagRelationshipOutput *TagRelationshipOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *PathsInnerInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into Relationship + err = json.Unmarshal(data, &dst.Relationship) + if err == nil { + jsonRelationship, _ := json.Marshal(dst.Relationship) + if string(jsonRelationship) == "{}" { // empty struct + dst.Relationship = nil + } else { + return nil // data stored in dst.Relationship, return on the first match + } + } else { + dst.Relationship = nil + } + + // try to unmarshal JSON data into TagRelationshipOutput + err = json.Unmarshal(data, &dst.TagRelationshipOutput) + if err == nil { + jsonTagRelationshipOutput, _ := json.Marshal(dst.TagRelationshipOutput) + if string(jsonTagRelationshipOutput) == "{}" { // empty struct + dst.TagRelationshipOutput = nil + } else { + return nil // data stored in dst.TagRelationshipOutput, return on the first match + } + } else { + dst.TagRelationshipOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(PathsInnerInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src PathsInnerInner) MarshalJSON() ([]byte, error) { + if src.Relationship != nil { + return json.Marshal(&src.Relationship) + } + + if src.TagRelationshipOutput != nil { + return json.Marshal(&src.TagRelationshipOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullablePathsInnerInner struct { + value *PathsInnerInner + isSet bool +} + +func (v NullablePathsInnerInner) Get() *PathsInnerInner { + return v.value +} + +func (v *NullablePathsInnerInner) Set(val *PathsInnerInner) { + v.value = val + v.isSet = true +} + +func (v NullablePathsInnerInner) IsSet() bool { + return v.isSet +} + +func (v *NullablePathsInnerInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePathsInnerInner(val *PathsInnerInner) *NullablePathsInnerInner { + return &NullablePathsInnerInner{value: val, isSet: true} +} + +func (v NullablePathsInnerInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePathsInnerInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_phone_input.go b/model_phone_input.go new file mode 100644 index 0000000..1f20bdd --- /dev/null +++ b/model_phone_input.go @@ -0,0 +1,345 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PhoneInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PhoneInput{} + +// PhoneInput struct for PhoneInput +type PhoneInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` +} + +type _PhoneInput PhoneInput + +// NewPhoneInput instantiates a new PhoneInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPhoneInput(name string) *PhoneInput { + this := PhoneInput{} + var type_ string = "phone" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + return &this +} + +// NewPhoneInputWithDefaults instantiates a new PhoneInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPhoneInputWithDefaults() *PhoneInput { + this := PhoneInput{} + var type_ string = "phone" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PhoneInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PhoneInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PhoneInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *PhoneInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PhoneInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PhoneInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PhoneInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PhoneInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PhoneInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *PhoneInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *PhoneInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *PhoneInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *PhoneInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *PhoneInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *PhoneInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *PhoneInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *PhoneInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *PhoneInput) SetModified(v time.Time) { + o.Modified = &v +} + +func (o PhoneInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PhoneInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + return toSerialize, nil +} + +func (o *PhoneInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPhoneInput := _PhoneInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPhoneInput) + + if err != nil { + return err + } + + *o = PhoneInput(varPhoneInput) + + return err +} + +type NullablePhoneInput struct { + value *PhoneInput + isSet bool +} + +func (v NullablePhoneInput) Get() *PhoneInput { + return v.value +} + +func (v *NullablePhoneInput) Set(val *PhoneInput) { + v.value = val + v.isSet = true +} + +func (v NullablePhoneInput) IsSet() bool { + return v.isSet +} + +func (v *NullablePhoneInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePhoneInput(val *PhoneInput) *NullablePhoneInput { + return &NullablePhoneInput{value: val, isSet: true} +} + +func (v NullablePhoneInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePhoneInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_phone_output.go b/model_phone_output.go new file mode 100644 index 0000000..c9aea40 --- /dev/null +++ b/model_phone_output.go @@ -0,0 +1,457 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PhoneOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PhoneOutput{} + +// PhoneOutput struct for PhoneOutput +type PhoneOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _PhoneOutput PhoneOutput + +// NewPhoneOutput instantiates a new PhoneOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPhoneOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *PhoneOutput { + this := PhoneOutput{} + var type_ string = "phone" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewPhoneOutputWithDefaults instantiates a new PhoneOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPhoneOutputWithDefaults() *PhoneOutput { + this := PhoneOutput{} + var type_ string = "phone" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PhoneOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PhoneOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PhoneOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *PhoneOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PhoneOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PhoneOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PhoneOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PhoneOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *PhoneOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *PhoneOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *PhoneOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *PhoneOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *PhoneOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *PhoneOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *PhoneOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *PhoneOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *PhoneOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetId returns the Id field value +func (o *PhoneOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *PhoneOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *PhoneOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *PhoneOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *PhoneOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *PhoneOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *PhoneOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *PhoneOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *PhoneOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o PhoneOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PhoneOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *PhoneOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPhoneOutput := _PhoneOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPhoneOutput) + + if err != nil { + return err + } + + *o = PhoneOutput(varPhoneOutput) + + return err +} + +type NullablePhoneOutput struct { + value *PhoneOutput + isSet bool +} + +func (v NullablePhoneOutput) Get() *PhoneOutput { + return v.value +} + +func (v *NullablePhoneOutput) Set(val *PhoneOutput) { + v.value = val + v.isSet = true +} + +func (v NullablePhoneOutput) IsSet() bool { + return v.isSet +} + +func (v *NullablePhoneOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePhoneOutput(val *PhoneOutput) *NullablePhoneOutput { + return &NullablePhoneOutput{value: val, isSet: true} +} + +func (v NullablePhoneOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePhoneOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_query_input.go b/model_query_input.go new file mode 100644 index 0000000..77ec55b --- /dev/null +++ b/model_query_input.go @@ -0,0 +1,613 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the QueryInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueryInput{} + +// QueryInput Represents a query that can be sent to another system. +type QueryInput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + QueryType string `json:"query_type"` + TargetSystems []string `json:"target_systems,omitempty"` +} + +type _QueryInput QueryInput + +// NewQueryInput instantiates a new QueryInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueryInput(name string, pattern string, diamond DiamondModel, queryType string) *QueryInput { + this := QueryInput{} + this.Name = name + var type_ string = "query" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + this.QueryType = queryType + return &this +} + +// NewQueryInputWithDefaults instantiates a new QueryInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueryInputWithDefaults() *QueryInput { + this := QueryInput{} + var type_ string = "query" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *QueryInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *QueryInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *QueryInput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *QueryInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *QueryInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *QueryInput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *QueryInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *QueryInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *QueryInput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *QueryInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *QueryInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *QueryInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *QueryInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *QueryInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *QueryInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *QueryInput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *QueryInput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *QueryInput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *QueryInput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *QueryInput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *QueryInput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *QueryInput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *QueryInput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *QueryInput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *QueryInput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *QueryInput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *QueryInput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *QueryInput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *QueryInput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *QueryInput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *QueryInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *QueryInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *QueryInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *QueryInput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *QueryInput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *QueryInput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetQueryType returns the QueryType field value +func (o *QueryInput) GetQueryType() string { + if o == nil { + var ret string + return ret + } + + return o.QueryType +} + +// GetQueryTypeOk returns a tuple with the QueryType field value +// and a boolean to check if the value has been set. +func (o *QueryInput) GetQueryTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.QueryType, true +} + +// SetQueryType sets field value +func (o *QueryInput) SetQueryType(v string) { + o.QueryType = v +} + +// GetTargetSystems returns the TargetSystems field value if set, zero value otherwise. +func (o *QueryInput) GetTargetSystems() []string { + if o == nil || IsNil(o.TargetSystems) { + var ret []string + return ret + } + return o.TargetSystems +} + +// GetTargetSystemsOk returns a tuple with the TargetSystems field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryInput) GetTargetSystemsOk() ([]string, bool) { + if o == nil || IsNil(o.TargetSystems) { + return nil, false + } + return o.TargetSystems, true +} + +// HasTargetSystems returns a boolean if a field has been set. +func (o *QueryInput) HasTargetSystems() bool { + if o != nil && !IsNil(o.TargetSystems) { + return true + } + + return false +} + +// SetTargetSystems gets a reference to the given []string and assigns it to the TargetSystems field. +func (o *QueryInput) SetTargetSystems(v []string) { + o.TargetSystems = v +} + +func (o QueryInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueryInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + toSerialize["query_type"] = o.QueryType + if !IsNil(o.TargetSystems) { + toSerialize["target_systems"] = o.TargetSystems + } + return toSerialize, nil +} + +func (o *QueryInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + "query_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueryInput := _QueryInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueryInput) + + if err != nil { + return err + } + + *o = QueryInput(varQueryInput) + + return err +} + +type NullableQueryInput struct { + value *QueryInput + isSet bool +} + +func (v NullableQueryInput) Get() *QueryInput { + return v.value +} + +func (v *NullableQueryInput) Set(val *QueryInput) { + v.value = val + v.isSet = true +} + +func (v NullableQueryInput) IsSet() bool { + return v.isSet +} + +func (v *NullableQueryInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueryInput(val *QueryInput) *NullableQueryInput { + return &NullableQueryInput{value: val, isSet: true} +} + +func (v NullableQueryInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueryInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_query_output.go b/model_query_output.go new file mode 100644 index 0000000..2952941 --- /dev/null +++ b/model_query_output.go @@ -0,0 +1,697 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the QueryOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueryOutput{} + +// QueryOutput Represents a query that can be sent to another system. +type QueryOutput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + QueryType string `json:"query_type"` + TargetSystems []string `json:"target_systems,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _QueryOutput QueryOutput + +// NewQueryOutput instantiates a new QueryOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueryOutput(name string, pattern string, diamond DiamondModel, queryType string, id string, tags map[string]TagRelationshipOutput, rootType string) *QueryOutput { + this := QueryOutput{} + this.Name = name + var type_ string = "query" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + this.QueryType = queryType + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewQueryOutputWithDefaults instantiates a new QueryOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueryOutputWithDefaults() *QueryOutput { + this := QueryOutput{} + var type_ string = "query" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *QueryOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *QueryOutput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *QueryOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *QueryOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *QueryOutput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *QueryOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *QueryOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *QueryOutput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *QueryOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *QueryOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *QueryOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *QueryOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *QueryOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *QueryOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *QueryOutput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *QueryOutput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *QueryOutput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *QueryOutput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *QueryOutput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *QueryOutput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *QueryOutput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *QueryOutput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *QueryOutput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *QueryOutput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *QueryOutput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *QueryOutput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *QueryOutput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *QueryOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *QueryOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *QueryOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *QueryOutput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *QueryOutput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *QueryOutput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetQueryType returns the QueryType field value +func (o *QueryOutput) GetQueryType() string { + if o == nil { + var ret string + return ret + } + + return o.QueryType +} + +// GetQueryTypeOk returns a tuple with the QueryType field value +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetQueryTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.QueryType, true +} + +// SetQueryType sets field value +func (o *QueryOutput) SetQueryType(v string) { + o.QueryType = v +} + +// GetTargetSystems returns the TargetSystems field value if set, zero value otherwise. +func (o *QueryOutput) GetTargetSystems() []string { + if o == nil || IsNil(o.TargetSystems) { + var ret []string + return ret + } + return o.TargetSystems +} + +// GetTargetSystemsOk returns a tuple with the TargetSystems field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetTargetSystemsOk() ([]string, bool) { + if o == nil || IsNil(o.TargetSystems) { + return nil, false + } + return o.TargetSystems, true +} + +// HasTargetSystems returns a boolean if a field has been set. +func (o *QueryOutput) HasTargetSystems() bool { + if o != nil && !IsNil(o.TargetSystems) { + return true + } + + return false +} + +// SetTargetSystems gets a reference to the given []string and assigns it to the TargetSystems field. +func (o *QueryOutput) SetTargetSystems(v []string) { + o.TargetSystems = v +} + +// GetId returns the Id field value +func (o *QueryOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *QueryOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *QueryOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *QueryOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *QueryOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *QueryOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *QueryOutput) SetRootType(v string) { + o.RootType = v +} + +func (o QueryOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueryOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + toSerialize["query_type"] = o.QueryType + if !IsNil(o.TargetSystems) { + toSerialize["target_systems"] = o.TargetSystems + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *QueryOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + "query_type", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueryOutput := _QueryOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueryOutput) + + if err != nil { + return err + } + + *o = QueryOutput(varQueryOutput) + + return err +} + +type NullableQueryOutput struct { + value *QueryOutput + isSet bool +} + +func (v NullableQueryOutput) Get() *QueryOutput { + return v.value +} + +func (v *NullableQueryOutput) Set(val *QueryOutput) { + v.value = val + v.isSet = true +} + +func (v NullableQueryOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableQueryOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueryOutput(val *QueryOutput) *NullableQueryOutput { + return &NullableQueryOutput{value: val, isSet: true} +} + +func (v NullableQueryOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueryOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_query_value.go b/model_query_value.go new file mode 100644 index 0000000..f826374 --- /dev/null +++ b/model_query_value.go @@ -0,0 +1,121 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// QueryValue struct for QueryValue +type QueryValue struct { + ArrayOfAny *[]interface{} + Int32 *int32 + String *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *QueryValue) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ArrayOfAny + err = json.Unmarshal(data, &dst.ArrayOfAny) + if err == nil { + jsonArrayOfAny, _ := json.Marshal(dst.ArrayOfAny) + if string(jsonArrayOfAny) == "{}" { // empty struct + dst.ArrayOfAny = nil + } else { + return nil // data stored in dst.ArrayOfAny, return on the first match + } + } else { + dst.ArrayOfAny = nil + } + + // try to unmarshal JSON data into Int32 + err = json.Unmarshal(data, &dst.Int32) + if err == nil { + jsonInt32, _ := json.Marshal(dst.Int32) + if string(jsonInt32) == "{}" { // empty struct + dst.Int32 = nil + } else { + return nil // data stored in dst.Int32, return on the first match + } + } else { + dst.Int32 = nil + } + + // try to unmarshal JSON data into String + err = json.Unmarshal(data, &dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + return nil // data stored in dst.String, return on the first match + } + } else { + dst.String = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(QueryValue)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src QueryValue) MarshalJSON() ([]byte, error) { + if src.ArrayOfAny != nil { + return json.Marshal(&src.ArrayOfAny) + } + + if src.Int32 != nil { + return json.Marshal(&src.Int32) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableQueryValue struct { + value *QueryValue + isSet bool +} + +func (v NullableQueryValue) Get() *QueryValue { + return v.value +} + +func (v *NullableQueryValue) Set(val *QueryValue) { + v.value = val + v.isSet = true +} + +func (v NullableQueryValue) IsSet() bool { + return v.isSet +} + +func (v *NullableQueryValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueryValue(val *QueryValue) *NullableQueryValue { + return &NullableQueryValue{value: val, isSet: true} +} + +func (v NullableQueryValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueryValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_regex_input.go b/model_regex_input.go new file mode 100644 index 0000000..96440b3 --- /dev/null +++ b/model_regex_input.go @@ -0,0 +1,549 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the RegexInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegexInput{} + +// RegexInput struct for RegexInput +type RegexInput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` +} + +type _RegexInput RegexInput + +// NewRegexInput instantiates a new RegexInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRegexInput(name string, pattern string, diamond DiamondModel) *RegexInput { + this := RegexInput{} + this.Name = name + var type_ string = "regex" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + return &this +} + +// NewRegexInputWithDefaults instantiates a new RegexInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRegexInputWithDefaults() *RegexInput { + this := RegexInput{} + var type_ string = "regex" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *RegexInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RegexInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RegexInput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RegexInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RegexInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RegexInput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RegexInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RegexInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RegexInput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *RegexInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *RegexInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *RegexInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *RegexInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *RegexInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *RegexInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *RegexInput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *RegexInput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *RegexInput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *RegexInput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *RegexInput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *RegexInput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *RegexInput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *RegexInput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *RegexInput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *RegexInput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *RegexInput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *RegexInput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *RegexInput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *RegexInput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *RegexInput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *RegexInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *RegexInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *RegexInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *RegexInput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexInput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *RegexInput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *RegexInput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +func (o RegexInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RegexInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + return toSerialize, nil +} + +func (o *RegexInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRegexInput := _RegexInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRegexInput) + + if err != nil { + return err + } + + *o = RegexInput(varRegexInput) + + return err +} + +type NullableRegexInput struct { + value *RegexInput + isSet bool +} + +func (v NullableRegexInput) Get() *RegexInput { + return v.value +} + +func (v *NullableRegexInput) Set(val *RegexInput) { + v.value = val + v.isSet = true +} + +func (v NullableRegexInput) IsSet() bool { + return v.isSet +} + +func (v *NullableRegexInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegexInput(val *RegexInput) *NullableRegexInput { + return &NullableRegexInput{value: val, isSet: true} +} + +func (v NullableRegexInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegexInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_regex_output.go b/model_regex_output.go new file mode 100644 index 0000000..0af4837 --- /dev/null +++ b/model_regex_output.go @@ -0,0 +1,633 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the RegexOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegexOutput{} + +// RegexOutput struct for RegexOutput +type RegexOutput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _RegexOutput RegexOutput + +// NewRegexOutput instantiates a new RegexOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRegexOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string) *RegexOutput { + this := RegexOutput{} + this.Name = name + var type_ string = "regex" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewRegexOutputWithDefaults instantiates a new RegexOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRegexOutputWithDefaults() *RegexOutput { + this := RegexOutput{} + var type_ string = "regex" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *RegexOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RegexOutput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RegexOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RegexOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RegexOutput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RegexOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RegexOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RegexOutput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *RegexOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *RegexOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *RegexOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *RegexOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *RegexOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *RegexOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *RegexOutput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *RegexOutput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *RegexOutput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *RegexOutput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *RegexOutput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *RegexOutput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *RegexOutput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *RegexOutput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *RegexOutput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *RegexOutput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *RegexOutput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *RegexOutput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *RegexOutput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *RegexOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *RegexOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *RegexOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *RegexOutput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *RegexOutput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *RegexOutput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetId returns the Id field value +func (o *RegexOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RegexOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *RegexOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *RegexOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *RegexOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *RegexOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *RegexOutput) SetRootType(v string) { + o.RootType = v +} + +func (o RegexOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RegexOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *RegexOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRegexOutput := _RegexOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRegexOutput) + + if err != nil { + return err + } + + *o = RegexOutput(varRegexOutput) + + return err +} + +type NullableRegexOutput struct { + value *RegexOutput + isSet bool +} + +func (v NullableRegexOutput) Get() *RegexOutput { + return v.value +} + +func (v *NullableRegexOutput) Set(val *RegexOutput) { + v.value = val + v.isSet = true +} + +func (v NullableRegexOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableRegexOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegexOutput(val *RegexOutput) *NullableRegexOutput { + return &NullableRegexOutput{value: val, isSet: true} +} + +func (v NullableRegexOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegexOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_registry_hive.go b/model_registry_hive.go new file mode 100644 index 0000000..cb1ebe2 --- /dev/null +++ b/model_registry_hive.go @@ -0,0 +1,120 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// RegistryHive Registry Hive enum class. +type RegistryHive string + +// List of RegistryHive +const ( + CURRENT_CONFIG RegistryHive = "HKEY_CURRENT_CONFIG" + CURRENT_USER RegistryHive = "HKEY_CURRENT_USER" + LOCAL_MACHINE_SAM RegistryHive = "HKEY_LOCAL_MACHINE_SAM" + LOCAL_MACHINE_SECURITY RegistryHive = "HKEY_LOCAL_MACHINE_Security" + LOCAL_MACHINE_SOFTWARE RegistryHive = "HKEY_LOCAL_MACHINE_Software" + LOCAL_MACHINE_SYSTEM RegistryHive = "HKEY_LOCAL_MACHINE_System" + USERS_DEFAULT RegistryHive = "HKEY_USERS_DEFAULT" +) + +// All allowed values of RegistryHive enum +var AllowedRegistryHiveEnumValues = []RegistryHive{ + "HKEY_CURRENT_CONFIG", + "HKEY_CURRENT_USER", + "HKEY_LOCAL_MACHINE_SAM", + "HKEY_LOCAL_MACHINE_Security", + "HKEY_LOCAL_MACHINE_Software", + "HKEY_LOCAL_MACHINE_System", + "HKEY_USERS_DEFAULT", +} + +func (v *RegistryHive) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := RegistryHive(value) + for _, existing := range AllowedRegistryHiveEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid RegistryHive", value) +} + +// NewRegistryHiveFromValue returns a pointer to a valid RegistryHive +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewRegistryHiveFromValue(v string) (*RegistryHive, error) { + ev := RegistryHive(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for RegistryHive: valid values are %v", v, AllowedRegistryHiveEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v RegistryHive) IsValid() bool { + for _, existing := range AllowedRegistryHiveEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to RegistryHive value +func (v RegistryHive) Ptr() *RegistryHive { + return &v +} + +type NullableRegistryHive struct { + value *RegistryHive + isSet bool +} + +func (v NullableRegistryHive) Get() *RegistryHive { + return v.value +} + +func (v *NullableRegistryHive) Set(val *RegistryHive) { + v.value = val + v.isSet = true +} + +func (v NullableRegistryHive) IsSet() bool { + return v.isSet +} + +func (v *NullableRegistryHive) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegistryHive(val *RegistryHive) *NullableRegistryHive { + return &NullableRegistryHive{value: val, isSet: true} +} + +func (v NullableRegistryHive) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegistryHive) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_registry_key_input.go b/model_registry_key_input.go new file mode 100644 index 0000000..6a5f792 --- /dev/null +++ b/model_registry_key_input.go @@ -0,0 +1,437 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + "time" +) + +// checks if the RegistryKeyInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegistryKeyInput{} + +// RegistryKeyInput Registry Key observable schema class. Attributes: key: The registry key name. value: The registry key value. hive: The registry hive like SYSEM, SOFTWARE, etc. path_file: The filesystem path to the file that contains the registry key value. +type RegistryKeyInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Key string `json:"key"` + Data *os.File `json:"data"` + Hive RegistryHive `json:"hive"` + PathFile NullableString `json:"path_file,omitempty"` +} + +type _RegistryKeyInput RegistryKeyInput + +// NewRegistryKeyInput instantiates a new RegistryKeyInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRegistryKeyInput(value string, key string, data *os.File, hive RegistryHive) *RegistryKeyInput { + this := RegistryKeyInput{} + this.Value = value + var type_ string = "registry_key" + this.Type = &type_ + this.Key = key + this.Data = data + this.Hive = hive + return &this +} + +// NewRegistryKeyInputWithDefaults instantiates a new RegistryKeyInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRegistryKeyInputWithDefaults() *RegistryKeyInput { + this := RegistryKeyInput{} + var type_ string = "registry_key" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *RegistryKeyInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *RegistryKeyInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RegistryKeyInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryKeyInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RegistryKeyInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RegistryKeyInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *RegistryKeyInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryKeyInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *RegistryKeyInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *RegistryKeyInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *RegistryKeyInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryKeyInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *RegistryKeyInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *RegistryKeyInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *RegistryKeyInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryKeyInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *RegistryKeyInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *RegistryKeyInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetKey returns the Key field value +func (o *RegistryKeyInput) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyInput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *RegistryKeyInput) SetKey(v string) { + o.Key = v +} + +// GetData returns the Data field value +func (o *RegistryKeyInput) GetData() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyInput) GetDataOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *RegistryKeyInput) SetData(v *os.File) { + o.Data = v +} + +// GetHive returns the Hive field value +func (o *RegistryKeyInput) GetHive() RegistryHive { + if o == nil { + var ret RegistryHive + return ret + } + + return o.Hive +} + +// GetHiveOk returns a tuple with the Hive field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyInput) GetHiveOk() (*RegistryHive, bool) { + if o == nil { + return nil, false + } + return &o.Hive, true +} + +// SetHive sets field value +func (o *RegistryKeyInput) SetHive(v RegistryHive) { + o.Hive = v +} + +// GetPathFile returns the PathFile field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RegistryKeyInput) GetPathFile() string { + if o == nil || IsNil(o.PathFile.Get()) { + var ret string + return ret + } + return *o.PathFile.Get() +} + +// GetPathFileOk returns a tuple with the PathFile field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RegistryKeyInput) GetPathFileOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PathFile.Get(), o.PathFile.IsSet() +} + +// HasPathFile returns a boolean if a field has been set. +func (o *RegistryKeyInput) HasPathFile() bool { + if o != nil && o.PathFile.IsSet() { + return true + } + + return false +} + +// SetPathFile gets a reference to the given NullableString and assigns it to the PathFile field. +func (o *RegistryKeyInput) SetPathFile(v string) { + o.PathFile.Set(&v) +} + +// SetPathFileNil sets the value for PathFile to be an explicit nil +func (o *RegistryKeyInput) SetPathFileNil() { + o.PathFile.Set(nil) +} + +// UnsetPathFile ensures that no value is present for PathFile, not even an explicit nil +func (o *RegistryKeyInput) UnsetPathFile() { + o.PathFile.Unset() +} + +func (o RegistryKeyInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RegistryKeyInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["key"] = o.Key + toSerialize["data"] = o.Data + toSerialize["hive"] = o.Hive + if o.PathFile.IsSet() { + toSerialize["path_file"] = o.PathFile.Get() + } + return toSerialize, nil +} + +func (o *RegistryKeyInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "key", + "data", + "hive", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRegistryKeyInput := _RegistryKeyInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRegistryKeyInput) + + if err != nil { + return err + } + + *o = RegistryKeyInput(varRegistryKeyInput) + + return err +} + +type NullableRegistryKeyInput struct { + value *RegistryKeyInput + isSet bool +} + +func (v NullableRegistryKeyInput) Get() *RegistryKeyInput { + return v.value +} + +func (v *NullableRegistryKeyInput) Set(val *RegistryKeyInput) { + v.value = val + v.isSet = true +} + +func (v NullableRegistryKeyInput) IsSet() bool { + return v.isSet +} + +func (v *NullableRegistryKeyInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegistryKeyInput(val *RegistryKeyInput) *NullableRegistryKeyInput { + return &NullableRegistryKeyInput{value: val, isSet: true} +} + +func (v NullableRegistryKeyInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegistryKeyInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_registry_key_output.go b/model_registry_key_output.go new file mode 100644 index 0000000..4b40482 --- /dev/null +++ b/model_registry_key_output.go @@ -0,0 +1,521 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + "time" +) + +// checks if the RegistryKeyOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegistryKeyOutput{} + +// RegistryKeyOutput Registry Key observable schema class. Attributes: key: The registry key name. value: The registry key value. hive: The registry hive like SYSEM, SOFTWARE, etc. path_file: The filesystem path to the file that contains the registry key value. +type RegistryKeyOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Key string `json:"key"` + Data *os.File `json:"data"` + Hive RegistryHive `json:"hive"` + PathFile NullableString `json:"path_file,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _RegistryKeyOutput RegistryKeyOutput + +// NewRegistryKeyOutput instantiates a new RegistryKeyOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRegistryKeyOutput(value string, key string, data *os.File, hive RegistryHive, id string, tags map[string]TagRelationshipOutput, rootType string) *RegistryKeyOutput { + this := RegistryKeyOutput{} + this.Value = value + var type_ string = "registry_key" + this.Type = &type_ + this.Key = key + this.Data = data + this.Hive = hive + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewRegistryKeyOutputWithDefaults instantiates a new RegistryKeyOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRegistryKeyOutputWithDefaults() *RegistryKeyOutput { + this := RegistryKeyOutput{} + var type_ string = "registry_key" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *RegistryKeyOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *RegistryKeyOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RegistryKeyOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RegistryKeyOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RegistryKeyOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *RegistryKeyOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *RegistryKeyOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *RegistryKeyOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *RegistryKeyOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *RegistryKeyOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *RegistryKeyOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *RegistryKeyOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *RegistryKeyOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *RegistryKeyOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetKey returns the Key field value +func (o *RegistryKeyOutput) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *RegistryKeyOutput) SetKey(v string) { + o.Key = v +} + +// GetData returns the Data field value +func (o *RegistryKeyOutput) GetData() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetDataOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *RegistryKeyOutput) SetData(v *os.File) { + o.Data = v +} + +// GetHive returns the Hive field value +func (o *RegistryKeyOutput) GetHive() RegistryHive { + if o == nil { + var ret RegistryHive + return ret + } + + return o.Hive +} + +// GetHiveOk returns a tuple with the Hive field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetHiveOk() (*RegistryHive, bool) { + if o == nil { + return nil, false + } + return &o.Hive, true +} + +// SetHive sets field value +func (o *RegistryKeyOutput) SetHive(v RegistryHive) { + o.Hive = v +} + +// GetPathFile returns the PathFile field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RegistryKeyOutput) GetPathFile() string { + if o == nil || IsNil(o.PathFile.Get()) { + var ret string + return ret + } + return *o.PathFile.Get() +} + +// GetPathFileOk returns a tuple with the PathFile field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RegistryKeyOutput) GetPathFileOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PathFile.Get(), o.PathFile.IsSet() +} + +// HasPathFile returns a boolean if a field has been set. +func (o *RegistryKeyOutput) HasPathFile() bool { + if o != nil && o.PathFile.IsSet() { + return true + } + + return false +} + +// SetPathFile gets a reference to the given NullableString and assigns it to the PathFile field. +func (o *RegistryKeyOutput) SetPathFile(v string) { + o.PathFile.Set(&v) +} + +// SetPathFileNil sets the value for PathFile to be an explicit nil +func (o *RegistryKeyOutput) SetPathFileNil() { + o.PathFile.Set(nil) +} + +// UnsetPathFile ensures that no value is present for PathFile, not even an explicit nil +func (o *RegistryKeyOutput) UnsetPathFile() { + o.PathFile.Unset() +} + +// GetId returns the Id field value +func (o *RegistryKeyOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RegistryKeyOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *RegistryKeyOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *RegistryKeyOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *RegistryKeyOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *RegistryKeyOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *RegistryKeyOutput) SetRootType(v string) { + o.RootType = v +} + +func (o RegistryKeyOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RegistryKeyOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["key"] = o.Key + toSerialize["data"] = o.Data + toSerialize["hive"] = o.Hive + if o.PathFile.IsSet() { + toSerialize["path_file"] = o.PathFile.Get() + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *RegistryKeyOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "key", + "data", + "hive", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRegistryKeyOutput := _RegistryKeyOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRegistryKeyOutput) + + if err != nil { + return err + } + + *o = RegistryKeyOutput(varRegistryKeyOutput) + + return err +} + +type NullableRegistryKeyOutput struct { + value *RegistryKeyOutput + isSet bool +} + +func (v NullableRegistryKeyOutput) Get() *RegistryKeyOutput { + return v.value +} + +func (v *NullableRegistryKeyOutput) Set(val *RegistryKeyOutput) { + v.value = val + v.isSet = true +} + +func (v NullableRegistryKeyOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableRegistryKeyOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegistryKeyOutput(val *RegistryKeyOutput) *NullableRegistryKeyOutput { + return &NullableRegistryKeyOutput{value: val, isSet: true} +} + +func (v NullableRegistryKeyOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegistryKeyOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_relationship.go b/model_relationship.go new file mode 100644 index 0000000..96d738c --- /dev/null +++ b/model_relationship.go @@ -0,0 +1,365 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Relationship type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Relationship{} + +// Relationship struct for Relationship +type Relationship struct { + Source string `json:"source"` + Target string `json:"target"` + Type string `json:"type"` + Count *int32 `json:"count,omitempty"` + Description string `json:"description"` + Created time.Time `json:"created"` + Modified time.Time `json:"modified"` + Id string `json:"id"` +} + +type _Relationship Relationship + +// NewRelationship instantiates a new Relationship object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationship(source string, target string, type_ string, description string, created time.Time, modified time.Time, id string) *Relationship { + this := Relationship{} + this.Source = source + this.Target = target + this.Type = type_ + var count int32 = 1 + this.Count = &count + this.Description = description + this.Created = created + this.Modified = modified + this.Id = id + return &this +} + +// NewRelationshipWithDefaults instantiates a new Relationship object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipWithDefaults() *Relationship { + this := Relationship{} + var count int32 = 1 + this.Count = &count + return &this +} + +// GetSource returns the Source field value +func (o *Relationship) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *Relationship) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *Relationship) SetSource(v string) { + o.Source = v +} + +// GetTarget returns the Target field value +func (o *Relationship) GetTarget() string { + if o == nil { + var ret string + return ret + } + + return o.Target +} + +// GetTargetOk returns a tuple with the Target field value +// and a boolean to check if the value has been set. +func (o *Relationship) GetTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Target, true +} + +// SetTarget sets field value +func (o *Relationship) SetTarget(v string) { + o.Target = v +} + +// GetType returns the Type field value +func (o *Relationship) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Relationship) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Relationship) SetType(v string) { + o.Type = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Relationship) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Relationship) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *Relationship) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *Relationship) SetCount(v int32) { + o.Count = &v +} + +// GetDescription returns the Description field value +func (o *Relationship) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *Relationship) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *Relationship) SetDescription(v string) { + o.Description = v +} + +// GetCreated returns the Created field value +func (o *Relationship) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Relationship) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Relationship) SetCreated(v time.Time) { + o.Created = v +} + +// GetModified returns the Modified field value +func (o *Relationship) GetModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value +// and a boolean to check if the value has been set. +func (o *Relationship) GetModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Modified, true +} + +// SetModified sets field value +func (o *Relationship) SetModified(v time.Time) { + o.Modified = v +} + +// GetId returns the Id field value +func (o *Relationship) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Relationship) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Relationship) SetId(v string) { + o.Id = v +} + +func (o Relationship) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Relationship) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source"] = o.Source + toSerialize["target"] = o.Target + toSerialize["type"] = o.Type + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + toSerialize["description"] = o.Description + toSerialize["created"] = o.Created + toSerialize["modified"] = o.Modified + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *Relationship) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source", + "target", + "type", + "description", + "created", + "modified", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRelationship := _Relationship{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRelationship) + + if err != nil { + return err + } + + *o = Relationship(varRelationship) + + return err +} + +type NullableRelationship struct { + value *Relationship + isSet bool +} + +func (v NullableRelationship) Get() *Relationship { + return v.value +} + +func (v *NullableRelationship) Set(val *Relationship) { + v.value = val + v.isSet = true +} + +func (v NullableRelationship) IsSet() bool { + return v.isSet +} + +func (v *NullableRelationship) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelationship(val *Relationship) *NullableRelationship { + return &NullableRelationship{value: val, isSet: true} +} + +func (v NullableRelationship) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelationship) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_render_template_request.go b/model_render_template_request.go new file mode 100644 index 0000000..092e66c --- /dev/null +++ b/model_render_template_request.go @@ -0,0 +1,240 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the RenderTemplateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RenderTemplateRequest{} + +// RenderTemplateRequest struct for RenderTemplateRequest +type RenderTemplateRequest struct { + TemplateName string `json:"template_name"` + ObservableIds []string `json:"observable_ids,omitempty"` + SearchQuery *SearchQuery `json:"search_query,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RenderTemplateRequest RenderTemplateRequest + +// NewRenderTemplateRequest instantiates a new RenderTemplateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRenderTemplateRequest(templateName string) *RenderTemplateRequest { + this := RenderTemplateRequest{} + this.TemplateName = templateName + return &this +} + +// NewRenderTemplateRequestWithDefaults instantiates a new RenderTemplateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRenderTemplateRequestWithDefaults() *RenderTemplateRequest { + this := RenderTemplateRequest{} + return &this +} + +// GetTemplateName returns the TemplateName field value +func (o *RenderTemplateRequest) GetTemplateName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateName +} + +// GetTemplateNameOk returns a tuple with the TemplateName field value +// and a boolean to check if the value has been set. +func (o *RenderTemplateRequest) GetTemplateNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateName, true +} + +// SetTemplateName sets field value +func (o *RenderTemplateRequest) SetTemplateName(v string) { + o.TemplateName = v +} + +// GetObservableIds returns the ObservableIds field value if set, zero value otherwise. +func (o *RenderTemplateRequest) GetObservableIds() []string { + if o == nil || IsNil(o.ObservableIds) { + var ret []string + return ret + } + return o.ObservableIds +} + +// GetObservableIdsOk returns a tuple with the ObservableIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RenderTemplateRequest) GetObservableIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ObservableIds) { + return nil, false + } + return o.ObservableIds, true +} + +// HasObservableIds returns a boolean if a field has been set. +func (o *RenderTemplateRequest) HasObservableIds() bool { + if o != nil && !IsNil(o.ObservableIds) { + return true + } + + return false +} + +// SetObservableIds gets a reference to the given []string and assigns it to the ObservableIds field. +func (o *RenderTemplateRequest) SetObservableIds(v []string) { + o.ObservableIds = v +} + +// GetSearchQuery returns the SearchQuery field value if set, zero value otherwise. +func (o *RenderTemplateRequest) GetSearchQuery() SearchQuery { + if o == nil || IsNil(o.SearchQuery) { + var ret SearchQuery + return ret + } + return *o.SearchQuery +} + +// GetSearchQueryOk returns a tuple with the SearchQuery field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RenderTemplateRequest) GetSearchQueryOk() (*SearchQuery, bool) { + if o == nil || IsNil(o.SearchQuery) { + return nil, false + } + return o.SearchQuery, true +} + +// HasSearchQuery returns a boolean if a field has been set. +func (o *RenderTemplateRequest) HasSearchQuery() bool { + if o != nil && !IsNil(o.SearchQuery) { + return true + } + + return false +} + +// SetSearchQuery gets a reference to the given SearchQuery and assigns it to the SearchQuery field. +func (o *RenderTemplateRequest) SetSearchQuery(v SearchQuery) { + o.SearchQuery = &v +} + +func (o RenderTemplateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RenderTemplateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template_name"] = o.TemplateName + if !IsNil(o.ObservableIds) { + toSerialize["observable_ids"] = o.ObservableIds + } + if !IsNil(o.SearchQuery) { + toSerialize["search_query"] = o.SearchQuery + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RenderTemplateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRenderTemplateRequest := _RenderTemplateRequest{} + + err = json.Unmarshal(data, &varRenderTemplateRequest) + + if err != nil { + return err + } + + *o = RenderTemplateRequest(varRenderTemplateRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "template_name") + delete(additionalProperties, "observable_ids") + delete(additionalProperties, "search_query") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRenderTemplateRequest struct { + value *RenderTemplateRequest + isSet bool +} + +func (v NullableRenderTemplateRequest) Get() *RenderTemplateRequest { + return v.value +} + +func (v *NullableRenderTemplateRequest) Set(val *RenderTemplateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRenderTemplateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRenderTemplateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRenderTemplateRequest(val *RenderTemplateRequest) *NullableRenderTemplateRequest { + return &NullableRenderTemplateRequest{value: val, isSet: true} +} + +func (v NullableRenderTemplateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRenderTemplateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_reset_api_key_request.go b/model_reset_api_key_request.go new file mode 100644 index 0000000..56b1a78 --- /dev/null +++ b/model_reset_api_key_request.go @@ -0,0 +1,166 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResetApiKeyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResetApiKeyRequest{} + +// ResetApiKeyRequest struct for ResetApiKeyRequest +type ResetApiKeyRequest struct { + UserId string `json:"user_id"` + AdditionalProperties map[string]interface{} +} + +type _ResetApiKeyRequest ResetApiKeyRequest + +// NewResetApiKeyRequest instantiates a new ResetApiKeyRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResetApiKeyRequest(userId string) *ResetApiKeyRequest { + this := ResetApiKeyRequest{} + this.UserId = userId + return &this +} + +// NewResetApiKeyRequestWithDefaults instantiates a new ResetApiKeyRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResetApiKeyRequestWithDefaults() *ResetApiKeyRequest { + this := ResetApiKeyRequest{} + return &this +} + +// GetUserId returns the UserId field value +func (o *ResetApiKeyRequest) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *ResetApiKeyRequest) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *ResetApiKeyRequest) SetUserId(v string) { + o.UserId = v +} + +func (o ResetApiKeyRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResetApiKeyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_id"] = o.UserId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResetApiKeyRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResetApiKeyRequest := _ResetApiKeyRequest{} + + err = json.Unmarshal(data, &varResetApiKeyRequest) + + if err != nil { + return err + } + + *o = ResetApiKeyRequest(varResetApiKeyRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "user_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResetApiKeyRequest struct { + value *ResetApiKeyRequest + isSet bool +} + +func (v NullableResetApiKeyRequest) Get() *ResetApiKeyRequest { + return v.value +} + +func (v *NullableResetApiKeyRequest) Set(val *ResetApiKeyRequest) { + v.value = val + v.isSet = true +} + +func (v NullableResetApiKeyRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableResetApiKeyRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResetApiKeyRequest(val *ResetApiKeyRequest) *NullableResetApiKeyRequest { + return &NullableResetApiKeyRequest{value: val, isSet: true} +} + +func (v NullableResetApiKeyRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResetApiKeyRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_reset_password_request.go b/model_reset_password_request.go new file mode 100644 index 0000000..2870a4b --- /dev/null +++ b/model_reset_password_request.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResetPasswordRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResetPasswordRequest{} + +// ResetPasswordRequest struct for ResetPasswordRequest +type ResetPasswordRequest struct { + UserId string `json:"user_id"` + NewPassword string `json:"new_password"` + AdditionalProperties map[string]interface{} +} + +type _ResetPasswordRequest ResetPasswordRequest + +// NewResetPasswordRequest instantiates a new ResetPasswordRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResetPasswordRequest(userId string, newPassword string) *ResetPasswordRequest { + this := ResetPasswordRequest{} + this.UserId = userId + this.NewPassword = newPassword + return &this +} + +// NewResetPasswordRequestWithDefaults instantiates a new ResetPasswordRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResetPasswordRequestWithDefaults() *ResetPasswordRequest { + this := ResetPasswordRequest{} + return &this +} + +// GetUserId returns the UserId field value +func (o *ResetPasswordRequest) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *ResetPasswordRequest) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *ResetPasswordRequest) SetUserId(v string) { + o.UserId = v +} + +// GetNewPassword returns the NewPassword field value +func (o *ResetPasswordRequest) GetNewPassword() string { + if o == nil { + var ret string + return ret + } + + return o.NewPassword +} + +// GetNewPasswordOk returns a tuple with the NewPassword field value +// and a boolean to check if the value has been set. +func (o *ResetPasswordRequest) GetNewPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewPassword, true +} + +// SetNewPassword sets field value +func (o *ResetPasswordRequest) SetNewPassword(v string) { + o.NewPassword = v +} + +func (o ResetPasswordRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResetPasswordRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_id"] = o.UserId + toSerialize["new_password"] = o.NewPassword + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResetPasswordRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + "new_password", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResetPasswordRequest := _ResetPasswordRequest{} + + err = json.Unmarshal(data, &varResetPasswordRequest) + + if err != nil { + return err + } + + *o = ResetPasswordRequest(varResetPasswordRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "user_id") + delete(additionalProperties, "new_password") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResetPasswordRequest struct { + value *ResetPasswordRequest + isSet bool +} + +func (v NullableResetPasswordRequest) Get() *ResetPasswordRequest { + return v.value +} + +func (v *NullableResetPasswordRequest) Set(val *ResetPasswordRequest) { + v.value = val + v.isSet = true +} + +func (v NullableResetPasswordRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableResetPasswordRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResetPasswordRequest(val *ResetPasswordRequest) *NullableResetPasswordRequest { + return &NullableResetPasswordRequest{value: val, isSet: true} +} + +func (v NullableResetPasswordRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResetPasswordRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_add_context_api_v2_observables__observable_id__context_post.go b/model_response_add_context_api_v2_observables__observable_id__context_post.go new file mode 100644 index 0000000..20285dd --- /dev/null +++ b/model_response_add_context_api_v2_observables__observable_id__context_post.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseAddContextApiV2ObservablesObservableIdContextPost struct for ResponseAddContextApiV2ObservablesObservableIdContextPost +type ResponseAddContextApiV2ObservablesObservableIdContextPost struct { + ASNOutput *ASNOutput + BICOutput *BICOutput + CIDROutput *CIDROutput + CertificateOutput *CertificateOutput + CommandLineOutput *CommandLineOutput + DockerImageOutput *DockerImageOutput + EmailOutput *EmailOutput + FileOutput *FileOutput + GenericOutput *GenericOutput + HostnameOutput *HostnameOutput + IBANOutput *IBANOutput + IPv4Output *IPv4Output + IPv6Output *IPv6Output + ImphashOutput *ImphashOutput + JA3Output *JA3Output + JARMOutput *JARMOutput + MD5Output *MD5Output + MacAddressOutput *MacAddressOutput + MutexOutput *MutexOutput + NamedPipeOutput *NamedPipeOutput + PackageOutput *PackageOutput + PathOutput *PathOutput + RegistryKeyOutput *RegistryKeyOutput + SHA1Output *SHA1Output + SHA256Output *SHA256Output + SsdeepOutput *SsdeepOutput + TLSHOutput *TLSHOutput + UrlOutput *UrlOutput + UserAccountOutput *UserAccountOutput + UserAgentOutput *UserAgentOutput + WalletOutput *WalletOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseAddContextApiV2ObservablesObservableIdContextPost) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNOutput + err = json.Unmarshal(data, &dst.ASNOutput) + if err == nil { + jsonASNOutput, _ := json.Marshal(dst.ASNOutput) + if string(jsonASNOutput) == "{}" { // empty struct + dst.ASNOutput = nil + } else { + return nil // data stored in dst.ASNOutput, return on the first match + } + } else { + dst.ASNOutput = nil + } + + // try to unmarshal JSON data into BICOutput + err = json.Unmarshal(data, &dst.BICOutput) + if err == nil { + jsonBICOutput, _ := json.Marshal(dst.BICOutput) + if string(jsonBICOutput) == "{}" { // empty struct + dst.BICOutput = nil + } else { + return nil // data stored in dst.BICOutput, return on the first match + } + } else { + dst.BICOutput = nil + } + + // try to unmarshal JSON data into CIDROutput + err = json.Unmarshal(data, &dst.CIDROutput) + if err == nil { + jsonCIDROutput, _ := json.Marshal(dst.CIDROutput) + if string(jsonCIDROutput) == "{}" { // empty struct + dst.CIDROutput = nil + } else { + return nil // data stored in dst.CIDROutput, return on the first match + } + } else { + dst.CIDROutput = nil + } + + // try to unmarshal JSON data into CertificateOutput + err = json.Unmarshal(data, &dst.CertificateOutput) + if err == nil { + jsonCertificateOutput, _ := json.Marshal(dst.CertificateOutput) + if string(jsonCertificateOutput) == "{}" { // empty struct + dst.CertificateOutput = nil + } else { + return nil // data stored in dst.CertificateOutput, return on the first match + } + } else { + dst.CertificateOutput = nil + } + + // try to unmarshal JSON data into CommandLineOutput + err = json.Unmarshal(data, &dst.CommandLineOutput) + if err == nil { + jsonCommandLineOutput, _ := json.Marshal(dst.CommandLineOutput) + if string(jsonCommandLineOutput) == "{}" { // empty struct + dst.CommandLineOutput = nil + } else { + return nil // data stored in dst.CommandLineOutput, return on the first match + } + } else { + dst.CommandLineOutput = nil + } + + // try to unmarshal JSON data into DockerImageOutput + err = json.Unmarshal(data, &dst.DockerImageOutput) + if err == nil { + jsonDockerImageOutput, _ := json.Marshal(dst.DockerImageOutput) + if string(jsonDockerImageOutput) == "{}" { // empty struct + dst.DockerImageOutput = nil + } else { + return nil // data stored in dst.DockerImageOutput, return on the first match + } + } else { + dst.DockerImageOutput = nil + } + + // try to unmarshal JSON data into EmailOutput + err = json.Unmarshal(data, &dst.EmailOutput) + if err == nil { + jsonEmailOutput, _ := json.Marshal(dst.EmailOutput) + if string(jsonEmailOutput) == "{}" { // empty struct + dst.EmailOutput = nil + } else { + return nil // data stored in dst.EmailOutput, return on the first match + } + } else { + dst.EmailOutput = nil + } + + // try to unmarshal JSON data into FileOutput + err = json.Unmarshal(data, &dst.FileOutput) + if err == nil { + jsonFileOutput, _ := json.Marshal(dst.FileOutput) + if string(jsonFileOutput) == "{}" { // empty struct + dst.FileOutput = nil + } else { + return nil // data stored in dst.FileOutput, return on the first match + } + } else { + dst.FileOutput = nil + } + + // try to unmarshal JSON data into GenericOutput + err = json.Unmarshal(data, &dst.GenericOutput) + if err == nil { + jsonGenericOutput, _ := json.Marshal(dst.GenericOutput) + if string(jsonGenericOutput) == "{}" { // empty struct + dst.GenericOutput = nil + } else { + return nil // data stored in dst.GenericOutput, return on the first match + } + } else { + dst.GenericOutput = nil + } + + // try to unmarshal JSON data into HostnameOutput + err = json.Unmarshal(data, &dst.HostnameOutput) + if err == nil { + jsonHostnameOutput, _ := json.Marshal(dst.HostnameOutput) + if string(jsonHostnameOutput) == "{}" { // empty struct + dst.HostnameOutput = nil + } else { + return nil // data stored in dst.HostnameOutput, return on the first match + } + } else { + dst.HostnameOutput = nil + } + + // try to unmarshal JSON data into IBANOutput + err = json.Unmarshal(data, &dst.IBANOutput) + if err == nil { + jsonIBANOutput, _ := json.Marshal(dst.IBANOutput) + if string(jsonIBANOutput) == "{}" { // empty struct + dst.IBANOutput = nil + } else { + return nil // data stored in dst.IBANOutput, return on the first match + } + } else { + dst.IBANOutput = nil + } + + // try to unmarshal JSON data into IPv4Output + err = json.Unmarshal(data, &dst.IPv4Output) + if err == nil { + jsonIPv4Output, _ := json.Marshal(dst.IPv4Output) + if string(jsonIPv4Output) == "{}" { // empty struct + dst.IPv4Output = nil + } else { + return nil // data stored in dst.IPv4Output, return on the first match + } + } else { + dst.IPv4Output = nil + } + + // try to unmarshal JSON data into IPv6Output + err = json.Unmarshal(data, &dst.IPv6Output) + if err == nil { + jsonIPv6Output, _ := json.Marshal(dst.IPv6Output) + if string(jsonIPv6Output) == "{}" { // empty struct + dst.IPv6Output = nil + } else { + return nil // data stored in dst.IPv6Output, return on the first match + } + } else { + dst.IPv6Output = nil + } + + // try to unmarshal JSON data into ImphashOutput + err = json.Unmarshal(data, &dst.ImphashOutput) + if err == nil { + jsonImphashOutput, _ := json.Marshal(dst.ImphashOutput) + if string(jsonImphashOutput) == "{}" { // empty struct + dst.ImphashOutput = nil + } else { + return nil // data stored in dst.ImphashOutput, return on the first match + } + } else { + dst.ImphashOutput = nil + } + + // try to unmarshal JSON data into JA3Output + err = json.Unmarshal(data, &dst.JA3Output) + if err == nil { + jsonJA3Output, _ := json.Marshal(dst.JA3Output) + if string(jsonJA3Output) == "{}" { // empty struct + dst.JA3Output = nil + } else { + return nil // data stored in dst.JA3Output, return on the first match + } + } else { + dst.JA3Output = nil + } + + // try to unmarshal JSON data into JARMOutput + err = json.Unmarshal(data, &dst.JARMOutput) + if err == nil { + jsonJARMOutput, _ := json.Marshal(dst.JARMOutput) + if string(jsonJARMOutput) == "{}" { // empty struct + dst.JARMOutput = nil + } else { + return nil // data stored in dst.JARMOutput, return on the first match + } + } else { + dst.JARMOutput = nil + } + + // try to unmarshal JSON data into MD5Output + err = json.Unmarshal(data, &dst.MD5Output) + if err == nil { + jsonMD5Output, _ := json.Marshal(dst.MD5Output) + if string(jsonMD5Output) == "{}" { // empty struct + dst.MD5Output = nil + } else { + return nil // data stored in dst.MD5Output, return on the first match + } + } else { + dst.MD5Output = nil + } + + // try to unmarshal JSON data into MacAddressOutput + err = json.Unmarshal(data, &dst.MacAddressOutput) + if err == nil { + jsonMacAddressOutput, _ := json.Marshal(dst.MacAddressOutput) + if string(jsonMacAddressOutput) == "{}" { // empty struct + dst.MacAddressOutput = nil + } else { + return nil // data stored in dst.MacAddressOutput, return on the first match + } + } else { + dst.MacAddressOutput = nil + } + + // try to unmarshal JSON data into MutexOutput + err = json.Unmarshal(data, &dst.MutexOutput) + if err == nil { + jsonMutexOutput, _ := json.Marshal(dst.MutexOutput) + if string(jsonMutexOutput) == "{}" { // empty struct + dst.MutexOutput = nil + } else { + return nil // data stored in dst.MutexOutput, return on the first match + } + } else { + dst.MutexOutput = nil + } + + // try to unmarshal JSON data into NamedPipeOutput + err = json.Unmarshal(data, &dst.NamedPipeOutput) + if err == nil { + jsonNamedPipeOutput, _ := json.Marshal(dst.NamedPipeOutput) + if string(jsonNamedPipeOutput) == "{}" { // empty struct + dst.NamedPipeOutput = nil + } else { + return nil // data stored in dst.NamedPipeOutput, return on the first match + } + } else { + dst.NamedPipeOutput = nil + } + + // try to unmarshal JSON data into PackageOutput + err = json.Unmarshal(data, &dst.PackageOutput) + if err == nil { + jsonPackageOutput, _ := json.Marshal(dst.PackageOutput) + if string(jsonPackageOutput) == "{}" { // empty struct + dst.PackageOutput = nil + } else { + return nil // data stored in dst.PackageOutput, return on the first match + } + } else { + dst.PackageOutput = nil + } + + // try to unmarshal JSON data into PathOutput + err = json.Unmarshal(data, &dst.PathOutput) + if err == nil { + jsonPathOutput, _ := json.Marshal(dst.PathOutput) + if string(jsonPathOutput) == "{}" { // empty struct + dst.PathOutput = nil + } else { + return nil // data stored in dst.PathOutput, return on the first match + } + } else { + dst.PathOutput = nil + } + + // try to unmarshal JSON data into RegistryKeyOutput + err = json.Unmarshal(data, &dst.RegistryKeyOutput) + if err == nil { + jsonRegistryKeyOutput, _ := json.Marshal(dst.RegistryKeyOutput) + if string(jsonRegistryKeyOutput) == "{}" { // empty struct + dst.RegistryKeyOutput = nil + } else { + return nil // data stored in dst.RegistryKeyOutput, return on the first match + } + } else { + dst.RegistryKeyOutput = nil + } + + // try to unmarshal JSON data into SHA1Output + err = json.Unmarshal(data, &dst.SHA1Output) + if err == nil { + jsonSHA1Output, _ := json.Marshal(dst.SHA1Output) + if string(jsonSHA1Output) == "{}" { // empty struct + dst.SHA1Output = nil + } else { + return nil // data stored in dst.SHA1Output, return on the first match + } + } else { + dst.SHA1Output = nil + } + + // try to unmarshal JSON data into SHA256Output + err = json.Unmarshal(data, &dst.SHA256Output) + if err == nil { + jsonSHA256Output, _ := json.Marshal(dst.SHA256Output) + if string(jsonSHA256Output) == "{}" { // empty struct + dst.SHA256Output = nil + } else { + return nil // data stored in dst.SHA256Output, return on the first match + } + } else { + dst.SHA256Output = nil + } + + // try to unmarshal JSON data into SsdeepOutput + err = json.Unmarshal(data, &dst.SsdeepOutput) + if err == nil { + jsonSsdeepOutput, _ := json.Marshal(dst.SsdeepOutput) + if string(jsonSsdeepOutput) == "{}" { // empty struct + dst.SsdeepOutput = nil + } else { + return nil // data stored in dst.SsdeepOutput, return on the first match + } + } else { + dst.SsdeepOutput = nil + } + + // try to unmarshal JSON data into TLSHOutput + err = json.Unmarshal(data, &dst.TLSHOutput) + if err == nil { + jsonTLSHOutput, _ := json.Marshal(dst.TLSHOutput) + if string(jsonTLSHOutput) == "{}" { // empty struct + dst.TLSHOutput = nil + } else { + return nil // data stored in dst.TLSHOutput, return on the first match + } + } else { + dst.TLSHOutput = nil + } + + // try to unmarshal JSON data into UrlOutput + err = json.Unmarshal(data, &dst.UrlOutput) + if err == nil { + jsonUrlOutput, _ := json.Marshal(dst.UrlOutput) + if string(jsonUrlOutput) == "{}" { // empty struct + dst.UrlOutput = nil + } else { + return nil // data stored in dst.UrlOutput, return on the first match + } + } else { + dst.UrlOutput = nil + } + + // try to unmarshal JSON data into UserAccountOutput + err = json.Unmarshal(data, &dst.UserAccountOutput) + if err == nil { + jsonUserAccountOutput, _ := json.Marshal(dst.UserAccountOutput) + if string(jsonUserAccountOutput) == "{}" { // empty struct + dst.UserAccountOutput = nil + } else { + return nil // data stored in dst.UserAccountOutput, return on the first match + } + } else { + dst.UserAccountOutput = nil + } + + // try to unmarshal JSON data into UserAgentOutput + err = json.Unmarshal(data, &dst.UserAgentOutput) + if err == nil { + jsonUserAgentOutput, _ := json.Marshal(dst.UserAgentOutput) + if string(jsonUserAgentOutput) == "{}" { // empty struct + dst.UserAgentOutput = nil + } else { + return nil // data stored in dst.UserAgentOutput, return on the first match + } + } else { + dst.UserAgentOutput = nil + } + + // try to unmarshal JSON data into WalletOutput + err = json.Unmarshal(data, &dst.WalletOutput) + if err == nil { + jsonWalletOutput, _ := json.Marshal(dst.WalletOutput) + if string(jsonWalletOutput) == "{}" { // empty struct + dst.WalletOutput = nil + } else { + return nil // data stored in dst.WalletOutput, return on the first match + } + } else { + dst.WalletOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseAddContextApiV2ObservablesObservableIdContextPost)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseAddContextApiV2ObservablesObservableIdContextPost) MarshalJSON() ([]byte, error) { + if src.ASNOutput != nil { + return json.Marshal(&src.ASNOutput) + } + + if src.BICOutput != nil { + return json.Marshal(&src.BICOutput) + } + + if src.CIDROutput != nil { + return json.Marshal(&src.CIDROutput) + } + + if src.CertificateOutput != nil { + return json.Marshal(&src.CertificateOutput) + } + + if src.CommandLineOutput != nil { + return json.Marshal(&src.CommandLineOutput) + } + + if src.DockerImageOutput != nil { + return json.Marshal(&src.DockerImageOutput) + } + + if src.EmailOutput != nil { + return json.Marshal(&src.EmailOutput) + } + + if src.FileOutput != nil { + return json.Marshal(&src.FileOutput) + } + + if src.GenericOutput != nil { + return json.Marshal(&src.GenericOutput) + } + + if src.HostnameOutput != nil { + return json.Marshal(&src.HostnameOutput) + } + + if src.IBANOutput != nil { + return json.Marshal(&src.IBANOutput) + } + + if src.IPv4Output != nil { + return json.Marshal(&src.IPv4Output) + } + + if src.IPv6Output != nil { + return json.Marshal(&src.IPv6Output) + } + + if src.ImphashOutput != nil { + return json.Marshal(&src.ImphashOutput) + } + + if src.JA3Output != nil { + return json.Marshal(&src.JA3Output) + } + + if src.JARMOutput != nil { + return json.Marshal(&src.JARMOutput) + } + + if src.MD5Output != nil { + return json.Marshal(&src.MD5Output) + } + + if src.MacAddressOutput != nil { + return json.Marshal(&src.MacAddressOutput) + } + + if src.MutexOutput != nil { + return json.Marshal(&src.MutexOutput) + } + + if src.NamedPipeOutput != nil { + return json.Marshal(&src.NamedPipeOutput) + } + + if src.PackageOutput != nil { + return json.Marshal(&src.PackageOutput) + } + + if src.PathOutput != nil { + return json.Marshal(&src.PathOutput) + } + + if src.RegistryKeyOutput != nil { + return json.Marshal(&src.RegistryKeyOutput) + } + + if src.SHA1Output != nil { + return json.Marshal(&src.SHA1Output) + } + + if src.SHA256Output != nil { + return json.Marshal(&src.SHA256Output) + } + + if src.SsdeepOutput != nil { + return json.Marshal(&src.SsdeepOutput) + } + + if src.TLSHOutput != nil { + return json.Marshal(&src.TLSHOutput) + } + + if src.UrlOutput != nil { + return json.Marshal(&src.UrlOutput) + } + + if src.UserAccountOutput != nil { + return json.Marshal(&src.UserAccountOutput) + } + + if src.UserAgentOutput != nil { + return json.Marshal(&src.UserAgentOutput) + } + + if src.WalletOutput != nil { + return json.Marshal(&src.WalletOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseAddContextApiV2ObservablesObservableIdContextPost struct { + value *ResponseAddContextApiV2ObservablesObservableIdContextPost + isSet bool +} + +func (v NullableResponseAddContextApiV2ObservablesObservableIdContextPost) Get() *ResponseAddContextApiV2ObservablesObservableIdContextPost { + return v.value +} + +func (v *NullableResponseAddContextApiV2ObservablesObservableIdContextPost) Set(val *ResponseAddContextApiV2ObservablesObservableIdContextPost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAddContextApiV2ObservablesObservableIdContextPost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAddContextApiV2ObservablesObservableIdContextPost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAddContextApiV2ObservablesObservableIdContextPost(val *ResponseAddContextApiV2ObservablesObservableIdContextPost) *NullableResponseAddContextApiV2ObservablesObservableIdContextPost { + return &NullableResponseAddContextApiV2ObservablesObservableIdContextPost{value: val, isSet: true} +} + +func (v NullableResponseAddContextApiV2ObservablesObservableIdContextPost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAddContextApiV2ObservablesObservableIdContextPost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_add_text_api_v2_observables_add_text_post.go b/model_response_add_text_api_v2_observables_add_text_post.go new file mode 100644 index 0000000..fbb73cf --- /dev/null +++ b/model_response_add_text_api_v2_observables_add_text_post.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseAddTextApiV2ObservablesAddTextPost struct for ResponseAddTextApiV2ObservablesAddTextPost +type ResponseAddTextApiV2ObservablesAddTextPost struct { + ASNOutput *ASNOutput + BICOutput *BICOutput + CIDROutput *CIDROutput + CertificateOutput *CertificateOutput + CommandLineOutput *CommandLineOutput + DockerImageOutput *DockerImageOutput + EmailOutput *EmailOutput + FileOutput *FileOutput + GenericOutput *GenericOutput + HostnameOutput *HostnameOutput + IBANOutput *IBANOutput + IPv4Output *IPv4Output + IPv6Output *IPv6Output + ImphashOutput *ImphashOutput + JA3Output *JA3Output + JARMOutput *JARMOutput + MD5Output *MD5Output + MacAddressOutput *MacAddressOutput + MutexOutput *MutexOutput + NamedPipeOutput *NamedPipeOutput + PackageOutput *PackageOutput + PathOutput *PathOutput + RegistryKeyOutput *RegistryKeyOutput + SHA1Output *SHA1Output + SHA256Output *SHA256Output + SsdeepOutput *SsdeepOutput + TLSHOutput *TLSHOutput + UrlOutput *UrlOutput + UserAccountOutput *UserAccountOutput + UserAgentOutput *UserAgentOutput + WalletOutput *WalletOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseAddTextApiV2ObservablesAddTextPost) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNOutput + err = json.Unmarshal(data, &dst.ASNOutput) + if err == nil { + jsonASNOutput, _ := json.Marshal(dst.ASNOutput) + if string(jsonASNOutput) == "{}" { // empty struct + dst.ASNOutput = nil + } else { + return nil // data stored in dst.ASNOutput, return on the first match + } + } else { + dst.ASNOutput = nil + } + + // try to unmarshal JSON data into BICOutput + err = json.Unmarshal(data, &dst.BICOutput) + if err == nil { + jsonBICOutput, _ := json.Marshal(dst.BICOutput) + if string(jsonBICOutput) == "{}" { // empty struct + dst.BICOutput = nil + } else { + return nil // data stored in dst.BICOutput, return on the first match + } + } else { + dst.BICOutput = nil + } + + // try to unmarshal JSON data into CIDROutput + err = json.Unmarshal(data, &dst.CIDROutput) + if err == nil { + jsonCIDROutput, _ := json.Marshal(dst.CIDROutput) + if string(jsonCIDROutput) == "{}" { // empty struct + dst.CIDROutput = nil + } else { + return nil // data stored in dst.CIDROutput, return on the first match + } + } else { + dst.CIDROutput = nil + } + + // try to unmarshal JSON data into CertificateOutput + err = json.Unmarshal(data, &dst.CertificateOutput) + if err == nil { + jsonCertificateOutput, _ := json.Marshal(dst.CertificateOutput) + if string(jsonCertificateOutput) == "{}" { // empty struct + dst.CertificateOutput = nil + } else { + return nil // data stored in dst.CertificateOutput, return on the first match + } + } else { + dst.CertificateOutput = nil + } + + // try to unmarshal JSON data into CommandLineOutput + err = json.Unmarshal(data, &dst.CommandLineOutput) + if err == nil { + jsonCommandLineOutput, _ := json.Marshal(dst.CommandLineOutput) + if string(jsonCommandLineOutput) == "{}" { // empty struct + dst.CommandLineOutput = nil + } else { + return nil // data stored in dst.CommandLineOutput, return on the first match + } + } else { + dst.CommandLineOutput = nil + } + + // try to unmarshal JSON data into DockerImageOutput + err = json.Unmarshal(data, &dst.DockerImageOutput) + if err == nil { + jsonDockerImageOutput, _ := json.Marshal(dst.DockerImageOutput) + if string(jsonDockerImageOutput) == "{}" { // empty struct + dst.DockerImageOutput = nil + } else { + return nil // data stored in dst.DockerImageOutput, return on the first match + } + } else { + dst.DockerImageOutput = nil + } + + // try to unmarshal JSON data into EmailOutput + err = json.Unmarshal(data, &dst.EmailOutput) + if err == nil { + jsonEmailOutput, _ := json.Marshal(dst.EmailOutput) + if string(jsonEmailOutput) == "{}" { // empty struct + dst.EmailOutput = nil + } else { + return nil // data stored in dst.EmailOutput, return on the first match + } + } else { + dst.EmailOutput = nil + } + + // try to unmarshal JSON data into FileOutput + err = json.Unmarshal(data, &dst.FileOutput) + if err == nil { + jsonFileOutput, _ := json.Marshal(dst.FileOutput) + if string(jsonFileOutput) == "{}" { // empty struct + dst.FileOutput = nil + } else { + return nil // data stored in dst.FileOutput, return on the first match + } + } else { + dst.FileOutput = nil + } + + // try to unmarshal JSON data into GenericOutput + err = json.Unmarshal(data, &dst.GenericOutput) + if err == nil { + jsonGenericOutput, _ := json.Marshal(dst.GenericOutput) + if string(jsonGenericOutput) == "{}" { // empty struct + dst.GenericOutput = nil + } else { + return nil // data stored in dst.GenericOutput, return on the first match + } + } else { + dst.GenericOutput = nil + } + + // try to unmarshal JSON data into HostnameOutput + err = json.Unmarshal(data, &dst.HostnameOutput) + if err == nil { + jsonHostnameOutput, _ := json.Marshal(dst.HostnameOutput) + if string(jsonHostnameOutput) == "{}" { // empty struct + dst.HostnameOutput = nil + } else { + return nil // data stored in dst.HostnameOutput, return on the first match + } + } else { + dst.HostnameOutput = nil + } + + // try to unmarshal JSON data into IBANOutput + err = json.Unmarshal(data, &dst.IBANOutput) + if err == nil { + jsonIBANOutput, _ := json.Marshal(dst.IBANOutput) + if string(jsonIBANOutput) == "{}" { // empty struct + dst.IBANOutput = nil + } else { + return nil // data stored in dst.IBANOutput, return on the first match + } + } else { + dst.IBANOutput = nil + } + + // try to unmarshal JSON data into IPv4Output + err = json.Unmarshal(data, &dst.IPv4Output) + if err == nil { + jsonIPv4Output, _ := json.Marshal(dst.IPv4Output) + if string(jsonIPv4Output) == "{}" { // empty struct + dst.IPv4Output = nil + } else { + return nil // data stored in dst.IPv4Output, return on the first match + } + } else { + dst.IPv4Output = nil + } + + // try to unmarshal JSON data into IPv6Output + err = json.Unmarshal(data, &dst.IPv6Output) + if err == nil { + jsonIPv6Output, _ := json.Marshal(dst.IPv6Output) + if string(jsonIPv6Output) == "{}" { // empty struct + dst.IPv6Output = nil + } else { + return nil // data stored in dst.IPv6Output, return on the first match + } + } else { + dst.IPv6Output = nil + } + + // try to unmarshal JSON data into ImphashOutput + err = json.Unmarshal(data, &dst.ImphashOutput) + if err == nil { + jsonImphashOutput, _ := json.Marshal(dst.ImphashOutput) + if string(jsonImphashOutput) == "{}" { // empty struct + dst.ImphashOutput = nil + } else { + return nil // data stored in dst.ImphashOutput, return on the first match + } + } else { + dst.ImphashOutput = nil + } + + // try to unmarshal JSON data into JA3Output + err = json.Unmarshal(data, &dst.JA3Output) + if err == nil { + jsonJA3Output, _ := json.Marshal(dst.JA3Output) + if string(jsonJA3Output) == "{}" { // empty struct + dst.JA3Output = nil + } else { + return nil // data stored in dst.JA3Output, return on the first match + } + } else { + dst.JA3Output = nil + } + + // try to unmarshal JSON data into JARMOutput + err = json.Unmarshal(data, &dst.JARMOutput) + if err == nil { + jsonJARMOutput, _ := json.Marshal(dst.JARMOutput) + if string(jsonJARMOutput) == "{}" { // empty struct + dst.JARMOutput = nil + } else { + return nil // data stored in dst.JARMOutput, return on the first match + } + } else { + dst.JARMOutput = nil + } + + // try to unmarshal JSON data into MD5Output + err = json.Unmarshal(data, &dst.MD5Output) + if err == nil { + jsonMD5Output, _ := json.Marshal(dst.MD5Output) + if string(jsonMD5Output) == "{}" { // empty struct + dst.MD5Output = nil + } else { + return nil // data stored in dst.MD5Output, return on the first match + } + } else { + dst.MD5Output = nil + } + + // try to unmarshal JSON data into MacAddressOutput + err = json.Unmarshal(data, &dst.MacAddressOutput) + if err == nil { + jsonMacAddressOutput, _ := json.Marshal(dst.MacAddressOutput) + if string(jsonMacAddressOutput) == "{}" { // empty struct + dst.MacAddressOutput = nil + } else { + return nil // data stored in dst.MacAddressOutput, return on the first match + } + } else { + dst.MacAddressOutput = nil + } + + // try to unmarshal JSON data into MutexOutput + err = json.Unmarshal(data, &dst.MutexOutput) + if err == nil { + jsonMutexOutput, _ := json.Marshal(dst.MutexOutput) + if string(jsonMutexOutput) == "{}" { // empty struct + dst.MutexOutput = nil + } else { + return nil // data stored in dst.MutexOutput, return on the first match + } + } else { + dst.MutexOutput = nil + } + + // try to unmarshal JSON data into NamedPipeOutput + err = json.Unmarshal(data, &dst.NamedPipeOutput) + if err == nil { + jsonNamedPipeOutput, _ := json.Marshal(dst.NamedPipeOutput) + if string(jsonNamedPipeOutput) == "{}" { // empty struct + dst.NamedPipeOutput = nil + } else { + return nil // data stored in dst.NamedPipeOutput, return on the first match + } + } else { + dst.NamedPipeOutput = nil + } + + // try to unmarshal JSON data into PackageOutput + err = json.Unmarshal(data, &dst.PackageOutput) + if err == nil { + jsonPackageOutput, _ := json.Marshal(dst.PackageOutput) + if string(jsonPackageOutput) == "{}" { // empty struct + dst.PackageOutput = nil + } else { + return nil // data stored in dst.PackageOutput, return on the first match + } + } else { + dst.PackageOutput = nil + } + + // try to unmarshal JSON data into PathOutput + err = json.Unmarshal(data, &dst.PathOutput) + if err == nil { + jsonPathOutput, _ := json.Marshal(dst.PathOutput) + if string(jsonPathOutput) == "{}" { // empty struct + dst.PathOutput = nil + } else { + return nil // data stored in dst.PathOutput, return on the first match + } + } else { + dst.PathOutput = nil + } + + // try to unmarshal JSON data into RegistryKeyOutput + err = json.Unmarshal(data, &dst.RegistryKeyOutput) + if err == nil { + jsonRegistryKeyOutput, _ := json.Marshal(dst.RegistryKeyOutput) + if string(jsonRegistryKeyOutput) == "{}" { // empty struct + dst.RegistryKeyOutput = nil + } else { + return nil // data stored in dst.RegistryKeyOutput, return on the first match + } + } else { + dst.RegistryKeyOutput = nil + } + + // try to unmarshal JSON data into SHA1Output + err = json.Unmarshal(data, &dst.SHA1Output) + if err == nil { + jsonSHA1Output, _ := json.Marshal(dst.SHA1Output) + if string(jsonSHA1Output) == "{}" { // empty struct + dst.SHA1Output = nil + } else { + return nil // data stored in dst.SHA1Output, return on the first match + } + } else { + dst.SHA1Output = nil + } + + // try to unmarshal JSON data into SHA256Output + err = json.Unmarshal(data, &dst.SHA256Output) + if err == nil { + jsonSHA256Output, _ := json.Marshal(dst.SHA256Output) + if string(jsonSHA256Output) == "{}" { // empty struct + dst.SHA256Output = nil + } else { + return nil // data stored in dst.SHA256Output, return on the first match + } + } else { + dst.SHA256Output = nil + } + + // try to unmarshal JSON data into SsdeepOutput + err = json.Unmarshal(data, &dst.SsdeepOutput) + if err == nil { + jsonSsdeepOutput, _ := json.Marshal(dst.SsdeepOutput) + if string(jsonSsdeepOutput) == "{}" { // empty struct + dst.SsdeepOutput = nil + } else { + return nil // data stored in dst.SsdeepOutput, return on the first match + } + } else { + dst.SsdeepOutput = nil + } + + // try to unmarshal JSON data into TLSHOutput + err = json.Unmarshal(data, &dst.TLSHOutput) + if err == nil { + jsonTLSHOutput, _ := json.Marshal(dst.TLSHOutput) + if string(jsonTLSHOutput) == "{}" { // empty struct + dst.TLSHOutput = nil + } else { + return nil // data stored in dst.TLSHOutput, return on the first match + } + } else { + dst.TLSHOutput = nil + } + + // try to unmarshal JSON data into UrlOutput + err = json.Unmarshal(data, &dst.UrlOutput) + if err == nil { + jsonUrlOutput, _ := json.Marshal(dst.UrlOutput) + if string(jsonUrlOutput) == "{}" { // empty struct + dst.UrlOutput = nil + } else { + return nil // data stored in dst.UrlOutput, return on the first match + } + } else { + dst.UrlOutput = nil + } + + // try to unmarshal JSON data into UserAccountOutput + err = json.Unmarshal(data, &dst.UserAccountOutput) + if err == nil { + jsonUserAccountOutput, _ := json.Marshal(dst.UserAccountOutput) + if string(jsonUserAccountOutput) == "{}" { // empty struct + dst.UserAccountOutput = nil + } else { + return nil // data stored in dst.UserAccountOutput, return on the first match + } + } else { + dst.UserAccountOutput = nil + } + + // try to unmarshal JSON data into UserAgentOutput + err = json.Unmarshal(data, &dst.UserAgentOutput) + if err == nil { + jsonUserAgentOutput, _ := json.Marshal(dst.UserAgentOutput) + if string(jsonUserAgentOutput) == "{}" { // empty struct + dst.UserAgentOutput = nil + } else { + return nil // data stored in dst.UserAgentOutput, return on the first match + } + } else { + dst.UserAgentOutput = nil + } + + // try to unmarshal JSON data into WalletOutput + err = json.Unmarshal(data, &dst.WalletOutput) + if err == nil { + jsonWalletOutput, _ := json.Marshal(dst.WalletOutput) + if string(jsonWalletOutput) == "{}" { // empty struct + dst.WalletOutput = nil + } else { + return nil // data stored in dst.WalletOutput, return on the first match + } + } else { + dst.WalletOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseAddTextApiV2ObservablesAddTextPost)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseAddTextApiV2ObservablesAddTextPost) MarshalJSON() ([]byte, error) { + if src.ASNOutput != nil { + return json.Marshal(&src.ASNOutput) + } + + if src.BICOutput != nil { + return json.Marshal(&src.BICOutput) + } + + if src.CIDROutput != nil { + return json.Marshal(&src.CIDROutput) + } + + if src.CertificateOutput != nil { + return json.Marshal(&src.CertificateOutput) + } + + if src.CommandLineOutput != nil { + return json.Marshal(&src.CommandLineOutput) + } + + if src.DockerImageOutput != nil { + return json.Marshal(&src.DockerImageOutput) + } + + if src.EmailOutput != nil { + return json.Marshal(&src.EmailOutput) + } + + if src.FileOutput != nil { + return json.Marshal(&src.FileOutput) + } + + if src.GenericOutput != nil { + return json.Marshal(&src.GenericOutput) + } + + if src.HostnameOutput != nil { + return json.Marshal(&src.HostnameOutput) + } + + if src.IBANOutput != nil { + return json.Marshal(&src.IBANOutput) + } + + if src.IPv4Output != nil { + return json.Marshal(&src.IPv4Output) + } + + if src.IPv6Output != nil { + return json.Marshal(&src.IPv6Output) + } + + if src.ImphashOutput != nil { + return json.Marshal(&src.ImphashOutput) + } + + if src.JA3Output != nil { + return json.Marshal(&src.JA3Output) + } + + if src.JARMOutput != nil { + return json.Marshal(&src.JARMOutput) + } + + if src.MD5Output != nil { + return json.Marshal(&src.MD5Output) + } + + if src.MacAddressOutput != nil { + return json.Marshal(&src.MacAddressOutput) + } + + if src.MutexOutput != nil { + return json.Marshal(&src.MutexOutput) + } + + if src.NamedPipeOutput != nil { + return json.Marshal(&src.NamedPipeOutput) + } + + if src.PackageOutput != nil { + return json.Marshal(&src.PackageOutput) + } + + if src.PathOutput != nil { + return json.Marshal(&src.PathOutput) + } + + if src.RegistryKeyOutput != nil { + return json.Marshal(&src.RegistryKeyOutput) + } + + if src.SHA1Output != nil { + return json.Marshal(&src.SHA1Output) + } + + if src.SHA256Output != nil { + return json.Marshal(&src.SHA256Output) + } + + if src.SsdeepOutput != nil { + return json.Marshal(&src.SsdeepOutput) + } + + if src.TLSHOutput != nil { + return json.Marshal(&src.TLSHOutput) + } + + if src.UrlOutput != nil { + return json.Marshal(&src.UrlOutput) + } + + if src.UserAccountOutput != nil { + return json.Marshal(&src.UserAccountOutput) + } + + if src.UserAgentOutput != nil { + return json.Marshal(&src.UserAgentOutput) + } + + if src.WalletOutput != nil { + return json.Marshal(&src.WalletOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseAddTextApiV2ObservablesAddTextPost struct { + value *ResponseAddTextApiV2ObservablesAddTextPost + isSet bool +} + +func (v NullableResponseAddTextApiV2ObservablesAddTextPost) Get() *ResponseAddTextApiV2ObservablesAddTextPost { + return v.value +} + +func (v *NullableResponseAddTextApiV2ObservablesAddTextPost) Set(val *ResponseAddTextApiV2ObservablesAddTextPost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAddTextApiV2ObservablesAddTextPost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAddTextApiV2ObservablesAddTextPost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAddTextApiV2ObservablesAddTextPost(val *ResponseAddTextApiV2ObservablesAddTextPost) *NullableResponseAddTextApiV2ObservablesAddTextPost { + return &NullableResponseAddTextApiV2ObservablesAddTextPost{value: val, isSet: true} +} + +func (v NullableResponseAddTextApiV2ObservablesAddTextPost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAddTextApiV2ObservablesAddTextPost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_delete_context_api_v2_observables__observable_id__context_delete_post.go b/model_response_delete_context_api_v2_observables__observable_id__context_delete_post.go new file mode 100644 index 0000000..e557f8b --- /dev/null +++ b/model_response_delete_context_api_v2_observables__observable_id__context_delete_post.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost struct for ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost +type ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost struct { + ASNOutput *ASNOutput + BICOutput *BICOutput + CIDROutput *CIDROutput + CertificateOutput *CertificateOutput + CommandLineOutput *CommandLineOutput + DockerImageOutput *DockerImageOutput + EmailOutput *EmailOutput + FileOutput *FileOutput + GenericOutput *GenericOutput + HostnameOutput *HostnameOutput + IBANOutput *IBANOutput + IPv4Output *IPv4Output + IPv6Output *IPv6Output + ImphashOutput *ImphashOutput + JA3Output *JA3Output + JARMOutput *JARMOutput + MD5Output *MD5Output + MacAddressOutput *MacAddressOutput + MutexOutput *MutexOutput + NamedPipeOutput *NamedPipeOutput + PackageOutput *PackageOutput + PathOutput *PathOutput + RegistryKeyOutput *RegistryKeyOutput + SHA1Output *SHA1Output + SHA256Output *SHA256Output + SsdeepOutput *SsdeepOutput + TLSHOutput *TLSHOutput + UrlOutput *UrlOutput + UserAccountOutput *UserAccountOutput + UserAgentOutput *UserAgentOutput + WalletOutput *WalletOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNOutput + err = json.Unmarshal(data, &dst.ASNOutput) + if err == nil { + jsonASNOutput, _ := json.Marshal(dst.ASNOutput) + if string(jsonASNOutput) == "{}" { // empty struct + dst.ASNOutput = nil + } else { + return nil // data stored in dst.ASNOutput, return on the first match + } + } else { + dst.ASNOutput = nil + } + + // try to unmarshal JSON data into BICOutput + err = json.Unmarshal(data, &dst.BICOutput) + if err == nil { + jsonBICOutput, _ := json.Marshal(dst.BICOutput) + if string(jsonBICOutput) == "{}" { // empty struct + dst.BICOutput = nil + } else { + return nil // data stored in dst.BICOutput, return on the first match + } + } else { + dst.BICOutput = nil + } + + // try to unmarshal JSON data into CIDROutput + err = json.Unmarshal(data, &dst.CIDROutput) + if err == nil { + jsonCIDROutput, _ := json.Marshal(dst.CIDROutput) + if string(jsonCIDROutput) == "{}" { // empty struct + dst.CIDROutput = nil + } else { + return nil // data stored in dst.CIDROutput, return on the first match + } + } else { + dst.CIDROutput = nil + } + + // try to unmarshal JSON data into CertificateOutput + err = json.Unmarshal(data, &dst.CertificateOutput) + if err == nil { + jsonCertificateOutput, _ := json.Marshal(dst.CertificateOutput) + if string(jsonCertificateOutput) == "{}" { // empty struct + dst.CertificateOutput = nil + } else { + return nil // data stored in dst.CertificateOutput, return on the first match + } + } else { + dst.CertificateOutput = nil + } + + // try to unmarshal JSON data into CommandLineOutput + err = json.Unmarshal(data, &dst.CommandLineOutput) + if err == nil { + jsonCommandLineOutput, _ := json.Marshal(dst.CommandLineOutput) + if string(jsonCommandLineOutput) == "{}" { // empty struct + dst.CommandLineOutput = nil + } else { + return nil // data stored in dst.CommandLineOutput, return on the first match + } + } else { + dst.CommandLineOutput = nil + } + + // try to unmarshal JSON data into DockerImageOutput + err = json.Unmarshal(data, &dst.DockerImageOutput) + if err == nil { + jsonDockerImageOutput, _ := json.Marshal(dst.DockerImageOutput) + if string(jsonDockerImageOutput) == "{}" { // empty struct + dst.DockerImageOutput = nil + } else { + return nil // data stored in dst.DockerImageOutput, return on the first match + } + } else { + dst.DockerImageOutput = nil + } + + // try to unmarshal JSON data into EmailOutput + err = json.Unmarshal(data, &dst.EmailOutput) + if err == nil { + jsonEmailOutput, _ := json.Marshal(dst.EmailOutput) + if string(jsonEmailOutput) == "{}" { // empty struct + dst.EmailOutput = nil + } else { + return nil // data stored in dst.EmailOutput, return on the first match + } + } else { + dst.EmailOutput = nil + } + + // try to unmarshal JSON data into FileOutput + err = json.Unmarshal(data, &dst.FileOutput) + if err == nil { + jsonFileOutput, _ := json.Marshal(dst.FileOutput) + if string(jsonFileOutput) == "{}" { // empty struct + dst.FileOutput = nil + } else { + return nil // data stored in dst.FileOutput, return on the first match + } + } else { + dst.FileOutput = nil + } + + // try to unmarshal JSON data into GenericOutput + err = json.Unmarshal(data, &dst.GenericOutput) + if err == nil { + jsonGenericOutput, _ := json.Marshal(dst.GenericOutput) + if string(jsonGenericOutput) == "{}" { // empty struct + dst.GenericOutput = nil + } else { + return nil // data stored in dst.GenericOutput, return on the first match + } + } else { + dst.GenericOutput = nil + } + + // try to unmarshal JSON data into HostnameOutput + err = json.Unmarshal(data, &dst.HostnameOutput) + if err == nil { + jsonHostnameOutput, _ := json.Marshal(dst.HostnameOutput) + if string(jsonHostnameOutput) == "{}" { // empty struct + dst.HostnameOutput = nil + } else { + return nil // data stored in dst.HostnameOutput, return on the first match + } + } else { + dst.HostnameOutput = nil + } + + // try to unmarshal JSON data into IBANOutput + err = json.Unmarshal(data, &dst.IBANOutput) + if err == nil { + jsonIBANOutput, _ := json.Marshal(dst.IBANOutput) + if string(jsonIBANOutput) == "{}" { // empty struct + dst.IBANOutput = nil + } else { + return nil // data stored in dst.IBANOutput, return on the first match + } + } else { + dst.IBANOutput = nil + } + + // try to unmarshal JSON data into IPv4Output + err = json.Unmarshal(data, &dst.IPv4Output) + if err == nil { + jsonIPv4Output, _ := json.Marshal(dst.IPv4Output) + if string(jsonIPv4Output) == "{}" { // empty struct + dst.IPv4Output = nil + } else { + return nil // data stored in dst.IPv4Output, return on the first match + } + } else { + dst.IPv4Output = nil + } + + // try to unmarshal JSON data into IPv6Output + err = json.Unmarshal(data, &dst.IPv6Output) + if err == nil { + jsonIPv6Output, _ := json.Marshal(dst.IPv6Output) + if string(jsonIPv6Output) == "{}" { // empty struct + dst.IPv6Output = nil + } else { + return nil // data stored in dst.IPv6Output, return on the first match + } + } else { + dst.IPv6Output = nil + } + + // try to unmarshal JSON data into ImphashOutput + err = json.Unmarshal(data, &dst.ImphashOutput) + if err == nil { + jsonImphashOutput, _ := json.Marshal(dst.ImphashOutput) + if string(jsonImphashOutput) == "{}" { // empty struct + dst.ImphashOutput = nil + } else { + return nil // data stored in dst.ImphashOutput, return on the first match + } + } else { + dst.ImphashOutput = nil + } + + // try to unmarshal JSON data into JA3Output + err = json.Unmarshal(data, &dst.JA3Output) + if err == nil { + jsonJA3Output, _ := json.Marshal(dst.JA3Output) + if string(jsonJA3Output) == "{}" { // empty struct + dst.JA3Output = nil + } else { + return nil // data stored in dst.JA3Output, return on the first match + } + } else { + dst.JA3Output = nil + } + + // try to unmarshal JSON data into JARMOutput + err = json.Unmarshal(data, &dst.JARMOutput) + if err == nil { + jsonJARMOutput, _ := json.Marshal(dst.JARMOutput) + if string(jsonJARMOutput) == "{}" { // empty struct + dst.JARMOutput = nil + } else { + return nil // data stored in dst.JARMOutput, return on the first match + } + } else { + dst.JARMOutput = nil + } + + // try to unmarshal JSON data into MD5Output + err = json.Unmarshal(data, &dst.MD5Output) + if err == nil { + jsonMD5Output, _ := json.Marshal(dst.MD5Output) + if string(jsonMD5Output) == "{}" { // empty struct + dst.MD5Output = nil + } else { + return nil // data stored in dst.MD5Output, return on the first match + } + } else { + dst.MD5Output = nil + } + + // try to unmarshal JSON data into MacAddressOutput + err = json.Unmarshal(data, &dst.MacAddressOutput) + if err == nil { + jsonMacAddressOutput, _ := json.Marshal(dst.MacAddressOutput) + if string(jsonMacAddressOutput) == "{}" { // empty struct + dst.MacAddressOutput = nil + } else { + return nil // data stored in dst.MacAddressOutput, return on the first match + } + } else { + dst.MacAddressOutput = nil + } + + // try to unmarshal JSON data into MutexOutput + err = json.Unmarshal(data, &dst.MutexOutput) + if err == nil { + jsonMutexOutput, _ := json.Marshal(dst.MutexOutput) + if string(jsonMutexOutput) == "{}" { // empty struct + dst.MutexOutput = nil + } else { + return nil // data stored in dst.MutexOutput, return on the first match + } + } else { + dst.MutexOutput = nil + } + + // try to unmarshal JSON data into NamedPipeOutput + err = json.Unmarshal(data, &dst.NamedPipeOutput) + if err == nil { + jsonNamedPipeOutput, _ := json.Marshal(dst.NamedPipeOutput) + if string(jsonNamedPipeOutput) == "{}" { // empty struct + dst.NamedPipeOutput = nil + } else { + return nil // data stored in dst.NamedPipeOutput, return on the first match + } + } else { + dst.NamedPipeOutput = nil + } + + // try to unmarshal JSON data into PackageOutput + err = json.Unmarshal(data, &dst.PackageOutput) + if err == nil { + jsonPackageOutput, _ := json.Marshal(dst.PackageOutput) + if string(jsonPackageOutput) == "{}" { // empty struct + dst.PackageOutput = nil + } else { + return nil // data stored in dst.PackageOutput, return on the first match + } + } else { + dst.PackageOutput = nil + } + + // try to unmarshal JSON data into PathOutput + err = json.Unmarshal(data, &dst.PathOutput) + if err == nil { + jsonPathOutput, _ := json.Marshal(dst.PathOutput) + if string(jsonPathOutput) == "{}" { // empty struct + dst.PathOutput = nil + } else { + return nil // data stored in dst.PathOutput, return on the first match + } + } else { + dst.PathOutput = nil + } + + // try to unmarshal JSON data into RegistryKeyOutput + err = json.Unmarshal(data, &dst.RegistryKeyOutput) + if err == nil { + jsonRegistryKeyOutput, _ := json.Marshal(dst.RegistryKeyOutput) + if string(jsonRegistryKeyOutput) == "{}" { // empty struct + dst.RegistryKeyOutput = nil + } else { + return nil // data stored in dst.RegistryKeyOutput, return on the first match + } + } else { + dst.RegistryKeyOutput = nil + } + + // try to unmarshal JSON data into SHA1Output + err = json.Unmarshal(data, &dst.SHA1Output) + if err == nil { + jsonSHA1Output, _ := json.Marshal(dst.SHA1Output) + if string(jsonSHA1Output) == "{}" { // empty struct + dst.SHA1Output = nil + } else { + return nil // data stored in dst.SHA1Output, return on the first match + } + } else { + dst.SHA1Output = nil + } + + // try to unmarshal JSON data into SHA256Output + err = json.Unmarshal(data, &dst.SHA256Output) + if err == nil { + jsonSHA256Output, _ := json.Marshal(dst.SHA256Output) + if string(jsonSHA256Output) == "{}" { // empty struct + dst.SHA256Output = nil + } else { + return nil // data stored in dst.SHA256Output, return on the first match + } + } else { + dst.SHA256Output = nil + } + + // try to unmarshal JSON data into SsdeepOutput + err = json.Unmarshal(data, &dst.SsdeepOutput) + if err == nil { + jsonSsdeepOutput, _ := json.Marshal(dst.SsdeepOutput) + if string(jsonSsdeepOutput) == "{}" { // empty struct + dst.SsdeepOutput = nil + } else { + return nil // data stored in dst.SsdeepOutput, return on the first match + } + } else { + dst.SsdeepOutput = nil + } + + // try to unmarshal JSON data into TLSHOutput + err = json.Unmarshal(data, &dst.TLSHOutput) + if err == nil { + jsonTLSHOutput, _ := json.Marshal(dst.TLSHOutput) + if string(jsonTLSHOutput) == "{}" { // empty struct + dst.TLSHOutput = nil + } else { + return nil // data stored in dst.TLSHOutput, return on the first match + } + } else { + dst.TLSHOutput = nil + } + + // try to unmarshal JSON data into UrlOutput + err = json.Unmarshal(data, &dst.UrlOutput) + if err == nil { + jsonUrlOutput, _ := json.Marshal(dst.UrlOutput) + if string(jsonUrlOutput) == "{}" { // empty struct + dst.UrlOutput = nil + } else { + return nil // data stored in dst.UrlOutput, return on the first match + } + } else { + dst.UrlOutput = nil + } + + // try to unmarshal JSON data into UserAccountOutput + err = json.Unmarshal(data, &dst.UserAccountOutput) + if err == nil { + jsonUserAccountOutput, _ := json.Marshal(dst.UserAccountOutput) + if string(jsonUserAccountOutput) == "{}" { // empty struct + dst.UserAccountOutput = nil + } else { + return nil // data stored in dst.UserAccountOutput, return on the first match + } + } else { + dst.UserAccountOutput = nil + } + + // try to unmarshal JSON data into UserAgentOutput + err = json.Unmarshal(data, &dst.UserAgentOutput) + if err == nil { + jsonUserAgentOutput, _ := json.Marshal(dst.UserAgentOutput) + if string(jsonUserAgentOutput) == "{}" { // empty struct + dst.UserAgentOutput = nil + } else { + return nil // data stored in dst.UserAgentOutput, return on the first match + } + } else { + dst.UserAgentOutput = nil + } + + // try to unmarshal JSON data into WalletOutput + err = json.Unmarshal(data, &dst.WalletOutput) + if err == nil { + jsonWalletOutput, _ := json.Marshal(dst.WalletOutput) + if string(jsonWalletOutput) == "{}" { // empty struct + dst.WalletOutput = nil + } else { + return nil // data stored in dst.WalletOutput, return on the first match + } + } else { + dst.WalletOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) MarshalJSON() ([]byte, error) { + if src.ASNOutput != nil { + return json.Marshal(&src.ASNOutput) + } + + if src.BICOutput != nil { + return json.Marshal(&src.BICOutput) + } + + if src.CIDROutput != nil { + return json.Marshal(&src.CIDROutput) + } + + if src.CertificateOutput != nil { + return json.Marshal(&src.CertificateOutput) + } + + if src.CommandLineOutput != nil { + return json.Marshal(&src.CommandLineOutput) + } + + if src.DockerImageOutput != nil { + return json.Marshal(&src.DockerImageOutput) + } + + if src.EmailOutput != nil { + return json.Marshal(&src.EmailOutput) + } + + if src.FileOutput != nil { + return json.Marshal(&src.FileOutput) + } + + if src.GenericOutput != nil { + return json.Marshal(&src.GenericOutput) + } + + if src.HostnameOutput != nil { + return json.Marshal(&src.HostnameOutput) + } + + if src.IBANOutput != nil { + return json.Marshal(&src.IBANOutput) + } + + if src.IPv4Output != nil { + return json.Marshal(&src.IPv4Output) + } + + if src.IPv6Output != nil { + return json.Marshal(&src.IPv6Output) + } + + if src.ImphashOutput != nil { + return json.Marshal(&src.ImphashOutput) + } + + if src.JA3Output != nil { + return json.Marshal(&src.JA3Output) + } + + if src.JARMOutput != nil { + return json.Marshal(&src.JARMOutput) + } + + if src.MD5Output != nil { + return json.Marshal(&src.MD5Output) + } + + if src.MacAddressOutput != nil { + return json.Marshal(&src.MacAddressOutput) + } + + if src.MutexOutput != nil { + return json.Marshal(&src.MutexOutput) + } + + if src.NamedPipeOutput != nil { + return json.Marshal(&src.NamedPipeOutput) + } + + if src.PackageOutput != nil { + return json.Marshal(&src.PackageOutput) + } + + if src.PathOutput != nil { + return json.Marshal(&src.PathOutput) + } + + if src.RegistryKeyOutput != nil { + return json.Marshal(&src.RegistryKeyOutput) + } + + if src.SHA1Output != nil { + return json.Marshal(&src.SHA1Output) + } + + if src.SHA256Output != nil { + return json.Marshal(&src.SHA256Output) + } + + if src.SsdeepOutput != nil { + return json.Marshal(&src.SsdeepOutput) + } + + if src.TLSHOutput != nil { + return json.Marshal(&src.TLSHOutput) + } + + if src.UrlOutput != nil { + return json.Marshal(&src.UrlOutput) + } + + if src.UserAccountOutput != nil { + return json.Marshal(&src.UserAccountOutput) + } + + if src.UserAgentOutput != nil { + return json.Marshal(&src.UserAgentOutput) + } + + if src.WalletOutput != nil { + return json.Marshal(&src.WalletOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost struct { + value *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost + isSet bool +} + +func (v NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) Get() *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost { + return v.value +} + +func (v *NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) Set(val *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost(val *ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) *NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost { + return &NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost{value: val, isSet: true} +} + +func (v NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_details_api_v2_dfiq__dfiq_id__get.go b/model_response_details_api_v2_dfiq__dfiq_id__get.go new file mode 100644 index 0000000..788a738 --- /dev/null +++ b/model_response_details_api_v2_dfiq__dfiq_id__get.go @@ -0,0 +1,188 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ResponseDetailsApiV2DfiqDfiqIdGet - struct for ResponseDetailsApiV2DfiqDfiqIdGet +type ResponseDetailsApiV2DfiqDfiqIdGet struct { + DFIQFacet *DFIQFacet + DFIQQuestion *DFIQQuestion + DFIQScenario *DFIQScenario +} + +// DFIQFacetAsResponseDetailsApiV2DfiqDfiqIdGet is a convenience function that returns DFIQFacet wrapped in ResponseDetailsApiV2DfiqDfiqIdGet +func DFIQFacetAsResponseDetailsApiV2DfiqDfiqIdGet(v *DFIQFacet) ResponseDetailsApiV2DfiqDfiqIdGet { + return ResponseDetailsApiV2DfiqDfiqIdGet{ + DFIQFacet: v, + } +} + +// DFIQQuestionAsResponseDetailsApiV2DfiqDfiqIdGet is a convenience function that returns DFIQQuestion wrapped in ResponseDetailsApiV2DfiqDfiqIdGet +func DFIQQuestionAsResponseDetailsApiV2DfiqDfiqIdGet(v *DFIQQuestion) ResponseDetailsApiV2DfiqDfiqIdGet { + return ResponseDetailsApiV2DfiqDfiqIdGet{ + DFIQQuestion: v, + } +} + +// DFIQScenarioAsResponseDetailsApiV2DfiqDfiqIdGet is a convenience function that returns DFIQScenario wrapped in ResponseDetailsApiV2DfiqDfiqIdGet +func DFIQScenarioAsResponseDetailsApiV2DfiqDfiqIdGet(v *DFIQScenario) ResponseDetailsApiV2DfiqDfiqIdGet { + return ResponseDetailsApiV2DfiqDfiqIdGet{ + DFIQScenario: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ResponseDetailsApiV2DfiqDfiqIdGet) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into DFIQFacet + err = newStrictDecoder(data).Decode(&dst.DFIQFacet) + if err == nil { + jsonDFIQFacet, _ := json.Marshal(dst.DFIQFacet) + if string(jsonDFIQFacet) == "{}" { // empty struct + dst.DFIQFacet = nil + } else { + if err = validator.Validate(dst.DFIQFacet); err != nil { + dst.DFIQFacet = nil + } else { + match++ + } + } + } else { + dst.DFIQFacet = nil + } + + // try to unmarshal data into DFIQQuestion + err = newStrictDecoder(data).Decode(&dst.DFIQQuestion) + if err == nil { + jsonDFIQQuestion, _ := json.Marshal(dst.DFIQQuestion) + if string(jsonDFIQQuestion) == "{}" { // empty struct + dst.DFIQQuestion = nil + } else { + if err = validator.Validate(dst.DFIQQuestion); err != nil { + dst.DFIQQuestion = nil + } else { + match++ + } + } + } else { + dst.DFIQQuestion = nil + } + + // try to unmarshal data into DFIQScenario + err = newStrictDecoder(data).Decode(&dst.DFIQScenario) + if err == nil { + jsonDFIQScenario, _ := json.Marshal(dst.DFIQScenario) + if string(jsonDFIQScenario) == "{}" { // empty struct + dst.DFIQScenario = nil + } else { + if err = validator.Validate(dst.DFIQScenario); err != nil { + dst.DFIQScenario = nil + } else { + match++ + } + } + } else { + dst.DFIQScenario = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.DFIQFacet = nil + dst.DFIQQuestion = nil + dst.DFIQScenario = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ResponseDetailsApiV2DfiqDfiqIdGet)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ResponseDetailsApiV2DfiqDfiqIdGet)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseDetailsApiV2DfiqDfiqIdGet) MarshalJSON() ([]byte, error) { + if src.DFIQFacet != nil { + return json.Marshal(&src.DFIQFacet) + } + + if src.DFIQQuestion != nil { + return json.Marshal(&src.DFIQQuestion) + } + + if src.DFIQScenario != nil { + return json.Marshal(&src.DFIQScenario) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ResponseDetailsApiV2DfiqDfiqIdGet) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.DFIQFacet != nil { + return obj.DFIQFacet + } + + if obj.DFIQQuestion != nil { + return obj.DFIQQuestion + } + + if obj.DFIQScenario != nil { + return obj.DFIQScenario + } + + // all schemas are nil + return nil +} + +type NullableResponseDetailsApiV2DfiqDfiqIdGet struct { + value *ResponseDetailsApiV2DfiqDfiqIdGet + isSet bool +} + +func (v NullableResponseDetailsApiV2DfiqDfiqIdGet) Get() *ResponseDetailsApiV2DfiqDfiqIdGet { + return v.value +} + +func (v *NullableResponseDetailsApiV2DfiqDfiqIdGet) Set(val *ResponseDetailsApiV2DfiqDfiqIdGet) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDetailsApiV2DfiqDfiqIdGet) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDetailsApiV2DfiqDfiqIdGet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDetailsApiV2DfiqDfiqIdGet(val *ResponseDetailsApiV2DfiqDfiqIdGet) *NullableResponseDetailsApiV2DfiqDfiqIdGet { + return &NullableResponseDetailsApiV2DfiqDfiqIdGet{value: val, isSet: true} +} + +func (v NullableResponseDetailsApiV2DfiqDfiqIdGet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDetailsApiV2DfiqDfiqIdGet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_details_api_v2_entities__entity_id__get.go b/model_response_details_api_v2_entities__entity_id__get.go new file mode 100644 index 0000000..d7fadb6 --- /dev/null +++ b/model_response_details_api_v2_entities__entity_id__get.go @@ -0,0 +1,301 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseDetailsApiV2EntitiesEntityIdGet struct for ResponseDetailsApiV2EntitiesEntityIdGet +type ResponseDetailsApiV2EntitiesEntityIdGet struct { + AttackPatternOutput *AttackPatternOutput + CampaignOutput *CampaignOutput + CompanyOutput *CompanyOutput + CourseOfActionOutput *CourseOfActionOutput + IdentityOutput *IdentityOutput + IntrusionSetOutput *IntrusionSetOutput + InvestigationOutput *InvestigationOutput + MalwareOutput *MalwareOutput + NoteOutput *NoteOutput + PhoneOutput *PhoneOutput + ThreatActorOutput *ThreatActorOutput + ToolOutput *ToolOutput + VulnerabilityOutput *VulnerabilityOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseDetailsApiV2EntitiesEntityIdGet) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AttackPatternOutput + err = json.Unmarshal(data, &dst.AttackPatternOutput) + if err == nil { + jsonAttackPatternOutput, _ := json.Marshal(dst.AttackPatternOutput) + if string(jsonAttackPatternOutput) == "{}" { // empty struct + dst.AttackPatternOutput = nil + } else { + return nil // data stored in dst.AttackPatternOutput, return on the first match + } + } else { + dst.AttackPatternOutput = nil + } + + // try to unmarshal JSON data into CampaignOutput + err = json.Unmarshal(data, &dst.CampaignOutput) + if err == nil { + jsonCampaignOutput, _ := json.Marshal(dst.CampaignOutput) + if string(jsonCampaignOutput) == "{}" { // empty struct + dst.CampaignOutput = nil + } else { + return nil // data stored in dst.CampaignOutput, return on the first match + } + } else { + dst.CampaignOutput = nil + } + + // try to unmarshal JSON data into CompanyOutput + err = json.Unmarshal(data, &dst.CompanyOutput) + if err == nil { + jsonCompanyOutput, _ := json.Marshal(dst.CompanyOutput) + if string(jsonCompanyOutput) == "{}" { // empty struct + dst.CompanyOutput = nil + } else { + return nil // data stored in dst.CompanyOutput, return on the first match + } + } else { + dst.CompanyOutput = nil + } + + // try to unmarshal JSON data into CourseOfActionOutput + err = json.Unmarshal(data, &dst.CourseOfActionOutput) + if err == nil { + jsonCourseOfActionOutput, _ := json.Marshal(dst.CourseOfActionOutput) + if string(jsonCourseOfActionOutput) == "{}" { // empty struct + dst.CourseOfActionOutput = nil + } else { + return nil // data stored in dst.CourseOfActionOutput, return on the first match + } + } else { + dst.CourseOfActionOutput = nil + } + + // try to unmarshal JSON data into IdentityOutput + err = json.Unmarshal(data, &dst.IdentityOutput) + if err == nil { + jsonIdentityOutput, _ := json.Marshal(dst.IdentityOutput) + if string(jsonIdentityOutput) == "{}" { // empty struct + dst.IdentityOutput = nil + } else { + return nil // data stored in dst.IdentityOutput, return on the first match + } + } else { + dst.IdentityOutput = nil + } + + // try to unmarshal JSON data into IntrusionSetOutput + err = json.Unmarshal(data, &dst.IntrusionSetOutput) + if err == nil { + jsonIntrusionSetOutput, _ := json.Marshal(dst.IntrusionSetOutput) + if string(jsonIntrusionSetOutput) == "{}" { // empty struct + dst.IntrusionSetOutput = nil + } else { + return nil // data stored in dst.IntrusionSetOutput, return on the first match + } + } else { + dst.IntrusionSetOutput = nil + } + + // try to unmarshal JSON data into InvestigationOutput + err = json.Unmarshal(data, &dst.InvestigationOutput) + if err == nil { + jsonInvestigationOutput, _ := json.Marshal(dst.InvestigationOutput) + if string(jsonInvestigationOutput) == "{}" { // empty struct + dst.InvestigationOutput = nil + } else { + return nil // data stored in dst.InvestigationOutput, return on the first match + } + } else { + dst.InvestigationOutput = nil + } + + // try to unmarshal JSON data into MalwareOutput + err = json.Unmarshal(data, &dst.MalwareOutput) + if err == nil { + jsonMalwareOutput, _ := json.Marshal(dst.MalwareOutput) + if string(jsonMalwareOutput) == "{}" { // empty struct + dst.MalwareOutput = nil + } else { + return nil // data stored in dst.MalwareOutput, return on the first match + } + } else { + dst.MalwareOutput = nil + } + + // try to unmarshal JSON data into NoteOutput + err = json.Unmarshal(data, &dst.NoteOutput) + if err == nil { + jsonNoteOutput, _ := json.Marshal(dst.NoteOutput) + if string(jsonNoteOutput) == "{}" { // empty struct + dst.NoteOutput = nil + } else { + return nil // data stored in dst.NoteOutput, return on the first match + } + } else { + dst.NoteOutput = nil + } + + // try to unmarshal JSON data into PhoneOutput + err = json.Unmarshal(data, &dst.PhoneOutput) + if err == nil { + jsonPhoneOutput, _ := json.Marshal(dst.PhoneOutput) + if string(jsonPhoneOutput) == "{}" { // empty struct + dst.PhoneOutput = nil + } else { + return nil // data stored in dst.PhoneOutput, return on the first match + } + } else { + dst.PhoneOutput = nil + } + + // try to unmarshal JSON data into ThreatActorOutput + err = json.Unmarshal(data, &dst.ThreatActorOutput) + if err == nil { + jsonThreatActorOutput, _ := json.Marshal(dst.ThreatActorOutput) + if string(jsonThreatActorOutput) == "{}" { // empty struct + dst.ThreatActorOutput = nil + } else { + return nil // data stored in dst.ThreatActorOutput, return on the first match + } + } else { + dst.ThreatActorOutput = nil + } + + // try to unmarshal JSON data into ToolOutput + err = json.Unmarshal(data, &dst.ToolOutput) + if err == nil { + jsonToolOutput, _ := json.Marshal(dst.ToolOutput) + if string(jsonToolOutput) == "{}" { // empty struct + dst.ToolOutput = nil + } else { + return nil // data stored in dst.ToolOutput, return on the first match + } + } else { + dst.ToolOutput = nil + } + + // try to unmarshal JSON data into VulnerabilityOutput + err = json.Unmarshal(data, &dst.VulnerabilityOutput) + if err == nil { + jsonVulnerabilityOutput, _ := json.Marshal(dst.VulnerabilityOutput) + if string(jsonVulnerabilityOutput) == "{}" { // empty struct + dst.VulnerabilityOutput = nil + } else { + return nil // data stored in dst.VulnerabilityOutput, return on the first match + } + } else { + dst.VulnerabilityOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseDetailsApiV2EntitiesEntityIdGet)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseDetailsApiV2EntitiesEntityIdGet) MarshalJSON() ([]byte, error) { + if src.AttackPatternOutput != nil { + return json.Marshal(&src.AttackPatternOutput) + } + + if src.CampaignOutput != nil { + return json.Marshal(&src.CampaignOutput) + } + + if src.CompanyOutput != nil { + return json.Marshal(&src.CompanyOutput) + } + + if src.CourseOfActionOutput != nil { + return json.Marshal(&src.CourseOfActionOutput) + } + + if src.IdentityOutput != nil { + return json.Marshal(&src.IdentityOutput) + } + + if src.IntrusionSetOutput != nil { + return json.Marshal(&src.IntrusionSetOutput) + } + + if src.InvestigationOutput != nil { + return json.Marshal(&src.InvestigationOutput) + } + + if src.MalwareOutput != nil { + return json.Marshal(&src.MalwareOutput) + } + + if src.NoteOutput != nil { + return json.Marshal(&src.NoteOutput) + } + + if src.PhoneOutput != nil { + return json.Marshal(&src.PhoneOutput) + } + + if src.ThreatActorOutput != nil { + return json.Marshal(&src.ThreatActorOutput) + } + + if src.ToolOutput != nil { + return json.Marshal(&src.ToolOutput) + } + + if src.VulnerabilityOutput != nil { + return json.Marshal(&src.VulnerabilityOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseDetailsApiV2EntitiesEntityIdGet struct { + value *ResponseDetailsApiV2EntitiesEntityIdGet + isSet bool +} + +func (v NullableResponseDetailsApiV2EntitiesEntityIdGet) Get() *ResponseDetailsApiV2EntitiesEntityIdGet { + return v.value +} + +func (v *NullableResponseDetailsApiV2EntitiesEntityIdGet) Set(val *ResponseDetailsApiV2EntitiesEntityIdGet) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDetailsApiV2EntitiesEntityIdGet) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDetailsApiV2EntitiesEntityIdGet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDetailsApiV2EntitiesEntityIdGet(val *ResponseDetailsApiV2EntitiesEntityIdGet) *NullableResponseDetailsApiV2EntitiesEntityIdGet { + return &NullableResponseDetailsApiV2EntitiesEntityIdGet{value: val, isSet: true} +} + +func (v NullableResponseDetailsApiV2EntitiesEntityIdGet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDetailsApiV2EntitiesEntityIdGet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_details_api_v2_indicators__indicator_id__get.go b/model_response_details_api_v2_indicators__indicator_id__get.go new file mode 100644 index 0000000..8e0354f --- /dev/null +++ b/model_response_details_api_v2_indicators__indicator_id__get.go @@ -0,0 +1,175 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseDetailsApiV2IndicatorsIndicatorIdGet struct for ResponseDetailsApiV2IndicatorsIndicatorIdGet +type ResponseDetailsApiV2IndicatorsIndicatorIdGet struct { + ForensicArtifactOutput *ForensicArtifactOutput + QueryOutput *QueryOutput + RegexOutput *RegexOutput + SigmaOutput *SigmaOutput + SuricataOutput *SuricataOutput + YaraOutput *YaraOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseDetailsApiV2IndicatorsIndicatorIdGet) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ForensicArtifactOutput + err = json.Unmarshal(data, &dst.ForensicArtifactOutput) + if err == nil { + jsonForensicArtifactOutput, _ := json.Marshal(dst.ForensicArtifactOutput) + if string(jsonForensicArtifactOutput) == "{}" { // empty struct + dst.ForensicArtifactOutput = nil + } else { + return nil // data stored in dst.ForensicArtifactOutput, return on the first match + } + } else { + dst.ForensicArtifactOutput = nil + } + + // try to unmarshal JSON data into QueryOutput + err = json.Unmarshal(data, &dst.QueryOutput) + if err == nil { + jsonQueryOutput, _ := json.Marshal(dst.QueryOutput) + if string(jsonQueryOutput) == "{}" { // empty struct + dst.QueryOutput = nil + } else { + return nil // data stored in dst.QueryOutput, return on the first match + } + } else { + dst.QueryOutput = nil + } + + // try to unmarshal JSON data into RegexOutput + err = json.Unmarshal(data, &dst.RegexOutput) + if err == nil { + jsonRegexOutput, _ := json.Marshal(dst.RegexOutput) + if string(jsonRegexOutput) == "{}" { // empty struct + dst.RegexOutput = nil + } else { + return nil // data stored in dst.RegexOutput, return on the first match + } + } else { + dst.RegexOutput = nil + } + + // try to unmarshal JSON data into SigmaOutput + err = json.Unmarshal(data, &dst.SigmaOutput) + if err == nil { + jsonSigmaOutput, _ := json.Marshal(dst.SigmaOutput) + if string(jsonSigmaOutput) == "{}" { // empty struct + dst.SigmaOutput = nil + } else { + return nil // data stored in dst.SigmaOutput, return on the first match + } + } else { + dst.SigmaOutput = nil + } + + // try to unmarshal JSON data into SuricataOutput + err = json.Unmarshal(data, &dst.SuricataOutput) + if err == nil { + jsonSuricataOutput, _ := json.Marshal(dst.SuricataOutput) + if string(jsonSuricataOutput) == "{}" { // empty struct + dst.SuricataOutput = nil + } else { + return nil // data stored in dst.SuricataOutput, return on the first match + } + } else { + dst.SuricataOutput = nil + } + + // try to unmarshal JSON data into YaraOutput + err = json.Unmarshal(data, &dst.YaraOutput) + if err == nil { + jsonYaraOutput, _ := json.Marshal(dst.YaraOutput) + if string(jsonYaraOutput) == "{}" { // empty struct + dst.YaraOutput = nil + } else { + return nil // data stored in dst.YaraOutput, return on the first match + } + } else { + dst.YaraOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseDetailsApiV2IndicatorsIndicatorIdGet)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseDetailsApiV2IndicatorsIndicatorIdGet) MarshalJSON() ([]byte, error) { + if src.ForensicArtifactOutput != nil { + return json.Marshal(&src.ForensicArtifactOutput) + } + + if src.QueryOutput != nil { + return json.Marshal(&src.QueryOutput) + } + + if src.RegexOutput != nil { + return json.Marshal(&src.RegexOutput) + } + + if src.SigmaOutput != nil { + return json.Marshal(&src.SigmaOutput) + } + + if src.SuricataOutput != nil { + return json.Marshal(&src.SuricataOutput) + } + + if src.YaraOutput != nil { + return json.Marshal(&src.YaraOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseDetailsApiV2IndicatorsIndicatorIdGet struct { + value *ResponseDetailsApiV2IndicatorsIndicatorIdGet + isSet bool +} + +func (v NullableResponseDetailsApiV2IndicatorsIndicatorIdGet) Get() *ResponseDetailsApiV2IndicatorsIndicatorIdGet { + return v.value +} + +func (v *NullableResponseDetailsApiV2IndicatorsIndicatorIdGet) Set(val *ResponseDetailsApiV2IndicatorsIndicatorIdGet) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDetailsApiV2IndicatorsIndicatorIdGet) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDetailsApiV2IndicatorsIndicatorIdGet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDetailsApiV2IndicatorsIndicatorIdGet(val *ResponseDetailsApiV2IndicatorsIndicatorIdGet) *NullableResponseDetailsApiV2IndicatorsIndicatorIdGet { + return &NullableResponseDetailsApiV2IndicatorsIndicatorIdGet{value: val, isSet: true} +} + +func (v NullableResponseDetailsApiV2IndicatorsIndicatorIdGet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDetailsApiV2IndicatorsIndicatorIdGet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_details_api_v2_observables__observable_id__get.go b/model_response_details_api_v2_observables__observable_id__get.go new file mode 100644 index 0000000..fa8303f --- /dev/null +++ b/model_response_details_api_v2_observables__observable_id__get.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseDetailsApiV2ObservablesObservableIdGet struct for ResponseDetailsApiV2ObservablesObservableIdGet +type ResponseDetailsApiV2ObservablesObservableIdGet struct { + ASNOutput *ASNOutput + BICOutput *BICOutput + CIDROutput *CIDROutput + CertificateOutput *CertificateOutput + CommandLineOutput *CommandLineOutput + DockerImageOutput *DockerImageOutput + EmailOutput *EmailOutput + FileOutput *FileOutput + GenericOutput *GenericOutput + HostnameOutput *HostnameOutput + IBANOutput *IBANOutput + IPv4Output *IPv4Output + IPv6Output *IPv6Output + ImphashOutput *ImphashOutput + JA3Output *JA3Output + JARMOutput *JARMOutput + MD5Output *MD5Output + MacAddressOutput *MacAddressOutput + MutexOutput *MutexOutput + NamedPipeOutput *NamedPipeOutput + PackageOutput *PackageOutput + PathOutput *PathOutput + RegistryKeyOutput *RegistryKeyOutput + SHA1Output *SHA1Output + SHA256Output *SHA256Output + SsdeepOutput *SsdeepOutput + TLSHOutput *TLSHOutput + UrlOutput *UrlOutput + UserAccountOutput *UserAccountOutput + UserAgentOutput *UserAgentOutput + WalletOutput *WalletOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseDetailsApiV2ObservablesObservableIdGet) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNOutput + err = json.Unmarshal(data, &dst.ASNOutput) + if err == nil { + jsonASNOutput, _ := json.Marshal(dst.ASNOutput) + if string(jsonASNOutput) == "{}" { // empty struct + dst.ASNOutput = nil + } else { + return nil // data stored in dst.ASNOutput, return on the first match + } + } else { + dst.ASNOutput = nil + } + + // try to unmarshal JSON data into BICOutput + err = json.Unmarshal(data, &dst.BICOutput) + if err == nil { + jsonBICOutput, _ := json.Marshal(dst.BICOutput) + if string(jsonBICOutput) == "{}" { // empty struct + dst.BICOutput = nil + } else { + return nil // data stored in dst.BICOutput, return on the first match + } + } else { + dst.BICOutput = nil + } + + // try to unmarshal JSON data into CIDROutput + err = json.Unmarshal(data, &dst.CIDROutput) + if err == nil { + jsonCIDROutput, _ := json.Marshal(dst.CIDROutput) + if string(jsonCIDROutput) == "{}" { // empty struct + dst.CIDROutput = nil + } else { + return nil // data stored in dst.CIDROutput, return on the first match + } + } else { + dst.CIDROutput = nil + } + + // try to unmarshal JSON data into CertificateOutput + err = json.Unmarshal(data, &dst.CertificateOutput) + if err == nil { + jsonCertificateOutput, _ := json.Marshal(dst.CertificateOutput) + if string(jsonCertificateOutput) == "{}" { // empty struct + dst.CertificateOutput = nil + } else { + return nil // data stored in dst.CertificateOutput, return on the first match + } + } else { + dst.CertificateOutput = nil + } + + // try to unmarshal JSON data into CommandLineOutput + err = json.Unmarshal(data, &dst.CommandLineOutput) + if err == nil { + jsonCommandLineOutput, _ := json.Marshal(dst.CommandLineOutput) + if string(jsonCommandLineOutput) == "{}" { // empty struct + dst.CommandLineOutput = nil + } else { + return nil // data stored in dst.CommandLineOutput, return on the first match + } + } else { + dst.CommandLineOutput = nil + } + + // try to unmarshal JSON data into DockerImageOutput + err = json.Unmarshal(data, &dst.DockerImageOutput) + if err == nil { + jsonDockerImageOutput, _ := json.Marshal(dst.DockerImageOutput) + if string(jsonDockerImageOutput) == "{}" { // empty struct + dst.DockerImageOutput = nil + } else { + return nil // data stored in dst.DockerImageOutput, return on the first match + } + } else { + dst.DockerImageOutput = nil + } + + // try to unmarshal JSON data into EmailOutput + err = json.Unmarshal(data, &dst.EmailOutput) + if err == nil { + jsonEmailOutput, _ := json.Marshal(dst.EmailOutput) + if string(jsonEmailOutput) == "{}" { // empty struct + dst.EmailOutput = nil + } else { + return nil // data stored in dst.EmailOutput, return on the first match + } + } else { + dst.EmailOutput = nil + } + + // try to unmarshal JSON data into FileOutput + err = json.Unmarshal(data, &dst.FileOutput) + if err == nil { + jsonFileOutput, _ := json.Marshal(dst.FileOutput) + if string(jsonFileOutput) == "{}" { // empty struct + dst.FileOutput = nil + } else { + return nil // data stored in dst.FileOutput, return on the first match + } + } else { + dst.FileOutput = nil + } + + // try to unmarshal JSON data into GenericOutput + err = json.Unmarshal(data, &dst.GenericOutput) + if err == nil { + jsonGenericOutput, _ := json.Marshal(dst.GenericOutput) + if string(jsonGenericOutput) == "{}" { // empty struct + dst.GenericOutput = nil + } else { + return nil // data stored in dst.GenericOutput, return on the first match + } + } else { + dst.GenericOutput = nil + } + + // try to unmarshal JSON data into HostnameOutput + err = json.Unmarshal(data, &dst.HostnameOutput) + if err == nil { + jsonHostnameOutput, _ := json.Marshal(dst.HostnameOutput) + if string(jsonHostnameOutput) == "{}" { // empty struct + dst.HostnameOutput = nil + } else { + return nil // data stored in dst.HostnameOutput, return on the first match + } + } else { + dst.HostnameOutput = nil + } + + // try to unmarshal JSON data into IBANOutput + err = json.Unmarshal(data, &dst.IBANOutput) + if err == nil { + jsonIBANOutput, _ := json.Marshal(dst.IBANOutput) + if string(jsonIBANOutput) == "{}" { // empty struct + dst.IBANOutput = nil + } else { + return nil // data stored in dst.IBANOutput, return on the first match + } + } else { + dst.IBANOutput = nil + } + + // try to unmarshal JSON data into IPv4Output + err = json.Unmarshal(data, &dst.IPv4Output) + if err == nil { + jsonIPv4Output, _ := json.Marshal(dst.IPv4Output) + if string(jsonIPv4Output) == "{}" { // empty struct + dst.IPv4Output = nil + } else { + return nil // data stored in dst.IPv4Output, return on the first match + } + } else { + dst.IPv4Output = nil + } + + // try to unmarshal JSON data into IPv6Output + err = json.Unmarshal(data, &dst.IPv6Output) + if err == nil { + jsonIPv6Output, _ := json.Marshal(dst.IPv6Output) + if string(jsonIPv6Output) == "{}" { // empty struct + dst.IPv6Output = nil + } else { + return nil // data stored in dst.IPv6Output, return on the first match + } + } else { + dst.IPv6Output = nil + } + + // try to unmarshal JSON data into ImphashOutput + err = json.Unmarshal(data, &dst.ImphashOutput) + if err == nil { + jsonImphashOutput, _ := json.Marshal(dst.ImphashOutput) + if string(jsonImphashOutput) == "{}" { // empty struct + dst.ImphashOutput = nil + } else { + return nil // data stored in dst.ImphashOutput, return on the first match + } + } else { + dst.ImphashOutput = nil + } + + // try to unmarshal JSON data into JA3Output + err = json.Unmarshal(data, &dst.JA3Output) + if err == nil { + jsonJA3Output, _ := json.Marshal(dst.JA3Output) + if string(jsonJA3Output) == "{}" { // empty struct + dst.JA3Output = nil + } else { + return nil // data stored in dst.JA3Output, return on the first match + } + } else { + dst.JA3Output = nil + } + + // try to unmarshal JSON data into JARMOutput + err = json.Unmarshal(data, &dst.JARMOutput) + if err == nil { + jsonJARMOutput, _ := json.Marshal(dst.JARMOutput) + if string(jsonJARMOutput) == "{}" { // empty struct + dst.JARMOutput = nil + } else { + return nil // data stored in dst.JARMOutput, return on the first match + } + } else { + dst.JARMOutput = nil + } + + // try to unmarshal JSON data into MD5Output + err = json.Unmarshal(data, &dst.MD5Output) + if err == nil { + jsonMD5Output, _ := json.Marshal(dst.MD5Output) + if string(jsonMD5Output) == "{}" { // empty struct + dst.MD5Output = nil + } else { + return nil // data stored in dst.MD5Output, return on the first match + } + } else { + dst.MD5Output = nil + } + + // try to unmarshal JSON data into MacAddressOutput + err = json.Unmarshal(data, &dst.MacAddressOutput) + if err == nil { + jsonMacAddressOutput, _ := json.Marshal(dst.MacAddressOutput) + if string(jsonMacAddressOutput) == "{}" { // empty struct + dst.MacAddressOutput = nil + } else { + return nil // data stored in dst.MacAddressOutput, return on the first match + } + } else { + dst.MacAddressOutput = nil + } + + // try to unmarshal JSON data into MutexOutput + err = json.Unmarshal(data, &dst.MutexOutput) + if err == nil { + jsonMutexOutput, _ := json.Marshal(dst.MutexOutput) + if string(jsonMutexOutput) == "{}" { // empty struct + dst.MutexOutput = nil + } else { + return nil // data stored in dst.MutexOutput, return on the first match + } + } else { + dst.MutexOutput = nil + } + + // try to unmarshal JSON data into NamedPipeOutput + err = json.Unmarshal(data, &dst.NamedPipeOutput) + if err == nil { + jsonNamedPipeOutput, _ := json.Marshal(dst.NamedPipeOutput) + if string(jsonNamedPipeOutput) == "{}" { // empty struct + dst.NamedPipeOutput = nil + } else { + return nil // data stored in dst.NamedPipeOutput, return on the first match + } + } else { + dst.NamedPipeOutput = nil + } + + // try to unmarshal JSON data into PackageOutput + err = json.Unmarshal(data, &dst.PackageOutput) + if err == nil { + jsonPackageOutput, _ := json.Marshal(dst.PackageOutput) + if string(jsonPackageOutput) == "{}" { // empty struct + dst.PackageOutput = nil + } else { + return nil // data stored in dst.PackageOutput, return on the first match + } + } else { + dst.PackageOutput = nil + } + + // try to unmarshal JSON data into PathOutput + err = json.Unmarshal(data, &dst.PathOutput) + if err == nil { + jsonPathOutput, _ := json.Marshal(dst.PathOutput) + if string(jsonPathOutput) == "{}" { // empty struct + dst.PathOutput = nil + } else { + return nil // data stored in dst.PathOutput, return on the first match + } + } else { + dst.PathOutput = nil + } + + // try to unmarshal JSON data into RegistryKeyOutput + err = json.Unmarshal(data, &dst.RegistryKeyOutput) + if err == nil { + jsonRegistryKeyOutput, _ := json.Marshal(dst.RegistryKeyOutput) + if string(jsonRegistryKeyOutput) == "{}" { // empty struct + dst.RegistryKeyOutput = nil + } else { + return nil // data stored in dst.RegistryKeyOutput, return on the first match + } + } else { + dst.RegistryKeyOutput = nil + } + + // try to unmarshal JSON data into SHA1Output + err = json.Unmarshal(data, &dst.SHA1Output) + if err == nil { + jsonSHA1Output, _ := json.Marshal(dst.SHA1Output) + if string(jsonSHA1Output) == "{}" { // empty struct + dst.SHA1Output = nil + } else { + return nil // data stored in dst.SHA1Output, return on the first match + } + } else { + dst.SHA1Output = nil + } + + // try to unmarshal JSON data into SHA256Output + err = json.Unmarshal(data, &dst.SHA256Output) + if err == nil { + jsonSHA256Output, _ := json.Marshal(dst.SHA256Output) + if string(jsonSHA256Output) == "{}" { // empty struct + dst.SHA256Output = nil + } else { + return nil // data stored in dst.SHA256Output, return on the first match + } + } else { + dst.SHA256Output = nil + } + + // try to unmarshal JSON data into SsdeepOutput + err = json.Unmarshal(data, &dst.SsdeepOutput) + if err == nil { + jsonSsdeepOutput, _ := json.Marshal(dst.SsdeepOutput) + if string(jsonSsdeepOutput) == "{}" { // empty struct + dst.SsdeepOutput = nil + } else { + return nil // data stored in dst.SsdeepOutput, return on the first match + } + } else { + dst.SsdeepOutput = nil + } + + // try to unmarshal JSON data into TLSHOutput + err = json.Unmarshal(data, &dst.TLSHOutput) + if err == nil { + jsonTLSHOutput, _ := json.Marshal(dst.TLSHOutput) + if string(jsonTLSHOutput) == "{}" { // empty struct + dst.TLSHOutput = nil + } else { + return nil // data stored in dst.TLSHOutput, return on the first match + } + } else { + dst.TLSHOutput = nil + } + + // try to unmarshal JSON data into UrlOutput + err = json.Unmarshal(data, &dst.UrlOutput) + if err == nil { + jsonUrlOutput, _ := json.Marshal(dst.UrlOutput) + if string(jsonUrlOutput) == "{}" { // empty struct + dst.UrlOutput = nil + } else { + return nil // data stored in dst.UrlOutput, return on the first match + } + } else { + dst.UrlOutput = nil + } + + // try to unmarshal JSON data into UserAccountOutput + err = json.Unmarshal(data, &dst.UserAccountOutput) + if err == nil { + jsonUserAccountOutput, _ := json.Marshal(dst.UserAccountOutput) + if string(jsonUserAccountOutput) == "{}" { // empty struct + dst.UserAccountOutput = nil + } else { + return nil // data stored in dst.UserAccountOutput, return on the first match + } + } else { + dst.UserAccountOutput = nil + } + + // try to unmarshal JSON data into UserAgentOutput + err = json.Unmarshal(data, &dst.UserAgentOutput) + if err == nil { + jsonUserAgentOutput, _ := json.Marshal(dst.UserAgentOutput) + if string(jsonUserAgentOutput) == "{}" { // empty struct + dst.UserAgentOutput = nil + } else { + return nil // data stored in dst.UserAgentOutput, return on the first match + } + } else { + dst.UserAgentOutput = nil + } + + // try to unmarshal JSON data into WalletOutput + err = json.Unmarshal(data, &dst.WalletOutput) + if err == nil { + jsonWalletOutput, _ := json.Marshal(dst.WalletOutput) + if string(jsonWalletOutput) == "{}" { // empty struct + dst.WalletOutput = nil + } else { + return nil // data stored in dst.WalletOutput, return on the first match + } + } else { + dst.WalletOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseDetailsApiV2ObservablesObservableIdGet)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseDetailsApiV2ObservablesObservableIdGet) MarshalJSON() ([]byte, error) { + if src.ASNOutput != nil { + return json.Marshal(&src.ASNOutput) + } + + if src.BICOutput != nil { + return json.Marshal(&src.BICOutput) + } + + if src.CIDROutput != nil { + return json.Marshal(&src.CIDROutput) + } + + if src.CertificateOutput != nil { + return json.Marshal(&src.CertificateOutput) + } + + if src.CommandLineOutput != nil { + return json.Marshal(&src.CommandLineOutput) + } + + if src.DockerImageOutput != nil { + return json.Marshal(&src.DockerImageOutput) + } + + if src.EmailOutput != nil { + return json.Marshal(&src.EmailOutput) + } + + if src.FileOutput != nil { + return json.Marshal(&src.FileOutput) + } + + if src.GenericOutput != nil { + return json.Marshal(&src.GenericOutput) + } + + if src.HostnameOutput != nil { + return json.Marshal(&src.HostnameOutput) + } + + if src.IBANOutput != nil { + return json.Marshal(&src.IBANOutput) + } + + if src.IPv4Output != nil { + return json.Marshal(&src.IPv4Output) + } + + if src.IPv6Output != nil { + return json.Marshal(&src.IPv6Output) + } + + if src.ImphashOutput != nil { + return json.Marshal(&src.ImphashOutput) + } + + if src.JA3Output != nil { + return json.Marshal(&src.JA3Output) + } + + if src.JARMOutput != nil { + return json.Marshal(&src.JARMOutput) + } + + if src.MD5Output != nil { + return json.Marshal(&src.MD5Output) + } + + if src.MacAddressOutput != nil { + return json.Marshal(&src.MacAddressOutput) + } + + if src.MutexOutput != nil { + return json.Marshal(&src.MutexOutput) + } + + if src.NamedPipeOutput != nil { + return json.Marshal(&src.NamedPipeOutput) + } + + if src.PackageOutput != nil { + return json.Marshal(&src.PackageOutput) + } + + if src.PathOutput != nil { + return json.Marshal(&src.PathOutput) + } + + if src.RegistryKeyOutput != nil { + return json.Marshal(&src.RegistryKeyOutput) + } + + if src.SHA1Output != nil { + return json.Marshal(&src.SHA1Output) + } + + if src.SHA256Output != nil { + return json.Marshal(&src.SHA256Output) + } + + if src.SsdeepOutput != nil { + return json.Marshal(&src.SsdeepOutput) + } + + if src.TLSHOutput != nil { + return json.Marshal(&src.TLSHOutput) + } + + if src.UrlOutput != nil { + return json.Marshal(&src.UrlOutput) + } + + if src.UserAccountOutput != nil { + return json.Marshal(&src.UserAccountOutput) + } + + if src.UserAgentOutput != nil { + return json.Marshal(&src.UserAgentOutput) + } + + if src.WalletOutput != nil { + return json.Marshal(&src.WalletOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseDetailsApiV2ObservablesObservableIdGet struct { + value *ResponseDetailsApiV2ObservablesObservableIdGet + isSet bool +} + +func (v NullableResponseDetailsApiV2ObservablesObservableIdGet) Get() *ResponseDetailsApiV2ObservablesObservableIdGet { + return v.value +} + +func (v *NullableResponseDetailsApiV2ObservablesObservableIdGet) Set(val *ResponseDetailsApiV2ObservablesObservableIdGet) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDetailsApiV2ObservablesObservableIdGet) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDetailsApiV2ObservablesObservableIdGet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDetailsApiV2ObservablesObservableIdGet(val *ResponseDetailsApiV2ObservablesObservableIdGet) *NullableResponseDetailsApiV2ObservablesObservableIdGet { + return &NullableResponseDetailsApiV2ObservablesObservableIdGet{value: val, isSet: true} +} + +func (v NullableResponseDetailsApiV2ObservablesObservableIdGet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDetailsApiV2ObservablesObservableIdGet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_new_api_v2_entities__post.go b/model_response_new_api_v2_entities__post.go new file mode 100644 index 0000000..da85236 --- /dev/null +++ b/model_response_new_api_v2_entities__post.go @@ -0,0 +1,301 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseNewApiV2EntitiesPost struct for ResponseNewApiV2EntitiesPost +type ResponseNewApiV2EntitiesPost struct { + AttackPatternOutput *AttackPatternOutput + CampaignOutput *CampaignOutput + CompanyOutput *CompanyOutput + CourseOfActionOutput *CourseOfActionOutput + IdentityOutput *IdentityOutput + IntrusionSetOutput *IntrusionSetOutput + InvestigationOutput *InvestigationOutput + MalwareOutput *MalwareOutput + NoteOutput *NoteOutput + PhoneOutput *PhoneOutput + ThreatActorOutput *ThreatActorOutput + ToolOutput *ToolOutput + VulnerabilityOutput *VulnerabilityOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseNewApiV2EntitiesPost) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AttackPatternOutput + err = json.Unmarshal(data, &dst.AttackPatternOutput) + if err == nil { + jsonAttackPatternOutput, _ := json.Marshal(dst.AttackPatternOutput) + if string(jsonAttackPatternOutput) == "{}" { // empty struct + dst.AttackPatternOutput = nil + } else { + return nil // data stored in dst.AttackPatternOutput, return on the first match + } + } else { + dst.AttackPatternOutput = nil + } + + // try to unmarshal JSON data into CampaignOutput + err = json.Unmarshal(data, &dst.CampaignOutput) + if err == nil { + jsonCampaignOutput, _ := json.Marshal(dst.CampaignOutput) + if string(jsonCampaignOutput) == "{}" { // empty struct + dst.CampaignOutput = nil + } else { + return nil // data stored in dst.CampaignOutput, return on the first match + } + } else { + dst.CampaignOutput = nil + } + + // try to unmarshal JSON data into CompanyOutput + err = json.Unmarshal(data, &dst.CompanyOutput) + if err == nil { + jsonCompanyOutput, _ := json.Marshal(dst.CompanyOutput) + if string(jsonCompanyOutput) == "{}" { // empty struct + dst.CompanyOutput = nil + } else { + return nil // data stored in dst.CompanyOutput, return on the first match + } + } else { + dst.CompanyOutput = nil + } + + // try to unmarshal JSON data into CourseOfActionOutput + err = json.Unmarshal(data, &dst.CourseOfActionOutput) + if err == nil { + jsonCourseOfActionOutput, _ := json.Marshal(dst.CourseOfActionOutput) + if string(jsonCourseOfActionOutput) == "{}" { // empty struct + dst.CourseOfActionOutput = nil + } else { + return nil // data stored in dst.CourseOfActionOutput, return on the first match + } + } else { + dst.CourseOfActionOutput = nil + } + + // try to unmarshal JSON data into IdentityOutput + err = json.Unmarshal(data, &dst.IdentityOutput) + if err == nil { + jsonIdentityOutput, _ := json.Marshal(dst.IdentityOutput) + if string(jsonIdentityOutput) == "{}" { // empty struct + dst.IdentityOutput = nil + } else { + return nil // data stored in dst.IdentityOutput, return on the first match + } + } else { + dst.IdentityOutput = nil + } + + // try to unmarshal JSON data into IntrusionSetOutput + err = json.Unmarshal(data, &dst.IntrusionSetOutput) + if err == nil { + jsonIntrusionSetOutput, _ := json.Marshal(dst.IntrusionSetOutput) + if string(jsonIntrusionSetOutput) == "{}" { // empty struct + dst.IntrusionSetOutput = nil + } else { + return nil // data stored in dst.IntrusionSetOutput, return on the first match + } + } else { + dst.IntrusionSetOutput = nil + } + + // try to unmarshal JSON data into InvestigationOutput + err = json.Unmarshal(data, &dst.InvestigationOutput) + if err == nil { + jsonInvestigationOutput, _ := json.Marshal(dst.InvestigationOutput) + if string(jsonInvestigationOutput) == "{}" { // empty struct + dst.InvestigationOutput = nil + } else { + return nil // data stored in dst.InvestigationOutput, return on the first match + } + } else { + dst.InvestigationOutput = nil + } + + // try to unmarshal JSON data into MalwareOutput + err = json.Unmarshal(data, &dst.MalwareOutput) + if err == nil { + jsonMalwareOutput, _ := json.Marshal(dst.MalwareOutput) + if string(jsonMalwareOutput) == "{}" { // empty struct + dst.MalwareOutput = nil + } else { + return nil // data stored in dst.MalwareOutput, return on the first match + } + } else { + dst.MalwareOutput = nil + } + + // try to unmarshal JSON data into NoteOutput + err = json.Unmarshal(data, &dst.NoteOutput) + if err == nil { + jsonNoteOutput, _ := json.Marshal(dst.NoteOutput) + if string(jsonNoteOutput) == "{}" { // empty struct + dst.NoteOutput = nil + } else { + return nil // data stored in dst.NoteOutput, return on the first match + } + } else { + dst.NoteOutput = nil + } + + // try to unmarshal JSON data into PhoneOutput + err = json.Unmarshal(data, &dst.PhoneOutput) + if err == nil { + jsonPhoneOutput, _ := json.Marshal(dst.PhoneOutput) + if string(jsonPhoneOutput) == "{}" { // empty struct + dst.PhoneOutput = nil + } else { + return nil // data stored in dst.PhoneOutput, return on the first match + } + } else { + dst.PhoneOutput = nil + } + + // try to unmarshal JSON data into ThreatActorOutput + err = json.Unmarshal(data, &dst.ThreatActorOutput) + if err == nil { + jsonThreatActorOutput, _ := json.Marshal(dst.ThreatActorOutput) + if string(jsonThreatActorOutput) == "{}" { // empty struct + dst.ThreatActorOutput = nil + } else { + return nil // data stored in dst.ThreatActorOutput, return on the first match + } + } else { + dst.ThreatActorOutput = nil + } + + // try to unmarshal JSON data into ToolOutput + err = json.Unmarshal(data, &dst.ToolOutput) + if err == nil { + jsonToolOutput, _ := json.Marshal(dst.ToolOutput) + if string(jsonToolOutput) == "{}" { // empty struct + dst.ToolOutput = nil + } else { + return nil // data stored in dst.ToolOutput, return on the first match + } + } else { + dst.ToolOutput = nil + } + + // try to unmarshal JSON data into VulnerabilityOutput + err = json.Unmarshal(data, &dst.VulnerabilityOutput) + if err == nil { + jsonVulnerabilityOutput, _ := json.Marshal(dst.VulnerabilityOutput) + if string(jsonVulnerabilityOutput) == "{}" { // empty struct + dst.VulnerabilityOutput = nil + } else { + return nil // data stored in dst.VulnerabilityOutput, return on the first match + } + } else { + dst.VulnerabilityOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseNewApiV2EntitiesPost)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseNewApiV2EntitiesPost) MarshalJSON() ([]byte, error) { + if src.AttackPatternOutput != nil { + return json.Marshal(&src.AttackPatternOutput) + } + + if src.CampaignOutput != nil { + return json.Marshal(&src.CampaignOutput) + } + + if src.CompanyOutput != nil { + return json.Marshal(&src.CompanyOutput) + } + + if src.CourseOfActionOutput != nil { + return json.Marshal(&src.CourseOfActionOutput) + } + + if src.IdentityOutput != nil { + return json.Marshal(&src.IdentityOutput) + } + + if src.IntrusionSetOutput != nil { + return json.Marshal(&src.IntrusionSetOutput) + } + + if src.InvestigationOutput != nil { + return json.Marshal(&src.InvestigationOutput) + } + + if src.MalwareOutput != nil { + return json.Marshal(&src.MalwareOutput) + } + + if src.NoteOutput != nil { + return json.Marshal(&src.NoteOutput) + } + + if src.PhoneOutput != nil { + return json.Marshal(&src.PhoneOutput) + } + + if src.ThreatActorOutput != nil { + return json.Marshal(&src.ThreatActorOutput) + } + + if src.ToolOutput != nil { + return json.Marshal(&src.ToolOutput) + } + + if src.VulnerabilityOutput != nil { + return json.Marshal(&src.VulnerabilityOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseNewApiV2EntitiesPost struct { + value *ResponseNewApiV2EntitiesPost + isSet bool +} + +func (v NullableResponseNewApiV2EntitiesPost) Get() *ResponseNewApiV2EntitiesPost { + return v.value +} + +func (v *NullableResponseNewApiV2EntitiesPost) Set(val *ResponseNewApiV2EntitiesPost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseNewApiV2EntitiesPost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseNewApiV2EntitiesPost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseNewApiV2EntitiesPost(val *ResponseNewApiV2EntitiesPost) *NullableResponseNewApiV2EntitiesPost { + return &NullableResponseNewApiV2EntitiesPost{value: val, isSet: true} +} + +func (v NullableResponseNewApiV2EntitiesPost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseNewApiV2EntitiesPost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_new_api_v2_indicators__post.go b/model_response_new_api_v2_indicators__post.go new file mode 100644 index 0000000..266da4e --- /dev/null +++ b/model_response_new_api_v2_indicators__post.go @@ -0,0 +1,175 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseNewApiV2IndicatorsPost struct for ResponseNewApiV2IndicatorsPost +type ResponseNewApiV2IndicatorsPost struct { + ForensicArtifactOutput *ForensicArtifactOutput + QueryOutput *QueryOutput + RegexOutput *RegexOutput + SigmaOutput *SigmaOutput + SuricataOutput *SuricataOutput + YaraOutput *YaraOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseNewApiV2IndicatorsPost) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ForensicArtifactOutput + err = json.Unmarshal(data, &dst.ForensicArtifactOutput) + if err == nil { + jsonForensicArtifactOutput, _ := json.Marshal(dst.ForensicArtifactOutput) + if string(jsonForensicArtifactOutput) == "{}" { // empty struct + dst.ForensicArtifactOutput = nil + } else { + return nil // data stored in dst.ForensicArtifactOutput, return on the first match + } + } else { + dst.ForensicArtifactOutput = nil + } + + // try to unmarshal JSON data into QueryOutput + err = json.Unmarshal(data, &dst.QueryOutput) + if err == nil { + jsonQueryOutput, _ := json.Marshal(dst.QueryOutput) + if string(jsonQueryOutput) == "{}" { // empty struct + dst.QueryOutput = nil + } else { + return nil // data stored in dst.QueryOutput, return on the first match + } + } else { + dst.QueryOutput = nil + } + + // try to unmarshal JSON data into RegexOutput + err = json.Unmarshal(data, &dst.RegexOutput) + if err == nil { + jsonRegexOutput, _ := json.Marshal(dst.RegexOutput) + if string(jsonRegexOutput) == "{}" { // empty struct + dst.RegexOutput = nil + } else { + return nil // data stored in dst.RegexOutput, return on the first match + } + } else { + dst.RegexOutput = nil + } + + // try to unmarshal JSON data into SigmaOutput + err = json.Unmarshal(data, &dst.SigmaOutput) + if err == nil { + jsonSigmaOutput, _ := json.Marshal(dst.SigmaOutput) + if string(jsonSigmaOutput) == "{}" { // empty struct + dst.SigmaOutput = nil + } else { + return nil // data stored in dst.SigmaOutput, return on the first match + } + } else { + dst.SigmaOutput = nil + } + + // try to unmarshal JSON data into SuricataOutput + err = json.Unmarshal(data, &dst.SuricataOutput) + if err == nil { + jsonSuricataOutput, _ := json.Marshal(dst.SuricataOutput) + if string(jsonSuricataOutput) == "{}" { // empty struct + dst.SuricataOutput = nil + } else { + return nil // data stored in dst.SuricataOutput, return on the first match + } + } else { + dst.SuricataOutput = nil + } + + // try to unmarshal JSON data into YaraOutput + err = json.Unmarshal(data, &dst.YaraOutput) + if err == nil { + jsonYaraOutput, _ := json.Marshal(dst.YaraOutput) + if string(jsonYaraOutput) == "{}" { // empty struct + dst.YaraOutput = nil + } else { + return nil // data stored in dst.YaraOutput, return on the first match + } + } else { + dst.YaraOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseNewApiV2IndicatorsPost)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseNewApiV2IndicatorsPost) MarshalJSON() ([]byte, error) { + if src.ForensicArtifactOutput != nil { + return json.Marshal(&src.ForensicArtifactOutput) + } + + if src.QueryOutput != nil { + return json.Marshal(&src.QueryOutput) + } + + if src.RegexOutput != nil { + return json.Marshal(&src.RegexOutput) + } + + if src.SigmaOutput != nil { + return json.Marshal(&src.SigmaOutput) + } + + if src.SuricataOutput != nil { + return json.Marshal(&src.SuricataOutput) + } + + if src.YaraOutput != nil { + return json.Marshal(&src.YaraOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseNewApiV2IndicatorsPost struct { + value *ResponseNewApiV2IndicatorsPost + isSet bool +} + +func (v NullableResponseNewApiV2IndicatorsPost) Get() *ResponseNewApiV2IndicatorsPost { + return v.value +} + +func (v *NullableResponseNewApiV2IndicatorsPost) Set(val *ResponseNewApiV2IndicatorsPost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseNewApiV2IndicatorsPost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseNewApiV2IndicatorsPost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseNewApiV2IndicatorsPost(val *ResponseNewApiV2IndicatorsPost) *NullableResponseNewApiV2IndicatorsPost { + return &NullableResponseNewApiV2IndicatorsPost{value: val, isSet: true} +} + +func (v NullableResponseNewApiV2IndicatorsPost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseNewApiV2IndicatorsPost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_new_api_v2_observables__post.go b/model_response_new_api_v2_observables__post.go new file mode 100644 index 0000000..53f5ade --- /dev/null +++ b/model_response_new_api_v2_observables__post.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseNewApiV2ObservablesPost struct for ResponseNewApiV2ObservablesPost +type ResponseNewApiV2ObservablesPost struct { + ASNOutput *ASNOutput + BICOutput *BICOutput + CIDROutput *CIDROutput + CertificateOutput *CertificateOutput + CommandLineOutput *CommandLineOutput + DockerImageOutput *DockerImageOutput + EmailOutput *EmailOutput + FileOutput *FileOutput + GenericOutput *GenericOutput + HostnameOutput *HostnameOutput + IBANOutput *IBANOutput + IPv4Output *IPv4Output + IPv6Output *IPv6Output + ImphashOutput *ImphashOutput + JA3Output *JA3Output + JARMOutput *JARMOutput + MD5Output *MD5Output + MacAddressOutput *MacAddressOutput + MutexOutput *MutexOutput + NamedPipeOutput *NamedPipeOutput + PackageOutput *PackageOutput + PathOutput *PathOutput + RegistryKeyOutput *RegistryKeyOutput + SHA1Output *SHA1Output + SHA256Output *SHA256Output + SsdeepOutput *SsdeepOutput + TLSHOutput *TLSHOutput + UrlOutput *UrlOutput + UserAccountOutput *UserAccountOutput + UserAgentOutput *UserAgentOutput + WalletOutput *WalletOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseNewApiV2ObservablesPost) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNOutput + err = json.Unmarshal(data, &dst.ASNOutput) + if err == nil { + jsonASNOutput, _ := json.Marshal(dst.ASNOutput) + if string(jsonASNOutput) == "{}" { // empty struct + dst.ASNOutput = nil + } else { + return nil // data stored in dst.ASNOutput, return on the first match + } + } else { + dst.ASNOutput = nil + } + + // try to unmarshal JSON data into BICOutput + err = json.Unmarshal(data, &dst.BICOutput) + if err == nil { + jsonBICOutput, _ := json.Marshal(dst.BICOutput) + if string(jsonBICOutput) == "{}" { // empty struct + dst.BICOutput = nil + } else { + return nil // data stored in dst.BICOutput, return on the first match + } + } else { + dst.BICOutput = nil + } + + // try to unmarshal JSON data into CIDROutput + err = json.Unmarshal(data, &dst.CIDROutput) + if err == nil { + jsonCIDROutput, _ := json.Marshal(dst.CIDROutput) + if string(jsonCIDROutput) == "{}" { // empty struct + dst.CIDROutput = nil + } else { + return nil // data stored in dst.CIDROutput, return on the first match + } + } else { + dst.CIDROutput = nil + } + + // try to unmarshal JSON data into CertificateOutput + err = json.Unmarshal(data, &dst.CertificateOutput) + if err == nil { + jsonCertificateOutput, _ := json.Marshal(dst.CertificateOutput) + if string(jsonCertificateOutput) == "{}" { // empty struct + dst.CertificateOutput = nil + } else { + return nil // data stored in dst.CertificateOutput, return on the first match + } + } else { + dst.CertificateOutput = nil + } + + // try to unmarshal JSON data into CommandLineOutput + err = json.Unmarshal(data, &dst.CommandLineOutput) + if err == nil { + jsonCommandLineOutput, _ := json.Marshal(dst.CommandLineOutput) + if string(jsonCommandLineOutput) == "{}" { // empty struct + dst.CommandLineOutput = nil + } else { + return nil // data stored in dst.CommandLineOutput, return on the first match + } + } else { + dst.CommandLineOutput = nil + } + + // try to unmarshal JSON data into DockerImageOutput + err = json.Unmarshal(data, &dst.DockerImageOutput) + if err == nil { + jsonDockerImageOutput, _ := json.Marshal(dst.DockerImageOutput) + if string(jsonDockerImageOutput) == "{}" { // empty struct + dst.DockerImageOutput = nil + } else { + return nil // data stored in dst.DockerImageOutput, return on the first match + } + } else { + dst.DockerImageOutput = nil + } + + // try to unmarshal JSON data into EmailOutput + err = json.Unmarshal(data, &dst.EmailOutput) + if err == nil { + jsonEmailOutput, _ := json.Marshal(dst.EmailOutput) + if string(jsonEmailOutput) == "{}" { // empty struct + dst.EmailOutput = nil + } else { + return nil // data stored in dst.EmailOutput, return on the first match + } + } else { + dst.EmailOutput = nil + } + + // try to unmarshal JSON data into FileOutput + err = json.Unmarshal(data, &dst.FileOutput) + if err == nil { + jsonFileOutput, _ := json.Marshal(dst.FileOutput) + if string(jsonFileOutput) == "{}" { // empty struct + dst.FileOutput = nil + } else { + return nil // data stored in dst.FileOutput, return on the first match + } + } else { + dst.FileOutput = nil + } + + // try to unmarshal JSON data into GenericOutput + err = json.Unmarshal(data, &dst.GenericOutput) + if err == nil { + jsonGenericOutput, _ := json.Marshal(dst.GenericOutput) + if string(jsonGenericOutput) == "{}" { // empty struct + dst.GenericOutput = nil + } else { + return nil // data stored in dst.GenericOutput, return on the first match + } + } else { + dst.GenericOutput = nil + } + + // try to unmarshal JSON data into HostnameOutput + err = json.Unmarshal(data, &dst.HostnameOutput) + if err == nil { + jsonHostnameOutput, _ := json.Marshal(dst.HostnameOutput) + if string(jsonHostnameOutput) == "{}" { // empty struct + dst.HostnameOutput = nil + } else { + return nil // data stored in dst.HostnameOutput, return on the first match + } + } else { + dst.HostnameOutput = nil + } + + // try to unmarshal JSON data into IBANOutput + err = json.Unmarshal(data, &dst.IBANOutput) + if err == nil { + jsonIBANOutput, _ := json.Marshal(dst.IBANOutput) + if string(jsonIBANOutput) == "{}" { // empty struct + dst.IBANOutput = nil + } else { + return nil // data stored in dst.IBANOutput, return on the first match + } + } else { + dst.IBANOutput = nil + } + + // try to unmarshal JSON data into IPv4Output + err = json.Unmarshal(data, &dst.IPv4Output) + if err == nil { + jsonIPv4Output, _ := json.Marshal(dst.IPv4Output) + if string(jsonIPv4Output) == "{}" { // empty struct + dst.IPv4Output = nil + } else { + return nil // data stored in dst.IPv4Output, return on the first match + } + } else { + dst.IPv4Output = nil + } + + // try to unmarshal JSON data into IPv6Output + err = json.Unmarshal(data, &dst.IPv6Output) + if err == nil { + jsonIPv6Output, _ := json.Marshal(dst.IPv6Output) + if string(jsonIPv6Output) == "{}" { // empty struct + dst.IPv6Output = nil + } else { + return nil // data stored in dst.IPv6Output, return on the first match + } + } else { + dst.IPv6Output = nil + } + + // try to unmarshal JSON data into ImphashOutput + err = json.Unmarshal(data, &dst.ImphashOutput) + if err == nil { + jsonImphashOutput, _ := json.Marshal(dst.ImphashOutput) + if string(jsonImphashOutput) == "{}" { // empty struct + dst.ImphashOutput = nil + } else { + return nil // data stored in dst.ImphashOutput, return on the first match + } + } else { + dst.ImphashOutput = nil + } + + // try to unmarshal JSON data into JA3Output + err = json.Unmarshal(data, &dst.JA3Output) + if err == nil { + jsonJA3Output, _ := json.Marshal(dst.JA3Output) + if string(jsonJA3Output) == "{}" { // empty struct + dst.JA3Output = nil + } else { + return nil // data stored in dst.JA3Output, return on the first match + } + } else { + dst.JA3Output = nil + } + + // try to unmarshal JSON data into JARMOutput + err = json.Unmarshal(data, &dst.JARMOutput) + if err == nil { + jsonJARMOutput, _ := json.Marshal(dst.JARMOutput) + if string(jsonJARMOutput) == "{}" { // empty struct + dst.JARMOutput = nil + } else { + return nil // data stored in dst.JARMOutput, return on the first match + } + } else { + dst.JARMOutput = nil + } + + // try to unmarshal JSON data into MD5Output + err = json.Unmarshal(data, &dst.MD5Output) + if err == nil { + jsonMD5Output, _ := json.Marshal(dst.MD5Output) + if string(jsonMD5Output) == "{}" { // empty struct + dst.MD5Output = nil + } else { + return nil // data stored in dst.MD5Output, return on the first match + } + } else { + dst.MD5Output = nil + } + + // try to unmarshal JSON data into MacAddressOutput + err = json.Unmarshal(data, &dst.MacAddressOutput) + if err == nil { + jsonMacAddressOutput, _ := json.Marshal(dst.MacAddressOutput) + if string(jsonMacAddressOutput) == "{}" { // empty struct + dst.MacAddressOutput = nil + } else { + return nil // data stored in dst.MacAddressOutput, return on the first match + } + } else { + dst.MacAddressOutput = nil + } + + // try to unmarshal JSON data into MutexOutput + err = json.Unmarshal(data, &dst.MutexOutput) + if err == nil { + jsonMutexOutput, _ := json.Marshal(dst.MutexOutput) + if string(jsonMutexOutput) == "{}" { // empty struct + dst.MutexOutput = nil + } else { + return nil // data stored in dst.MutexOutput, return on the first match + } + } else { + dst.MutexOutput = nil + } + + // try to unmarshal JSON data into NamedPipeOutput + err = json.Unmarshal(data, &dst.NamedPipeOutput) + if err == nil { + jsonNamedPipeOutput, _ := json.Marshal(dst.NamedPipeOutput) + if string(jsonNamedPipeOutput) == "{}" { // empty struct + dst.NamedPipeOutput = nil + } else { + return nil // data stored in dst.NamedPipeOutput, return on the first match + } + } else { + dst.NamedPipeOutput = nil + } + + // try to unmarshal JSON data into PackageOutput + err = json.Unmarshal(data, &dst.PackageOutput) + if err == nil { + jsonPackageOutput, _ := json.Marshal(dst.PackageOutput) + if string(jsonPackageOutput) == "{}" { // empty struct + dst.PackageOutput = nil + } else { + return nil // data stored in dst.PackageOutput, return on the first match + } + } else { + dst.PackageOutput = nil + } + + // try to unmarshal JSON data into PathOutput + err = json.Unmarshal(data, &dst.PathOutput) + if err == nil { + jsonPathOutput, _ := json.Marshal(dst.PathOutput) + if string(jsonPathOutput) == "{}" { // empty struct + dst.PathOutput = nil + } else { + return nil // data stored in dst.PathOutput, return on the first match + } + } else { + dst.PathOutput = nil + } + + // try to unmarshal JSON data into RegistryKeyOutput + err = json.Unmarshal(data, &dst.RegistryKeyOutput) + if err == nil { + jsonRegistryKeyOutput, _ := json.Marshal(dst.RegistryKeyOutput) + if string(jsonRegistryKeyOutput) == "{}" { // empty struct + dst.RegistryKeyOutput = nil + } else { + return nil // data stored in dst.RegistryKeyOutput, return on the first match + } + } else { + dst.RegistryKeyOutput = nil + } + + // try to unmarshal JSON data into SHA1Output + err = json.Unmarshal(data, &dst.SHA1Output) + if err == nil { + jsonSHA1Output, _ := json.Marshal(dst.SHA1Output) + if string(jsonSHA1Output) == "{}" { // empty struct + dst.SHA1Output = nil + } else { + return nil // data stored in dst.SHA1Output, return on the first match + } + } else { + dst.SHA1Output = nil + } + + // try to unmarshal JSON data into SHA256Output + err = json.Unmarshal(data, &dst.SHA256Output) + if err == nil { + jsonSHA256Output, _ := json.Marshal(dst.SHA256Output) + if string(jsonSHA256Output) == "{}" { // empty struct + dst.SHA256Output = nil + } else { + return nil // data stored in dst.SHA256Output, return on the first match + } + } else { + dst.SHA256Output = nil + } + + // try to unmarshal JSON data into SsdeepOutput + err = json.Unmarshal(data, &dst.SsdeepOutput) + if err == nil { + jsonSsdeepOutput, _ := json.Marshal(dst.SsdeepOutput) + if string(jsonSsdeepOutput) == "{}" { // empty struct + dst.SsdeepOutput = nil + } else { + return nil // data stored in dst.SsdeepOutput, return on the first match + } + } else { + dst.SsdeepOutput = nil + } + + // try to unmarshal JSON data into TLSHOutput + err = json.Unmarshal(data, &dst.TLSHOutput) + if err == nil { + jsonTLSHOutput, _ := json.Marshal(dst.TLSHOutput) + if string(jsonTLSHOutput) == "{}" { // empty struct + dst.TLSHOutput = nil + } else { + return nil // data stored in dst.TLSHOutput, return on the first match + } + } else { + dst.TLSHOutput = nil + } + + // try to unmarshal JSON data into UrlOutput + err = json.Unmarshal(data, &dst.UrlOutput) + if err == nil { + jsonUrlOutput, _ := json.Marshal(dst.UrlOutput) + if string(jsonUrlOutput) == "{}" { // empty struct + dst.UrlOutput = nil + } else { + return nil // data stored in dst.UrlOutput, return on the first match + } + } else { + dst.UrlOutput = nil + } + + // try to unmarshal JSON data into UserAccountOutput + err = json.Unmarshal(data, &dst.UserAccountOutput) + if err == nil { + jsonUserAccountOutput, _ := json.Marshal(dst.UserAccountOutput) + if string(jsonUserAccountOutput) == "{}" { // empty struct + dst.UserAccountOutput = nil + } else { + return nil // data stored in dst.UserAccountOutput, return on the first match + } + } else { + dst.UserAccountOutput = nil + } + + // try to unmarshal JSON data into UserAgentOutput + err = json.Unmarshal(data, &dst.UserAgentOutput) + if err == nil { + jsonUserAgentOutput, _ := json.Marshal(dst.UserAgentOutput) + if string(jsonUserAgentOutput) == "{}" { // empty struct + dst.UserAgentOutput = nil + } else { + return nil // data stored in dst.UserAgentOutput, return on the first match + } + } else { + dst.UserAgentOutput = nil + } + + // try to unmarshal JSON data into WalletOutput + err = json.Unmarshal(data, &dst.WalletOutput) + if err == nil { + jsonWalletOutput, _ := json.Marshal(dst.WalletOutput) + if string(jsonWalletOutput) == "{}" { // empty struct + dst.WalletOutput = nil + } else { + return nil // data stored in dst.WalletOutput, return on the first match + } + } else { + dst.WalletOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseNewApiV2ObservablesPost)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseNewApiV2ObservablesPost) MarshalJSON() ([]byte, error) { + if src.ASNOutput != nil { + return json.Marshal(&src.ASNOutput) + } + + if src.BICOutput != nil { + return json.Marshal(&src.BICOutput) + } + + if src.CIDROutput != nil { + return json.Marshal(&src.CIDROutput) + } + + if src.CertificateOutput != nil { + return json.Marshal(&src.CertificateOutput) + } + + if src.CommandLineOutput != nil { + return json.Marshal(&src.CommandLineOutput) + } + + if src.DockerImageOutput != nil { + return json.Marshal(&src.DockerImageOutput) + } + + if src.EmailOutput != nil { + return json.Marshal(&src.EmailOutput) + } + + if src.FileOutput != nil { + return json.Marshal(&src.FileOutput) + } + + if src.GenericOutput != nil { + return json.Marshal(&src.GenericOutput) + } + + if src.HostnameOutput != nil { + return json.Marshal(&src.HostnameOutput) + } + + if src.IBANOutput != nil { + return json.Marshal(&src.IBANOutput) + } + + if src.IPv4Output != nil { + return json.Marshal(&src.IPv4Output) + } + + if src.IPv6Output != nil { + return json.Marshal(&src.IPv6Output) + } + + if src.ImphashOutput != nil { + return json.Marshal(&src.ImphashOutput) + } + + if src.JA3Output != nil { + return json.Marshal(&src.JA3Output) + } + + if src.JARMOutput != nil { + return json.Marshal(&src.JARMOutput) + } + + if src.MD5Output != nil { + return json.Marshal(&src.MD5Output) + } + + if src.MacAddressOutput != nil { + return json.Marshal(&src.MacAddressOutput) + } + + if src.MutexOutput != nil { + return json.Marshal(&src.MutexOutput) + } + + if src.NamedPipeOutput != nil { + return json.Marshal(&src.NamedPipeOutput) + } + + if src.PackageOutput != nil { + return json.Marshal(&src.PackageOutput) + } + + if src.PathOutput != nil { + return json.Marshal(&src.PathOutput) + } + + if src.RegistryKeyOutput != nil { + return json.Marshal(&src.RegistryKeyOutput) + } + + if src.SHA1Output != nil { + return json.Marshal(&src.SHA1Output) + } + + if src.SHA256Output != nil { + return json.Marshal(&src.SHA256Output) + } + + if src.SsdeepOutput != nil { + return json.Marshal(&src.SsdeepOutput) + } + + if src.TLSHOutput != nil { + return json.Marshal(&src.TLSHOutput) + } + + if src.UrlOutput != nil { + return json.Marshal(&src.UrlOutput) + } + + if src.UserAccountOutput != nil { + return json.Marshal(&src.UserAccountOutput) + } + + if src.UserAgentOutput != nil { + return json.Marshal(&src.UserAgentOutput) + } + + if src.WalletOutput != nil { + return json.Marshal(&src.WalletOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseNewApiV2ObservablesPost struct { + value *ResponseNewApiV2ObservablesPost + isSet bool +} + +func (v NullableResponseNewApiV2ObservablesPost) Get() *ResponseNewApiV2ObservablesPost { + return v.value +} + +func (v *NullableResponseNewApiV2ObservablesPost) Set(val *ResponseNewApiV2ObservablesPost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseNewApiV2ObservablesPost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseNewApiV2ObservablesPost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseNewApiV2ObservablesPost(val *ResponseNewApiV2ObservablesPost) *NullableResponseNewApiV2ObservablesPost { + return &NullableResponseNewApiV2ObservablesPost{value: val, isSet: true} +} + +func (v NullableResponseNewApiV2ObservablesPost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseNewApiV2ObservablesPost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_new_extended_api_v2_observables_extended_post.go b/model_response_new_extended_api_v2_observables_extended_post.go new file mode 100644 index 0000000..9220f98 --- /dev/null +++ b/model_response_new_extended_api_v2_observables_extended_post.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseNewExtendedApiV2ObservablesExtendedPost struct for ResponseNewExtendedApiV2ObservablesExtendedPost +type ResponseNewExtendedApiV2ObservablesExtendedPost struct { + ASNOutput *ASNOutput + BICOutput *BICOutput + CIDROutput *CIDROutput + CertificateOutput *CertificateOutput + CommandLineOutput *CommandLineOutput + DockerImageOutput *DockerImageOutput + EmailOutput *EmailOutput + FileOutput *FileOutput + GenericOutput *GenericOutput + HostnameOutput *HostnameOutput + IBANOutput *IBANOutput + IPv4Output *IPv4Output + IPv6Output *IPv6Output + ImphashOutput *ImphashOutput + JA3Output *JA3Output + JARMOutput *JARMOutput + MD5Output *MD5Output + MacAddressOutput *MacAddressOutput + MutexOutput *MutexOutput + NamedPipeOutput *NamedPipeOutput + PackageOutput *PackageOutput + PathOutput *PathOutput + RegistryKeyOutput *RegistryKeyOutput + SHA1Output *SHA1Output + SHA256Output *SHA256Output + SsdeepOutput *SsdeepOutput + TLSHOutput *TLSHOutput + UrlOutput *UrlOutput + UserAccountOutput *UserAccountOutput + UserAgentOutput *UserAgentOutput + WalletOutput *WalletOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseNewExtendedApiV2ObservablesExtendedPost) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNOutput + err = json.Unmarshal(data, &dst.ASNOutput) + if err == nil { + jsonASNOutput, _ := json.Marshal(dst.ASNOutput) + if string(jsonASNOutput) == "{}" { // empty struct + dst.ASNOutput = nil + } else { + return nil // data stored in dst.ASNOutput, return on the first match + } + } else { + dst.ASNOutput = nil + } + + // try to unmarshal JSON data into BICOutput + err = json.Unmarshal(data, &dst.BICOutput) + if err == nil { + jsonBICOutput, _ := json.Marshal(dst.BICOutput) + if string(jsonBICOutput) == "{}" { // empty struct + dst.BICOutput = nil + } else { + return nil // data stored in dst.BICOutput, return on the first match + } + } else { + dst.BICOutput = nil + } + + // try to unmarshal JSON data into CIDROutput + err = json.Unmarshal(data, &dst.CIDROutput) + if err == nil { + jsonCIDROutput, _ := json.Marshal(dst.CIDROutput) + if string(jsonCIDROutput) == "{}" { // empty struct + dst.CIDROutput = nil + } else { + return nil // data stored in dst.CIDROutput, return on the first match + } + } else { + dst.CIDROutput = nil + } + + // try to unmarshal JSON data into CertificateOutput + err = json.Unmarshal(data, &dst.CertificateOutput) + if err == nil { + jsonCertificateOutput, _ := json.Marshal(dst.CertificateOutput) + if string(jsonCertificateOutput) == "{}" { // empty struct + dst.CertificateOutput = nil + } else { + return nil // data stored in dst.CertificateOutput, return on the first match + } + } else { + dst.CertificateOutput = nil + } + + // try to unmarshal JSON data into CommandLineOutput + err = json.Unmarshal(data, &dst.CommandLineOutput) + if err == nil { + jsonCommandLineOutput, _ := json.Marshal(dst.CommandLineOutput) + if string(jsonCommandLineOutput) == "{}" { // empty struct + dst.CommandLineOutput = nil + } else { + return nil // data stored in dst.CommandLineOutput, return on the first match + } + } else { + dst.CommandLineOutput = nil + } + + // try to unmarshal JSON data into DockerImageOutput + err = json.Unmarshal(data, &dst.DockerImageOutput) + if err == nil { + jsonDockerImageOutput, _ := json.Marshal(dst.DockerImageOutput) + if string(jsonDockerImageOutput) == "{}" { // empty struct + dst.DockerImageOutput = nil + } else { + return nil // data stored in dst.DockerImageOutput, return on the first match + } + } else { + dst.DockerImageOutput = nil + } + + // try to unmarshal JSON data into EmailOutput + err = json.Unmarshal(data, &dst.EmailOutput) + if err == nil { + jsonEmailOutput, _ := json.Marshal(dst.EmailOutput) + if string(jsonEmailOutput) == "{}" { // empty struct + dst.EmailOutput = nil + } else { + return nil // data stored in dst.EmailOutput, return on the first match + } + } else { + dst.EmailOutput = nil + } + + // try to unmarshal JSON data into FileOutput + err = json.Unmarshal(data, &dst.FileOutput) + if err == nil { + jsonFileOutput, _ := json.Marshal(dst.FileOutput) + if string(jsonFileOutput) == "{}" { // empty struct + dst.FileOutput = nil + } else { + return nil // data stored in dst.FileOutput, return on the first match + } + } else { + dst.FileOutput = nil + } + + // try to unmarshal JSON data into GenericOutput + err = json.Unmarshal(data, &dst.GenericOutput) + if err == nil { + jsonGenericOutput, _ := json.Marshal(dst.GenericOutput) + if string(jsonGenericOutput) == "{}" { // empty struct + dst.GenericOutput = nil + } else { + return nil // data stored in dst.GenericOutput, return on the first match + } + } else { + dst.GenericOutput = nil + } + + // try to unmarshal JSON data into HostnameOutput + err = json.Unmarshal(data, &dst.HostnameOutput) + if err == nil { + jsonHostnameOutput, _ := json.Marshal(dst.HostnameOutput) + if string(jsonHostnameOutput) == "{}" { // empty struct + dst.HostnameOutput = nil + } else { + return nil // data stored in dst.HostnameOutput, return on the first match + } + } else { + dst.HostnameOutput = nil + } + + // try to unmarshal JSON data into IBANOutput + err = json.Unmarshal(data, &dst.IBANOutput) + if err == nil { + jsonIBANOutput, _ := json.Marshal(dst.IBANOutput) + if string(jsonIBANOutput) == "{}" { // empty struct + dst.IBANOutput = nil + } else { + return nil // data stored in dst.IBANOutput, return on the first match + } + } else { + dst.IBANOutput = nil + } + + // try to unmarshal JSON data into IPv4Output + err = json.Unmarshal(data, &dst.IPv4Output) + if err == nil { + jsonIPv4Output, _ := json.Marshal(dst.IPv4Output) + if string(jsonIPv4Output) == "{}" { // empty struct + dst.IPv4Output = nil + } else { + return nil // data stored in dst.IPv4Output, return on the first match + } + } else { + dst.IPv4Output = nil + } + + // try to unmarshal JSON data into IPv6Output + err = json.Unmarshal(data, &dst.IPv6Output) + if err == nil { + jsonIPv6Output, _ := json.Marshal(dst.IPv6Output) + if string(jsonIPv6Output) == "{}" { // empty struct + dst.IPv6Output = nil + } else { + return nil // data stored in dst.IPv6Output, return on the first match + } + } else { + dst.IPv6Output = nil + } + + // try to unmarshal JSON data into ImphashOutput + err = json.Unmarshal(data, &dst.ImphashOutput) + if err == nil { + jsonImphashOutput, _ := json.Marshal(dst.ImphashOutput) + if string(jsonImphashOutput) == "{}" { // empty struct + dst.ImphashOutput = nil + } else { + return nil // data stored in dst.ImphashOutput, return on the first match + } + } else { + dst.ImphashOutput = nil + } + + // try to unmarshal JSON data into JA3Output + err = json.Unmarshal(data, &dst.JA3Output) + if err == nil { + jsonJA3Output, _ := json.Marshal(dst.JA3Output) + if string(jsonJA3Output) == "{}" { // empty struct + dst.JA3Output = nil + } else { + return nil // data stored in dst.JA3Output, return on the first match + } + } else { + dst.JA3Output = nil + } + + // try to unmarshal JSON data into JARMOutput + err = json.Unmarshal(data, &dst.JARMOutput) + if err == nil { + jsonJARMOutput, _ := json.Marshal(dst.JARMOutput) + if string(jsonJARMOutput) == "{}" { // empty struct + dst.JARMOutput = nil + } else { + return nil // data stored in dst.JARMOutput, return on the first match + } + } else { + dst.JARMOutput = nil + } + + // try to unmarshal JSON data into MD5Output + err = json.Unmarshal(data, &dst.MD5Output) + if err == nil { + jsonMD5Output, _ := json.Marshal(dst.MD5Output) + if string(jsonMD5Output) == "{}" { // empty struct + dst.MD5Output = nil + } else { + return nil // data stored in dst.MD5Output, return on the first match + } + } else { + dst.MD5Output = nil + } + + // try to unmarshal JSON data into MacAddressOutput + err = json.Unmarshal(data, &dst.MacAddressOutput) + if err == nil { + jsonMacAddressOutput, _ := json.Marshal(dst.MacAddressOutput) + if string(jsonMacAddressOutput) == "{}" { // empty struct + dst.MacAddressOutput = nil + } else { + return nil // data stored in dst.MacAddressOutput, return on the first match + } + } else { + dst.MacAddressOutput = nil + } + + // try to unmarshal JSON data into MutexOutput + err = json.Unmarshal(data, &dst.MutexOutput) + if err == nil { + jsonMutexOutput, _ := json.Marshal(dst.MutexOutput) + if string(jsonMutexOutput) == "{}" { // empty struct + dst.MutexOutput = nil + } else { + return nil // data stored in dst.MutexOutput, return on the first match + } + } else { + dst.MutexOutput = nil + } + + // try to unmarshal JSON data into NamedPipeOutput + err = json.Unmarshal(data, &dst.NamedPipeOutput) + if err == nil { + jsonNamedPipeOutput, _ := json.Marshal(dst.NamedPipeOutput) + if string(jsonNamedPipeOutput) == "{}" { // empty struct + dst.NamedPipeOutput = nil + } else { + return nil // data stored in dst.NamedPipeOutput, return on the first match + } + } else { + dst.NamedPipeOutput = nil + } + + // try to unmarshal JSON data into PackageOutput + err = json.Unmarshal(data, &dst.PackageOutput) + if err == nil { + jsonPackageOutput, _ := json.Marshal(dst.PackageOutput) + if string(jsonPackageOutput) == "{}" { // empty struct + dst.PackageOutput = nil + } else { + return nil // data stored in dst.PackageOutput, return on the first match + } + } else { + dst.PackageOutput = nil + } + + // try to unmarshal JSON data into PathOutput + err = json.Unmarshal(data, &dst.PathOutput) + if err == nil { + jsonPathOutput, _ := json.Marshal(dst.PathOutput) + if string(jsonPathOutput) == "{}" { // empty struct + dst.PathOutput = nil + } else { + return nil // data stored in dst.PathOutput, return on the first match + } + } else { + dst.PathOutput = nil + } + + // try to unmarshal JSON data into RegistryKeyOutput + err = json.Unmarshal(data, &dst.RegistryKeyOutput) + if err == nil { + jsonRegistryKeyOutput, _ := json.Marshal(dst.RegistryKeyOutput) + if string(jsonRegistryKeyOutput) == "{}" { // empty struct + dst.RegistryKeyOutput = nil + } else { + return nil // data stored in dst.RegistryKeyOutput, return on the first match + } + } else { + dst.RegistryKeyOutput = nil + } + + // try to unmarshal JSON data into SHA1Output + err = json.Unmarshal(data, &dst.SHA1Output) + if err == nil { + jsonSHA1Output, _ := json.Marshal(dst.SHA1Output) + if string(jsonSHA1Output) == "{}" { // empty struct + dst.SHA1Output = nil + } else { + return nil // data stored in dst.SHA1Output, return on the first match + } + } else { + dst.SHA1Output = nil + } + + // try to unmarshal JSON data into SHA256Output + err = json.Unmarshal(data, &dst.SHA256Output) + if err == nil { + jsonSHA256Output, _ := json.Marshal(dst.SHA256Output) + if string(jsonSHA256Output) == "{}" { // empty struct + dst.SHA256Output = nil + } else { + return nil // data stored in dst.SHA256Output, return on the first match + } + } else { + dst.SHA256Output = nil + } + + // try to unmarshal JSON data into SsdeepOutput + err = json.Unmarshal(data, &dst.SsdeepOutput) + if err == nil { + jsonSsdeepOutput, _ := json.Marshal(dst.SsdeepOutput) + if string(jsonSsdeepOutput) == "{}" { // empty struct + dst.SsdeepOutput = nil + } else { + return nil // data stored in dst.SsdeepOutput, return on the first match + } + } else { + dst.SsdeepOutput = nil + } + + // try to unmarshal JSON data into TLSHOutput + err = json.Unmarshal(data, &dst.TLSHOutput) + if err == nil { + jsonTLSHOutput, _ := json.Marshal(dst.TLSHOutput) + if string(jsonTLSHOutput) == "{}" { // empty struct + dst.TLSHOutput = nil + } else { + return nil // data stored in dst.TLSHOutput, return on the first match + } + } else { + dst.TLSHOutput = nil + } + + // try to unmarshal JSON data into UrlOutput + err = json.Unmarshal(data, &dst.UrlOutput) + if err == nil { + jsonUrlOutput, _ := json.Marshal(dst.UrlOutput) + if string(jsonUrlOutput) == "{}" { // empty struct + dst.UrlOutput = nil + } else { + return nil // data stored in dst.UrlOutput, return on the first match + } + } else { + dst.UrlOutput = nil + } + + // try to unmarshal JSON data into UserAccountOutput + err = json.Unmarshal(data, &dst.UserAccountOutput) + if err == nil { + jsonUserAccountOutput, _ := json.Marshal(dst.UserAccountOutput) + if string(jsonUserAccountOutput) == "{}" { // empty struct + dst.UserAccountOutput = nil + } else { + return nil // data stored in dst.UserAccountOutput, return on the first match + } + } else { + dst.UserAccountOutput = nil + } + + // try to unmarshal JSON data into UserAgentOutput + err = json.Unmarshal(data, &dst.UserAgentOutput) + if err == nil { + jsonUserAgentOutput, _ := json.Marshal(dst.UserAgentOutput) + if string(jsonUserAgentOutput) == "{}" { // empty struct + dst.UserAgentOutput = nil + } else { + return nil // data stored in dst.UserAgentOutput, return on the first match + } + } else { + dst.UserAgentOutput = nil + } + + // try to unmarshal JSON data into WalletOutput + err = json.Unmarshal(data, &dst.WalletOutput) + if err == nil { + jsonWalletOutput, _ := json.Marshal(dst.WalletOutput) + if string(jsonWalletOutput) == "{}" { // empty struct + dst.WalletOutput = nil + } else { + return nil // data stored in dst.WalletOutput, return on the first match + } + } else { + dst.WalletOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseNewExtendedApiV2ObservablesExtendedPost)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseNewExtendedApiV2ObservablesExtendedPost) MarshalJSON() ([]byte, error) { + if src.ASNOutput != nil { + return json.Marshal(&src.ASNOutput) + } + + if src.BICOutput != nil { + return json.Marshal(&src.BICOutput) + } + + if src.CIDROutput != nil { + return json.Marshal(&src.CIDROutput) + } + + if src.CertificateOutput != nil { + return json.Marshal(&src.CertificateOutput) + } + + if src.CommandLineOutput != nil { + return json.Marshal(&src.CommandLineOutput) + } + + if src.DockerImageOutput != nil { + return json.Marshal(&src.DockerImageOutput) + } + + if src.EmailOutput != nil { + return json.Marshal(&src.EmailOutput) + } + + if src.FileOutput != nil { + return json.Marshal(&src.FileOutput) + } + + if src.GenericOutput != nil { + return json.Marshal(&src.GenericOutput) + } + + if src.HostnameOutput != nil { + return json.Marshal(&src.HostnameOutput) + } + + if src.IBANOutput != nil { + return json.Marshal(&src.IBANOutput) + } + + if src.IPv4Output != nil { + return json.Marshal(&src.IPv4Output) + } + + if src.IPv6Output != nil { + return json.Marshal(&src.IPv6Output) + } + + if src.ImphashOutput != nil { + return json.Marshal(&src.ImphashOutput) + } + + if src.JA3Output != nil { + return json.Marshal(&src.JA3Output) + } + + if src.JARMOutput != nil { + return json.Marshal(&src.JARMOutput) + } + + if src.MD5Output != nil { + return json.Marshal(&src.MD5Output) + } + + if src.MacAddressOutput != nil { + return json.Marshal(&src.MacAddressOutput) + } + + if src.MutexOutput != nil { + return json.Marshal(&src.MutexOutput) + } + + if src.NamedPipeOutput != nil { + return json.Marshal(&src.NamedPipeOutput) + } + + if src.PackageOutput != nil { + return json.Marshal(&src.PackageOutput) + } + + if src.PathOutput != nil { + return json.Marshal(&src.PathOutput) + } + + if src.RegistryKeyOutput != nil { + return json.Marshal(&src.RegistryKeyOutput) + } + + if src.SHA1Output != nil { + return json.Marshal(&src.SHA1Output) + } + + if src.SHA256Output != nil { + return json.Marshal(&src.SHA256Output) + } + + if src.SsdeepOutput != nil { + return json.Marshal(&src.SsdeepOutput) + } + + if src.TLSHOutput != nil { + return json.Marshal(&src.TLSHOutput) + } + + if src.UrlOutput != nil { + return json.Marshal(&src.UrlOutput) + } + + if src.UserAccountOutput != nil { + return json.Marshal(&src.UserAccountOutput) + } + + if src.UserAgentOutput != nil { + return json.Marshal(&src.UserAgentOutput) + } + + if src.WalletOutput != nil { + return json.Marshal(&src.WalletOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseNewExtendedApiV2ObservablesExtendedPost struct { + value *ResponseNewExtendedApiV2ObservablesExtendedPost + isSet bool +} + +func (v NullableResponseNewExtendedApiV2ObservablesExtendedPost) Get() *ResponseNewExtendedApiV2ObservablesExtendedPost { + return v.value +} + +func (v *NullableResponseNewExtendedApiV2ObservablesExtendedPost) Set(val *ResponseNewExtendedApiV2ObservablesExtendedPost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseNewExtendedApiV2ObservablesExtendedPost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseNewExtendedApiV2ObservablesExtendedPost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseNewExtendedApiV2ObservablesExtendedPost(val *ResponseNewExtendedApiV2ObservablesExtendedPost) *NullableResponseNewExtendedApiV2ObservablesExtendedPost { + return &NullableResponseNewExtendedApiV2ObservablesExtendedPost{value: val, isSet: true} +} + +func (v NullableResponseNewExtendedApiV2ObservablesExtendedPost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseNewExtendedApiV2ObservablesExtendedPost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_new_from_yaml_api_v2_dfiq_from_yaml_post.go b/model_response_new_from_yaml_api_v2_dfiq_from_yaml_post.go new file mode 100644 index 0000000..67f8f75 --- /dev/null +++ b/model_response_new_from_yaml_api_v2_dfiq_from_yaml_post.go @@ -0,0 +1,188 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ResponseNewFromYamlApiV2DfiqFromYamlPost - struct for ResponseNewFromYamlApiV2DfiqFromYamlPost +type ResponseNewFromYamlApiV2DfiqFromYamlPost struct { + DFIQFacet *DFIQFacet + DFIQQuestion *DFIQQuestion + DFIQScenario *DFIQScenario +} + +// DFIQFacetAsResponseNewFromYamlApiV2DfiqFromYamlPost is a convenience function that returns DFIQFacet wrapped in ResponseNewFromYamlApiV2DfiqFromYamlPost +func DFIQFacetAsResponseNewFromYamlApiV2DfiqFromYamlPost(v *DFIQFacet) ResponseNewFromYamlApiV2DfiqFromYamlPost { + return ResponseNewFromYamlApiV2DfiqFromYamlPost{ + DFIQFacet: v, + } +} + +// DFIQQuestionAsResponseNewFromYamlApiV2DfiqFromYamlPost is a convenience function that returns DFIQQuestion wrapped in ResponseNewFromYamlApiV2DfiqFromYamlPost +func DFIQQuestionAsResponseNewFromYamlApiV2DfiqFromYamlPost(v *DFIQQuestion) ResponseNewFromYamlApiV2DfiqFromYamlPost { + return ResponseNewFromYamlApiV2DfiqFromYamlPost{ + DFIQQuestion: v, + } +} + +// DFIQScenarioAsResponseNewFromYamlApiV2DfiqFromYamlPost is a convenience function that returns DFIQScenario wrapped in ResponseNewFromYamlApiV2DfiqFromYamlPost +func DFIQScenarioAsResponseNewFromYamlApiV2DfiqFromYamlPost(v *DFIQScenario) ResponseNewFromYamlApiV2DfiqFromYamlPost { + return ResponseNewFromYamlApiV2DfiqFromYamlPost{ + DFIQScenario: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ResponseNewFromYamlApiV2DfiqFromYamlPost) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into DFIQFacet + err = newStrictDecoder(data).Decode(&dst.DFIQFacet) + if err == nil { + jsonDFIQFacet, _ := json.Marshal(dst.DFIQFacet) + if string(jsonDFIQFacet) == "{}" { // empty struct + dst.DFIQFacet = nil + } else { + if err = validator.Validate(dst.DFIQFacet); err != nil { + dst.DFIQFacet = nil + } else { + match++ + } + } + } else { + dst.DFIQFacet = nil + } + + // try to unmarshal data into DFIQQuestion + err = newStrictDecoder(data).Decode(&dst.DFIQQuestion) + if err == nil { + jsonDFIQQuestion, _ := json.Marshal(dst.DFIQQuestion) + if string(jsonDFIQQuestion) == "{}" { // empty struct + dst.DFIQQuestion = nil + } else { + if err = validator.Validate(dst.DFIQQuestion); err != nil { + dst.DFIQQuestion = nil + } else { + match++ + } + } + } else { + dst.DFIQQuestion = nil + } + + // try to unmarshal data into DFIQScenario + err = newStrictDecoder(data).Decode(&dst.DFIQScenario) + if err == nil { + jsonDFIQScenario, _ := json.Marshal(dst.DFIQScenario) + if string(jsonDFIQScenario) == "{}" { // empty struct + dst.DFIQScenario = nil + } else { + if err = validator.Validate(dst.DFIQScenario); err != nil { + dst.DFIQScenario = nil + } else { + match++ + } + } + } else { + dst.DFIQScenario = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.DFIQFacet = nil + dst.DFIQQuestion = nil + dst.DFIQScenario = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ResponseNewFromYamlApiV2DfiqFromYamlPost)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ResponseNewFromYamlApiV2DfiqFromYamlPost)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseNewFromYamlApiV2DfiqFromYamlPost) MarshalJSON() ([]byte, error) { + if src.DFIQFacet != nil { + return json.Marshal(&src.DFIQFacet) + } + + if src.DFIQQuestion != nil { + return json.Marshal(&src.DFIQQuestion) + } + + if src.DFIQScenario != nil { + return json.Marshal(&src.DFIQScenario) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ResponseNewFromYamlApiV2DfiqFromYamlPost) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.DFIQFacet != nil { + return obj.DFIQFacet + } + + if obj.DFIQQuestion != nil { + return obj.DFIQQuestion + } + + if obj.DFIQScenario != nil { + return obj.DFIQScenario + } + + // all schemas are nil + return nil +} + +type NullableResponseNewFromYamlApiV2DfiqFromYamlPost struct { + value *ResponseNewFromYamlApiV2DfiqFromYamlPost + isSet bool +} + +func (v NullableResponseNewFromYamlApiV2DfiqFromYamlPost) Get() *ResponseNewFromYamlApiV2DfiqFromYamlPost { + return v.value +} + +func (v *NullableResponseNewFromYamlApiV2DfiqFromYamlPost) Set(val *ResponseNewFromYamlApiV2DfiqFromYamlPost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseNewFromYamlApiV2DfiqFromYamlPost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseNewFromYamlApiV2DfiqFromYamlPost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseNewFromYamlApiV2DfiqFromYamlPost(val *ResponseNewFromYamlApiV2DfiqFromYamlPost) *NullableResponseNewFromYamlApiV2DfiqFromYamlPost { + return &NullableResponseNewFromYamlApiV2DfiqFromYamlPost{value: val, isSet: true} +} + +func (v NullableResponseNewFromYamlApiV2DfiqFromYamlPost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseNewFromYamlApiV2DfiqFromYamlPost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_patch_api_v2_dfiq__dfiq_id__patch.go b/model_response_patch_api_v2_dfiq__dfiq_id__patch.go new file mode 100644 index 0000000..5fc27cf --- /dev/null +++ b/model_response_patch_api_v2_dfiq__dfiq_id__patch.go @@ -0,0 +1,188 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ResponsePatchApiV2DfiqDfiqIdPatch - struct for ResponsePatchApiV2DfiqDfiqIdPatch +type ResponsePatchApiV2DfiqDfiqIdPatch struct { + DFIQFacet *DFIQFacet + DFIQQuestion *DFIQQuestion + DFIQScenario *DFIQScenario +} + +// DFIQFacetAsResponsePatchApiV2DfiqDfiqIdPatch is a convenience function that returns DFIQFacet wrapped in ResponsePatchApiV2DfiqDfiqIdPatch +func DFIQFacetAsResponsePatchApiV2DfiqDfiqIdPatch(v *DFIQFacet) ResponsePatchApiV2DfiqDfiqIdPatch { + return ResponsePatchApiV2DfiqDfiqIdPatch{ + DFIQFacet: v, + } +} + +// DFIQQuestionAsResponsePatchApiV2DfiqDfiqIdPatch is a convenience function that returns DFIQQuestion wrapped in ResponsePatchApiV2DfiqDfiqIdPatch +func DFIQQuestionAsResponsePatchApiV2DfiqDfiqIdPatch(v *DFIQQuestion) ResponsePatchApiV2DfiqDfiqIdPatch { + return ResponsePatchApiV2DfiqDfiqIdPatch{ + DFIQQuestion: v, + } +} + +// DFIQScenarioAsResponsePatchApiV2DfiqDfiqIdPatch is a convenience function that returns DFIQScenario wrapped in ResponsePatchApiV2DfiqDfiqIdPatch +func DFIQScenarioAsResponsePatchApiV2DfiqDfiqIdPatch(v *DFIQScenario) ResponsePatchApiV2DfiqDfiqIdPatch { + return ResponsePatchApiV2DfiqDfiqIdPatch{ + DFIQScenario: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ResponsePatchApiV2DfiqDfiqIdPatch) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into DFIQFacet + err = newStrictDecoder(data).Decode(&dst.DFIQFacet) + if err == nil { + jsonDFIQFacet, _ := json.Marshal(dst.DFIQFacet) + if string(jsonDFIQFacet) == "{}" { // empty struct + dst.DFIQFacet = nil + } else { + if err = validator.Validate(dst.DFIQFacet); err != nil { + dst.DFIQFacet = nil + } else { + match++ + } + } + } else { + dst.DFIQFacet = nil + } + + // try to unmarshal data into DFIQQuestion + err = newStrictDecoder(data).Decode(&dst.DFIQQuestion) + if err == nil { + jsonDFIQQuestion, _ := json.Marshal(dst.DFIQQuestion) + if string(jsonDFIQQuestion) == "{}" { // empty struct + dst.DFIQQuestion = nil + } else { + if err = validator.Validate(dst.DFIQQuestion); err != nil { + dst.DFIQQuestion = nil + } else { + match++ + } + } + } else { + dst.DFIQQuestion = nil + } + + // try to unmarshal data into DFIQScenario + err = newStrictDecoder(data).Decode(&dst.DFIQScenario) + if err == nil { + jsonDFIQScenario, _ := json.Marshal(dst.DFIQScenario) + if string(jsonDFIQScenario) == "{}" { // empty struct + dst.DFIQScenario = nil + } else { + if err = validator.Validate(dst.DFIQScenario); err != nil { + dst.DFIQScenario = nil + } else { + match++ + } + } + } else { + dst.DFIQScenario = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.DFIQFacet = nil + dst.DFIQQuestion = nil + dst.DFIQScenario = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ResponsePatchApiV2DfiqDfiqIdPatch)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ResponsePatchApiV2DfiqDfiqIdPatch)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponsePatchApiV2DfiqDfiqIdPatch) MarshalJSON() ([]byte, error) { + if src.DFIQFacet != nil { + return json.Marshal(&src.DFIQFacet) + } + + if src.DFIQQuestion != nil { + return json.Marshal(&src.DFIQQuestion) + } + + if src.DFIQScenario != nil { + return json.Marshal(&src.DFIQScenario) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ResponsePatchApiV2DfiqDfiqIdPatch) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.DFIQFacet != nil { + return obj.DFIQFacet + } + + if obj.DFIQQuestion != nil { + return obj.DFIQQuestion + } + + if obj.DFIQScenario != nil { + return obj.DFIQScenario + } + + // all schemas are nil + return nil +} + +type NullableResponsePatchApiV2DfiqDfiqIdPatch struct { + value *ResponsePatchApiV2DfiqDfiqIdPatch + isSet bool +} + +func (v NullableResponsePatchApiV2DfiqDfiqIdPatch) Get() *ResponsePatchApiV2DfiqDfiqIdPatch { + return v.value +} + +func (v *NullableResponsePatchApiV2DfiqDfiqIdPatch) Set(val *ResponsePatchApiV2DfiqDfiqIdPatch) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePatchApiV2DfiqDfiqIdPatch) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePatchApiV2DfiqDfiqIdPatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePatchApiV2DfiqDfiqIdPatch(val *ResponsePatchApiV2DfiqDfiqIdPatch) *NullableResponsePatchApiV2DfiqDfiqIdPatch { + return &NullableResponsePatchApiV2DfiqDfiqIdPatch{value: val, isSet: true} +} + +func (v NullableResponsePatchApiV2DfiqDfiqIdPatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePatchApiV2DfiqDfiqIdPatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_patch_api_v2_entities__entity_id__patch.go b/model_response_patch_api_v2_entities__entity_id__patch.go new file mode 100644 index 0000000..ff0e3a1 --- /dev/null +++ b/model_response_patch_api_v2_entities__entity_id__patch.go @@ -0,0 +1,301 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponsePatchApiV2EntitiesEntityIdPatch struct for ResponsePatchApiV2EntitiesEntityIdPatch +type ResponsePatchApiV2EntitiesEntityIdPatch struct { + AttackPatternOutput *AttackPatternOutput + CampaignOutput *CampaignOutput + CompanyOutput *CompanyOutput + CourseOfActionOutput *CourseOfActionOutput + IdentityOutput *IdentityOutput + IntrusionSetOutput *IntrusionSetOutput + InvestigationOutput *InvestigationOutput + MalwareOutput *MalwareOutput + NoteOutput *NoteOutput + PhoneOutput *PhoneOutput + ThreatActorOutput *ThreatActorOutput + ToolOutput *ToolOutput + VulnerabilityOutput *VulnerabilityOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponsePatchApiV2EntitiesEntityIdPatch) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AttackPatternOutput + err = json.Unmarshal(data, &dst.AttackPatternOutput) + if err == nil { + jsonAttackPatternOutput, _ := json.Marshal(dst.AttackPatternOutput) + if string(jsonAttackPatternOutput) == "{}" { // empty struct + dst.AttackPatternOutput = nil + } else { + return nil // data stored in dst.AttackPatternOutput, return on the first match + } + } else { + dst.AttackPatternOutput = nil + } + + // try to unmarshal JSON data into CampaignOutput + err = json.Unmarshal(data, &dst.CampaignOutput) + if err == nil { + jsonCampaignOutput, _ := json.Marshal(dst.CampaignOutput) + if string(jsonCampaignOutput) == "{}" { // empty struct + dst.CampaignOutput = nil + } else { + return nil // data stored in dst.CampaignOutput, return on the first match + } + } else { + dst.CampaignOutput = nil + } + + // try to unmarshal JSON data into CompanyOutput + err = json.Unmarshal(data, &dst.CompanyOutput) + if err == nil { + jsonCompanyOutput, _ := json.Marshal(dst.CompanyOutput) + if string(jsonCompanyOutput) == "{}" { // empty struct + dst.CompanyOutput = nil + } else { + return nil // data stored in dst.CompanyOutput, return on the first match + } + } else { + dst.CompanyOutput = nil + } + + // try to unmarshal JSON data into CourseOfActionOutput + err = json.Unmarshal(data, &dst.CourseOfActionOutput) + if err == nil { + jsonCourseOfActionOutput, _ := json.Marshal(dst.CourseOfActionOutput) + if string(jsonCourseOfActionOutput) == "{}" { // empty struct + dst.CourseOfActionOutput = nil + } else { + return nil // data stored in dst.CourseOfActionOutput, return on the first match + } + } else { + dst.CourseOfActionOutput = nil + } + + // try to unmarshal JSON data into IdentityOutput + err = json.Unmarshal(data, &dst.IdentityOutput) + if err == nil { + jsonIdentityOutput, _ := json.Marshal(dst.IdentityOutput) + if string(jsonIdentityOutput) == "{}" { // empty struct + dst.IdentityOutput = nil + } else { + return nil // data stored in dst.IdentityOutput, return on the first match + } + } else { + dst.IdentityOutput = nil + } + + // try to unmarshal JSON data into IntrusionSetOutput + err = json.Unmarshal(data, &dst.IntrusionSetOutput) + if err == nil { + jsonIntrusionSetOutput, _ := json.Marshal(dst.IntrusionSetOutput) + if string(jsonIntrusionSetOutput) == "{}" { // empty struct + dst.IntrusionSetOutput = nil + } else { + return nil // data stored in dst.IntrusionSetOutput, return on the first match + } + } else { + dst.IntrusionSetOutput = nil + } + + // try to unmarshal JSON data into InvestigationOutput + err = json.Unmarshal(data, &dst.InvestigationOutput) + if err == nil { + jsonInvestigationOutput, _ := json.Marshal(dst.InvestigationOutput) + if string(jsonInvestigationOutput) == "{}" { // empty struct + dst.InvestigationOutput = nil + } else { + return nil // data stored in dst.InvestigationOutput, return on the first match + } + } else { + dst.InvestigationOutput = nil + } + + // try to unmarshal JSON data into MalwareOutput + err = json.Unmarshal(data, &dst.MalwareOutput) + if err == nil { + jsonMalwareOutput, _ := json.Marshal(dst.MalwareOutput) + if string(jsonMalwareOutput) == "{}" { // empty struct + dst.MalwareOutput = nil + } else { + return nil // data stored in dst.MalwareOutput, return on the first match + } + } else { + dst.MalwareOutput = nil + } + + // try to unmarshal JSON data into NoteOutput + err = json.Unmarshal(data, &dst.NoteOutput) + if err == nil { + jsonNoteOutput, _ := json.Marshal(dst.NoteOutput) + if string(jsonNoteOutput) == "{}" { // empty struct + dst.NoteOutput = nil + } else { + return nil // data stored in dst.NoteOutput, return on the first match + } + } else { + dst.NoteOutput = nil + } + + // try to unmarshal JSON data into PhoneOutput + err = json.Unmarshal(data, &dst.PhoneOutput) + if err == nil { + jsonPhoneOutput, _ := json.Marshal(dst.PhoneOutput) + if string(jsonPhoneOutput) == "{}" { // empty struct + dst.PhoneOutput = nil + } else { + return nil // data stored in dst.PhoneOutput, return on the first match + } + } else { + dst.PhoneOutput = nil + } + + // try to unmarshal JSON data into ThreatActorOutput + err = json.Unmarshal(data, &dst.ThreatActorOutput) + if err == nil { + jsonThreatActorOutput, _ := json.Marshal(dst.ThreatActorOutput) + if string(jsonThreatActorOutput) == "{}" { // empty struct + dst.ThreatActorOutput = nil + } else { + return nil // data stored in dst.ThreatActorOutput, return on the first match + } + } else { + dst.ThreatActorOutput = nil + } + + // try to unmarshal JSON data into ToolOutput + err = json.Unmarshal(data, &dst.ToolOutput) + if err == nil { + jsonToolOutput, _ := json.Marshal(dst.ToolOutput) + if string(jsonToolOutput) == "{}" { // empty struct + dst.ToolOutput = nil + } else { + return nil // data stored in dst.ToolOutput, return on the first match + } + } else { + dst.ToolOutput = nil + } + + // try to unmarshal JSON data into VulnerabilityOutput + err = json.Unmarshal(data, &dst.VulnerabilityOutput) + if err == nil { + jsonVulnerabilityOutput, _ := json.Marshal(dst.VulnerabilityOutput) + if string(jsonVulnerabilityOutput) == "{}" { // empty struct + dst.VulnerabilityOutput = nil + } else { + return nil // data stored in dst.VulnerabilityOutput, return on the first match + } + } else { + dst.VulnerabilityOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponsePatchApiV2EntitiesEntityIdPatch)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponsePatchApiV2EntitiesEntityIdPatch) MarshalJSON() ([]byte, error) { + if src.AttackPatternOutput != nil { + return json.Marshal(&src.AttackPatternOutput) + } + + if src.CampaignOutput != nil { + return json.Marshal(&src.CampaignOutput) + } + + if src.CompanyOutput != nil { + return json.Marshal(&src.CompanyOutput) + } + + if src.CourseOfActionOutput != nil { + return json.Marshal(&src.CourseOfActionOutput) + } + + if src.IdentityOutput != nil { + return json.Marshal(&src.IdentityOutput) + } + + if src.IntrusionSetOutput != nil { + return json.Marshal(&src.IntrusionSetOutput) + } + + if src.InvestigationOutput != nil { + return json.Marshal(&src.InvestigationOutput) + } + + if src.MalwareOutput != nil { + return json.Marshal(&src.MalwareOutput) + } + + if src.NoteOutput != nil { + return json.Marshal(&src.NoteOutput) + } + + if src.PhoneOutput != nil { + return json.Marshal(&src.PhoneOutput) + } + + if src.ThreatActorOutput != nil { + return json.Marshal(&src.ThreatActorOutput) + } + + if src.ToolOutput != nil { + return json.Marshal(&src.ToolOutput) + } + + if src.VulnerabilityOutput != nil { + return json.Marshal(&src.VulnerabilityOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponsePatchApiV2EntitiesEntityIdPatch struct { + value *ResponsePatchApiV2EntitiesEntityIdPatch + isSet bool +} + +func (v NullableResponsePatchApiV2EntitiesEntityIdPatch) Get() *ResponsePatchApiV2EntitiesEntityIdPatch { + return v.value +} + +func (v *NullableResponsePatchApiV2EntitiesEntityIdPatch) Set(val *ResponsePatchApiV2EntitiesEntityIdPatch) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePatchApiV2EntitiesEntityIdPatch) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePatchApiV2EntitiesEntityIdPatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePatchApiV2EntitiesEntityIdPatch(val *ResponsePatchApiV2EntitiesEntityIdPatch) *NullableResponsePatchApiV2EntitiesEntityIdPatch { + return &NullableResponsePatchApiV2EntitiesEntityIdPatch{value: val, isSet: true} +} + +func (v NullableResponsePatchApiV2EntitiesEntityIdPatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePatchApiV2EntitiesEntityIdPatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_patch_api_v2_indicators__indicator_id__patch.go b/model_response_patch_api_v2_indicators__indicator_id__patch.go new file mode 100644 index 0000000..5284dca --- /dev/null +++ b/model_response_patch_api_v2_indicators__indicator_id__patch.go @@ -0,0 +1,175 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponsePatchApiV2IndicatorsIndicatorIdPatch struct for ResponsePatchApiV2IndicatorsIndicatorIdPatch +type ResponsePatchApiV2IndicatorsIndicatorIdPatch struct { + ForensicArtifactOutput *ForensicArtifactOutput + QueryOutput *QueryOutput + RegexOutput *RegexOutput + SigmaOutput *SigmaOutput + SuricataOutput *SuricataOutput + YaraOutput *YaraOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponsePatchApiV2IndicatorsIndicatorIdPatch) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ForensicArtifactOutput + err = json.Unmarshal(data, &dst.ForensicArtifactOutput) + if err == nil { + jsonForensicArtifactOutput, _ := json.Marshal(dst.ForensicArtifactOutput) + if string(jsonForensicArtifactOutput) == "{}" { // empty struct + dst.ForensicArtifactOutput = nil + } else { + return nil // data stored in dst.ForensicArtifactOutput, return on the first match + } + } else { + dst.ForensicArtifactOutput = nil + } + + // try to unmarshal JSON data into QueryOutput + err = json.Unmarshal(data, &dst.QueryOutput) + if err == nil { + jsonQueryOutput, _ := json.Marshal(dst.QueryOutput) + if string(jsonQueryOutput) == "{}" { // empty struct + dst.QueryOutput = nil + } else { + return nil // data stored in dst.QueryOutput, return on the first match + } + } else { + dst.QueryOutput = nil + } + + // try to unmarshal JSON data into RegexOutput + err = json.Unmarshal(data, &dst.RegexOutput) + if err == nil { + jsonRegexOutput, _ := json.Marshal(dst.RegexOutput) + if string(jsonRegexOutput) == "{}" { // empty struct + dst.RegexOutput = nil + } else { + return nil // data stored in dst.RegexOutput, return on the first match + } + } else { + dst.RegexOutput = nil + } + + // try to unmarshal JSON data into SigmaOutput + err = json.Unmarshal(data, &dst.SigmaOutput) + if err == nil { + jsonSigmaOutput, _ := json.Marshal(dst.SigmaOutput) + if string(jsonSigmaOutput) == "{}" { // empty struct + dst.SigmaOutput = nil + } else { + return nil // data stored in dst.SigmaOutput, return on the first match + } + } else { + dst.SigmaOutput = nil + } + + // try to unmarshal JSON data into SuricataOutput + err = json.Unmarshal(data, &dst.SuricataOutput) + if err == nil { + jsonSuricataOutput, _ := json.Marshal(dst.SuricataOutput) + if string(jsonSuricataOutput) == "{}" { // empty struct + dst.SuricataOutput = nil + } else { + return nil // data stored in dst.SuricataOutput, return on the first match + } + } else { + dst.SuricataOutput = nil + } + + // try to unmarshal JSON data into YaraOutput + err = json.Unmarshal(data, &dst.YaraOutput) + if err == nil { + jsonYaraOutput, _ := json.Marshal(dst.YaraOutput) + if string(jsonYaraOutput) == "{}" { // empty struct + dst.YaraOutput = nil + } else { + return nil // data stored in dst.YaraOutput, return on the first match + } + } else { + dst.YaraOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponsePatchApiV2IndicatorsIndicatorIdPatch)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponsePatchApiV2IndicatorsIndicatorIdPatch) MarshalJSON() ([]byte, error) { + if src.ForensicArtifactOutput != nil { + return json.Marshal(&src.ForensicArtifactOutput) + } + + if src.QueryOutput != nil { + return json.Marshal(&src.QueryOutput) + } + + if src.RegexOutput != nil { + return json.Marshal(&src.RegexOutput) + } + + if src.SigmaOutput != nil { + return json.Marshal(&src.SigmaOutput) + } + + if src.SuricataOutput != nil { + return json.Marshal(&src.SuricataOutput) + } + + if src.YaraOutput != nil { + return json.Marshal(&src.YaraOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponsePatchApiV2IndicatorsIndicatorIdPatch struct { + value *ResponsePatchApiV2IndicatorsIndicatorIdPatch + isSet bool +} + +func (v NullableResponsePatchApiV2IndicatorsIndicatorIdPatch) Get() *ResponsePatchApiV2IndicatorsIndicatorIdPatch { + return v.value +} + +func (v *NullableResponsePatchApiV2IndicatorsIndicatorIdPatch) Set(val *ResponsePatchApiV2IndicatorsIndicatorIdPatch) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePatchApiV2IndicatorsIndicatorIdPatch) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePatchApiV2IndicatorsIndicatorIdPatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePatchApiV2IndicatorsIndicatorIdPatch(val *ResponsePatchApiV2IndicatorsIndicatorIdPatch) *NullableResponsePatchApiV2IndicatorsIndicatorIdPatch { + return &NullableResponsePatchApiV2IndicatorsIndicatorIdPatch{value: val, isSet: true} +} + +func (v NullableResponsePatchApiV2IndicatorsIndicatorIdPatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePatchApiV2IndicatorsIndicatorIdPatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_patch_api_v2_observables__observable_id__patch.go b/model_response_patch_api_v2_observables__observable_id__patch.go new file mode 100644 index 0000000..680a40b --- /dev/null +++ b/model_response_patch_api_v2_observables__observable_id__patch.go @@ -0,0 +1,625 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponsePatchApiV2ObservablesObservableIdPatch struct for ResponsePatchApiV2ObservablesObservableIdPatch +type ResponsePatchApiV2ObservablesObservableIdPatch struct { + ASNOutput *ASNOutput + BICOutput *BICOutput + CIDROutput *CIDROutput + CertificateOutput *CertificateOutput + CommandLineOutput *CommandLineOutput + DockerImageOutput *DockerImageOutput + EmailOutput *EmailOutput + FileOutput *FileOutput + GenericOutput *GenericOutput + HostnameOutput *HostnameOutput + IBANOutput *IBANOutput + IPv4Output *IPv4Output + IPv6Output *IPv6Output + ImphashOutput *ImphashOutput + JA3Output *JA3Output + JARMOutput *JARMOutput + MD5Output *MD5Output + MacAddressOutput *MacAddressOutput + MutexOutput *MutexOutput + NamedPipeOutput *NamedPipeOutput + PackageOutput *PackageOutput + PathOutput *PathOutput + RegistryKeyOutput *RegistryKeyOutput + SHA1Output *SHA1Output + SHA256Output *SHA256Output + SsdeepOutput *SsdeepOutput + TLSHOutput *TLSHOutput + UrlOutput *UrlOutput + UserAccountOutput *UserAccountOutput + UserAgentOutput *UserAgentOutput + WalletOutput *WalletOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponsePatchApiV2ObservablesObservableIdPatch) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into ASNOutput + err = json.Unmarshal(data, &dst.ASNOutput) + if err == nil { + jsonASNOutput, _ := json.Marshal(dst.ASNOutput) + if string(jsonASNOutput) == "{}" { // empty struct + dst.ASNOutput = nil + } else { + return nil // data stored in dst.ASNOutput, return on the first match + } + } else { + dst.ASNOutput = nil + } + + // try to unmarshal JSON data into BICOutput + err = json.Unmarshal(data, &dst.BICOutput) + if err == nil { + jsonBICOutput, _ := json.Marshal(dst.BICOutput) + if string(jsonBICOutput) == "{}" { // empty struct + dst.BICOutput = nil + } else { + return nil // data stored in dst.BICOutput, return on the first match + } + } else { + dst.BICOutput = nil + } + + // try to unmarshal JSON data into CIDROutput + err = json.Unmarshal(data, &dst.CIDROutput) + if err == nil { + jsonCIDROutput, _ := json.Marshal(dst.CIDROutput) + if string(jsonCIDROutput) == "{}" { // empty struct + dst.CIDROutput = nil + } else { + return nil // data stored in dst.CIDROutput, return on the first match + } + } else { + dst.CIDROutput = nil + } + + // try to unmarshal JSON data into CertificateOutput + err = json.Unmarshal(data, &dst.CertificateOutput) + if err == nil { + jsonCertificateOutput, _ := json.Marshal(dst.CertificateOutput) + if string(jsonCertificateOutput) == "{}" { // empty struct + dst.CertificateOutput = nil + } else { + return nil // data stored in dst.CertificateOutput, return on the first match + } + } else { + dst.CertificateOutput = nil + } + + // try to unmarshal JSON data into CommandLineOutput + err = json.Unmarshal(data, &dst.CommandLineOutput) + if err == nil { + jsonCommandLineOutput, _ := json.Marshal(dst.CommandLineOutput) + if string(jsonCommandLineOutput) == "{}" { // empty struct + dst.CommandLineOutput = nil + } else { + return nil // data stored in dst.CommandLineOutput, return on the first match + } + } else { + dst.CommandLineOutput = nil + } + + // try to unmarshal JSON data into DockerImageOutput + err = json.Unmarshal(data, &dst.DockerImageOutput) + if err == nil { + jsonDockerImageOutput, _ := json.Marshal(dst.DockerImageOutput) + if string(jsonDockerImageOutput) == "{}" { // empty struct + dst.DockerImageOutput = nil + } else { + return nil // data stored in dst.DockerImageOutput, return on the first match + } + } else { + dst.DockerImageOutput = nil + } + + // try to unmarshal JSON data into EmailOutput + err = json.Unmarshal(data, &dst.EmailOutput) + if err == nil { + jsonEmailOutput, _ := json.Marshal(dst.EmailOutput) + if string(jsonEmailOutput) == "{}" { // empty struct + dst.EmailOutput = nil + } else { + return nil // data stored in dst.EmailOutput, return on the first match + } + } else { + dst.EmailOutput = nil + } + + // try to unmarshal JSON data into FileOutput + err = json.Unmarshal(data, &dst.FileOutput) + if err == nil { + jsonFileOutput, _ := json.Marshal(dst.FileOutput) + if string(jsonFileOutput) == "{}" { // empty struct + dst.FileOutput = nil + } else { + return nil // data stored in dst.FileOutput, return on the first match + } + } else { + dst.FileOutput = nil + } + + // try to unmarshal JSON data into GenericOutput + err = json.Unmarshal(data, &dst.GenericOutput) + if err == nil { + jsonGenericOutput, _ := json.Marshal(dst.GenericOutput) + if string(jsonGenericOutput) == "{}" { // empty struct + dst.GenericOutput = nil + } else { + return nil // data stored in dst.GenericOutput, return on the first match + } + } else { + dst.GenericOutput = nil + } + + // try to unmarshal JSON data into HostnameOutput + err = json.Unmarshal(data, &dst.HostnameOutput) + if err == nil { + jsonHostnameOutput, _ := json.Marshal(dst.HostnameOutput) + if string(jsonHostnameOutput) == "{}" { // empty struct + dst.HostnameOutput = nil + } else { + return nil // data stored in dst.HostnameOutput, return on the first match + } + } else { + dst.HostnameOutput = nil + } + + // try to unmarshal JSON data into IBANOutput + err = json.Unmarshal(data, &dst.IBANOutput) + if err == nil { + jsonIBANOutput, _ := json.Marshal(dst.IBANOutput) + if string(jsonIBANOutput) == "{}" { // empty struct + dst.IBANOutput = nil + } else { + return nil // data stored in dst.IBANOutput, return on the first match + } + } else { + dst.IBANOutput = nil + } + + // try to unmarshal JSON data into IPv4Output + err = json.Unmarshal(data, &dst.IPv4Output) + if err == nil { + jsonIPv4Output, _ := json.Marshal(dst.IPv4Output) + if string(jsonIPv4Output) == "{}" { // empty struct + dst.IPv4Output = nil + } else { + return nil // data stored in dst.IPv4Output, return on the first match + } + } else { + dst.IPv4Output = nil + } + + // try to unmarshal JSON data into IPv6Output + err = json.Unmarshal(data, &dst.IPv6Output) + if err == nil { + jsonIPv6Output, _ := json.Marshal(dst.IPv6Output) + if string(jsonIPv6Output) == "{}" { // empty struct + dst.IPv6Output = nil + } else { + return nil // data stored in dst.IPv6Output, return on the first match + } + } else { + dst.IPv6Output = nil + } + + // try to unmarshal JSON data into ImphashOutput + err = json.Unmarshal(data, &dst.ImphashOutput) + if err == nil { + jsonImphashOutput, _ := json.Marshal(dst.ImphashOutput) + if string(jsonImphashOutput) == "{}" { // empty struct + dst.ImphashOutput = nil + } else { + return nil // data stored in dst.ImphashOutput, return on the first match + } + } else { + dst.ImphashOutput = nil + } + + // try to unmarshal JSON data into JA3Output + err = json.Unmarshal(data, &dst.JA3Output) + if err == nil { + jsonJA3Output, _ := json.Marshal(dst.JA3Output) + if string(jsonJA3Output) == "{}" { // empty struct + dst.JA3Output = nil + } else { + return nil // data stored in dst.JA3Output, return on the first match + } + } else { + dst.JA3Output = nil + } + + // try to unmarshal JSON data into JARMOutput + err = json.Unmarshal(data, &dst.JARMOutput) + if err == nil { + jsonJARMOutput, _ := json.Marshal(dst.JARMOutput) + if string(jsonJARMOutput) == "{}" { // empty struct + dst.JARMOutput = nil + } else { + return nil // data stored in dst.JARMOutput, return on the first match + } + } else { + dst.JARMOutput = nil + } + + // try to unmarshal JSON data into MD5Output + err = json.Unmarshal(data, &dst.MD5Output) + if err == nil { + jsonMD5Output, _ := json.Marshal(dst.MD5Output) + if string(jsonMD5Output) == "{}" { // empty struct + dst.MD5Output = nil + } else { + return nil // data stored in dst.MD5Output, return on the first match + } + } else { + dst.MD5Output = nil + } + + // try to unmarshal JSON data into MacAddressOutput + err = json.Unmarshal(data, &dst.MacAddressOutput) + if err == nil { + jsonMacAddressOutput, _ := json.Marshal(dst.MacAddressOutput) + if string(jsonMacAddressOutput) == "{}" { // empty struct + dst.MacAddressOutput = nil + } else { + return nil // data stored in dst.MacAddressOutput, return on the first match + } + } else { + dst.MacAddressOutput = nil + } + + // try to unmarshal JSON data into MutexOutput + err = json.Unmarshal(data, &dst.MutexOutput) + if err == nil { + jsonMutexOutput, _ := json.Marshal(dst.MutexOutput) + if string(jsonMutexOutput) == "{}" { // empty struct + dst.MutexOutput = nil + } else { + return nil // data stored in dst.MutexOutput, return on the first match + } + } else { + dst.MutexOutput = nil + } + + // try to unmarshal JSON data into NamedPipeOutput + err = json.Unmarshal(data, &dst.NamedPipeOutput) + if err == nil { + jsonNamedPipeOutput, _ := json.Marshal(dst.NamedPipeOutput) + if string(jsonNamedPipeOutput) == "{}" { // empty struct + dst.NamedPipeOutput = nil + } else { + return nil // data stored in dst.NamedPipeOutput, return on the first match + } + } else { + dst.NamedPipeOutput = nil + } + + // try to unmarshal JSON data into PackageOutput + err = json.Unmarshal(data, &dst.PackageOutput) + if err == nil { + jsonPackageOutput, _ := json.Marshal(dst.PackageOutput) + if string(jsonPackageOutput) == "{}" { // empty struct + dst.PackageOutput = nil + } else { + return nil // data stored in dst.PackageOutput, return on the first match + } + } else { + dst.PackageOutput = nil + } + + // try to unmarshal JSON data into PathOutput + err = json.Unmarshal(data, &dst.PathOutput) + if err == nil { + jsonPathOutput, _ := json.Marshal(dst.PathOutput) + if string(jsonPathOutput) == "{}" { // empty struct + dst.PathOutput = nil + } else { + return nil // data stored in dst.PathOutput, return on the first match + } + } else { + dst.PathOutput = nil + } + + // try to unmarshal JSON data into RegistryKeyOutput + err = json.Unmarshal(data, &dst.RegistryKeyOutput) + if err == nil { + jsonRegistryKeyOutput, _ := json.Marshal(dst.RegistryKeyOutput) + if string(jsonRegistryKeyOutput) == "{}" { // empty struct + dst.RegistryKeyOutput = nil + } else { + return nil // data stored in dst.RegistryKeyOutput, return on the first match + } + } else { + dst.RegistryKeyOutput = nil + } + + // try to unmarshal JSON data into SHA1Output + err = json.Unmarshal(data, &dst.SHA1Output) + if err == nil { + jsonSHA1Output, _ := json.Marshal(dst.SHA1Output) + if string(jsonSHA1Output) == "{}" { // empty struct + dst.SHA1Output = nil + } else { + return nil // data stored in dst.SHA1Output, return on the first match + } + } else { + dst.SHA1Output = nil + } + + // try to unmarshal JSON data into SHA256Output + err = json.Unmarshal(data, &dst.SHA256Output) + if err == nil { + jsonSHA256Output, _ := json.Marshal(dst.SHA256Output) + if string(jsonSHA256Output) == "{}" { // empty struct + dst.SHA256Output = nil + } else { + return nil // data stored in dst.SHA256Output, return on the first match + } + } else { + dst.SHA256Output = nil + } + + // try to unmarshal JSON data into SsdeepOutput + err = json.Unmarshal(data, &dst.SsdeepOutput) + if err == nil { + jsonSsdeepOutput, _ := json.Marshal(dst.SsdeepOutput) + if string(jsonSsdeepOutput) == "{}" { // empty struct + dst.SsdeepOutput = nil + } else { + return nil // data stored in dst.SsdeepOutput, return on the first match + } + } else { + dst.SsdeepOutput = nil + } + + // try to unmarshal JSON data into TLSHOutput + err = json.Unmarshal(data, &dst.TLSHOutput) + if err == nil { + jsonTLSHOutput, _ := json.Marshal(dst.TLSHOutput) + if string(jsonTLSHOutput) == "{}" { // empty struct + dst.TLSHOutput = nil + } else { + return nil // data stored in dst.TLSHOutput, return on the first match + } + } else { + dst.TLSHOutput = nil + } + + // try to unmarshal JSON data into UrlOutput + err = json.Unmarshal(data, &dst.UrlOutput) + if err == nil { + jsonUrlOutput, _ := json.Marshal(dst.UrlOutput) + if string(jsonUrlOutput) == "{}" { // empty struct + dst.UrlOutput = nil + } else { + return nil // data stored in dst.UrlOutput, return on the first match + } + } else { + dst.UrlOutput = nil + } + + // try to unmarshal JSON data into UserAccountOutput + err = json.Unmarshal(data, &dst.UserAccountOutput) + if err == nil { + jsonUserAccountOutput, _ := json.Marshal(dst.UserAccountOutput) + if string(jsonUserAccountOutput) == "{}" { // empty struct + dst.UserAccountOutput = nil + } else { + return nil // data stored in dst.UserAccountOutput, return on the first match + } + } else { + dst.UserAccountOutput = nil + } + + // try to unmarshal JSON data into UserAgentOutput + err = json.Unmarshal(data, &dst.UserAgentOutput) + if err == nil { + jsonUserAgentOutput, _ := json.Marshal(dst.UserAgentOutput) + if string(jsonUserAgentOutput) == "{}" { // empty struct + dst.UserAgentOutput = nil + } else { + return nil // data stored in dst.UserAgentOutput, return on the first match + } + } else { + dst.UserAgentOutput = nil + } + + // try to unmarshal JSON data into WalletOutput + err = json.Unmarshal(data, &dst.WalletOutput) + if err == nil { + jsonWalletOutput, _ := json.Marshal(dst.WalletOutput) + if string(jsonWalletOutput) == "{}" { // empty struct + dst.WalletOutput = nil + } else { + return nil // data stored in dst.WalletOutput, return on the first match + } + } else { + dst.WalletOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponsePatchApiV2ObservablesObservableIdPatch)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponsePatchApiV2ObservablesObservableIdPatch) MarshalJSON() ([]byte, error) { + if src.ASNOutput != nil { + return json.Marshal(&src.ASNOutput) + } + + if src.BICOutput != nil { + return json.Marshal(&src.BICOutput) + } + + if src.CIDROutput != nil { + return json.Marshal(&src.CIDROutput) + } + + if src.CertificateOutput != nil { + return json.Marshal(&src.CertificateOutput) + } + + if src.CommandLineOutput != nil { + return json.Marshal(&src.CommandLineOutput) + } + + if src.DockerImageOutput != nil { + return json.Marshal(&src.DockerImageOutput) + } + + if src.EmailOutput != nil { + return json.Marshal(&src.EmailOutput) + } + + if src.FileOutput != nil { + return json.Marshal(&src.FileOutput) + } + + if src.GenericOutput != nil { + return json.Marshal(&src.GenericOutput) + } + + if src.HostnameOutput != nil { + return json.Marshal(&src.HostnameOutput) + } + + if src.IBANOutput != nil { + return json.Marshal(&src.IBANOutput) + } + + if src.IPv4Output != nil { + return json.Marshal(&src.IPv4Output) + } + + if src.IPv6Output != nil { + return json.Marshal(&src.IPv6Output) + } + + if src.ImphashOutput != nil { + return json.Marshal(&src.ImphashOutput) + } + + if src.JA3Output != nil { + return json.Marshal(&src.JA3Output) + } + + if src.JARMOutput != nil { + return json.Marshal(&src.JARMOutput) + } + + if src.MD5Output != nil { + return json.Marshal(&src.MD5Output) + } + + if src.MacAddressOutput != nil { + return json.Marshal(&src.MacAddressOutput) + } + + if src.MutexOutput != nil { + return json.Marshal(&src.MutexOutput) + } + + if src.NamedPipeOutput != nil { + return json.Marshal(&src.NamedPipeOutput) + } + + if src.PackageOutput != nil { + return json.Marshal(&src.PackageOutput) + } + + if src.PathOutput != nil { + return json.Marshal(&src.PathOutput) + } + + if src.RegistryKeyOutput != nil { + return json.Marshal(&src.RegistryKeyOutput) + } + + if src.SHA1Output != nil { + return json.Marshal(&src.SHA1Output) + } + + if src.SHA256Output != nil { + return json.Marshal(&src.SHA256Output) + } + + if src.SsdeepOutput != nil { + return json.Marshal(&src.SsdeepOutput) + } + + if src.TLSHOutput != nil { + return json.Marshal(&src.TLSHOutput) + } + + if src.UrlOutput != nil { + return json.Marshal(&src.UrlOutput) + } + + if src.UserAccountOutput != nil { + return json.Marshal(&src.UserAccountOutput) + } + + if src.UserAgentOutput != nil { + return json.Marshal(&src.UserAgentOutput) + } + + if src.WalletOutput != nil { + return json.Marshal(&src.WalletOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponsePatchApiV2ObservablesObservableIdPatch struct { + value *ResponsePatchApiV2ObservablesObservableIdPatch + isSet bool +} + +func (v NullableResponsePatchApiV2ObservablesObservableIdPatch) Get() *ResponsePatchApiV2ObservablesObservableIdPatch { + return v.value +} + +func (v *NullableResponsePatchApiV2ObservablesObservableIdPatch) Set(val *ResponsePatchApiV2ObservablesObservableIdPatch) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePatchApiV2ObservablesObservableIdPatch) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePatchApiV2ObservablesObservableIdPatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePatchApiV2ObservablesObservableIdPatch(val *ResponsePatchApiV2ObservablesObservableIdPatch) *NullableResponsePatchApiV2ObservablesObservableIdPatch { + return &NullableResponsePatchApiV2ObservablesObservableIdPatch{value: val, isSet: true} +} + +func (v NullableResponsePatchApiV2ObservablesObservableIdPatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePatchApiV2ObservablesObservableIdPatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_response_toggle_api_v2_tasks__task_name__toggle_post.go b/model_response_toggle_api_v2_tasks__task_name__toggle_post.go new file mode 100644 index 0000000..c6f2d43 --- /dev/null +++ b/model_response_toggle_api_v2_tasks__task_name__toggle_post.go @@ -0,0 +1,139 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ResponseToggleApiV2TasksTaskNameTogglePost struct for ResponseToggleApiV2TasksTaskNameTogglePost +type ResponseToggleApiV2TasksTaskNameTogglePost struct { + AnalyticsTask *AnalyticsTask + ExportTaskOutput *ExportTaskOutput + FeedTask *FeedTask + OneShotTask *OneShotTask +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ResponseToggleApiV2TasksTaskNameTogglePost) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AnalyticsTask + err = json.Unmarshal(data, &dst.AnalyticsTask) + if err == nil { + jsonAnalyticsTask, _ := json.Marshal(dst.AnalyticsTask) + if string(jsonAnalyticsTask) == "{}" { // empty struct + dst.AnalyticsTask = nil + } else { + return nil // data stored in dst.AnalyticsTask, return on the first match + } + } else { + dst.AnalyticsTask = nil + } + + // try to unmarshal JSON data into ExportTaskOutput + err = json.Unmarshal(data, &dst.ExportTaskOutput) + if err == nil { + jsonExportTaskOutput, _ := json.Marshal(dst.ExportTaskOutput) + if string(jsonExportTaskOutput) == "{}" { // empty struct + dst.ExportTaskOutput = nil + } else { + return nil // data stored in dst.ExportTaskOutput, return on the first match + } + } else { + dst.ExportTaskOutput = nil + } + + // try to unmarshal JSON data into FeedTask + err = json.Unmarshal(data, &dst.FeedTask) + if err == nil { + jsonFeedTask, _ := json.Marshal(dst.FeedTask) + if string(jsonFeedTask) == "{}" { // empty struct + dst.FeedTask = nil + } else { + return nil // data stored in dst.FeedTask, return on the first match + } + } else { + dst.FeedTask = nil + } + + // try to unmarshal JSON data into OneShotTask + err = json.Unmarshal(data, &dst.OneShotTask) + if err == nil { + jsonOneShotTask, _ := json.Marshal(dst.OneShotTask) + if string(jsonOneShotTask) == "{}" { // empty struct + dst.OneShotTask = nil + } else { + return nil // data stored in dst.OneShotTask, return on the first match + } + } else { + dst.OneShotTask = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ResponseToggleApiV2TasksTaskNameTogglePost)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseToggleApiV2TasksTaskNameTogglePost) MarshalJSON() ([]byte, error) { + if src.AnalyticsTask != nil { + return json.Marshal(&src.AnalyticsTask) + } + + if src.ExportTaskOutput != nil { + return json.Marshal(&src.ExportTaskOutput) + } + + if src.FeedTask != nil { + return json.Marshal(&src.FeedTask) + } + + if src.OneShotTask != nil { + return json.Marshal(&src.OneShotTask) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableResponseToggleApiV2TasksTaskNameTogglePost struct { + value *ResponseToggleApiV2TasksTaskNameTogglePost + isSet bool +} + +func (v NullableResponseToggleApiV2TasksTaskNameTogglePost) Get() *ResponseToggleApiV2TasksTaskNameTogglePost { + return v.value +} + +func (v *NullableResponseToggleApiV2TasksTaskNameTogglePost) Set(val *ResponseToggleApiV2TasksTaskNameTogglePost) { + v.value = val + v.isSet = true +} + +func (v NullableResponseToggleApiV2TasksTaskNameTogglePost) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseToggleApiV2TasksTaskNameTogglePost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseToggleApiV2TasksTaskNameTogglePost(val *ResponseToggleApiV2TasksTaskNameTogglePost) *NullableResponseToggleApiV2TasksTaskNameTogglePost { + return &NullableResponseToggleApiV2TasksTaskNameTogglePost{value: val, isSet: true} +} + +func (v NullableResponseToggleApiV2TasksTaskNameTogglePost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseToggleApiV2TasksTaskNameTogglePost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_search_query.go b/model_search_query.go new file mode 100644 index 0000000..fbf2474 --- /dev/null +++ b/model_search_query.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// SearchQuery struct for SearchQuery +type SearchQuery struct { + String *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *SearchQuery) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into String + err = json.Unmarshal(data, &dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + return nil // data stored in dst.String, return on the first match + } + } else { + dst.String = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(SearchQuery)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src SearchQuery) MarshalJSON() ([]byte, error) { + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableSearchQuery struct { + value *SearchQuery + isSet bool +} + +func (v NullableSearchQuery) Get() *SearchQuery { + return v.value +} + +func (v *NullableSearchQuery) Set(val *SearchQuery) { + v.value = val + v.isSet = true +} + +func (v NullableSearchQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableSearchQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSearchQuery(val *SearchQuery) *NullableSearchQuery { + return &NullableSearchQuery{value: val, isSet: true} +} + +func (v NullableSearchQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSearchQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_search_user_request.go b/model_search_user_request.go new file mode 100644 index 0000000..b5cbfe6 --- /dev/null +++ b/model_search_user_request.go @@ -0,0 +1,248 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the SearchUserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SearchUserRequest{} + +// SearchUserRequest struct for SearchUserRequest +type SearchUserRequest struct { + Username string `json:"username"` + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _SearchUserRequest SearchUserRequest + +// NewSearchUserRequest instantiates a new SearchUserRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSearchUserRequest(username string) *SearchUserRequest { + this := SearchUserRequest{} + this.Username = username + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// NewSearchUserRequestWithDefaults instantiates a new SearchUserRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSearchUserRequestWithDefaults() *SearchUserRequest { + this := SearchUserRequest{} + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// GetUsername returns the Username field value +func (o *SearchUserRequest) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *SearchUserRequest) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *SearchUserRequest) SetUsername(v string) { + o.Username = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *SearchUserRequest) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchUserRequest) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *SearchUserRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *SearchUserRequest) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *SearchUserRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchUserRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *SearchUserRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *SearchUserRequest) SetPage(v int32) { + o.Page = &v +} + +func (o SearchUserRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SearchUserRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SearchUserRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "username", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSearchUserRequest := _SearchUserRequest{} + + err = json.Unmarshal(data, &varSearchUserRequest) + + if err != nil { + return err + } + + *o = SearchUserRequest(varSearchUserRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "username") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSearchUserRequest struct { + value *SearchUserRequest + isSet bool +} + +func (v NullableSearchUserRequest) Get() *SearchUserRequest { + return v.value +} + +func (v *NullableSearchUserRequest) Set(val *SearchUserRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSearchUserRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSearchUserRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSearchUserRequest(val *SearchUserRequest) *NullableSearchUserRequest { + return &NullableSearchUserRequest{value: val, isSet: true} +} + +func (v NullableSearchUserRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSearchUserRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_search_user_response.go b/model_search_user_response.go new file mode 100644 index 0000000..97bb55f --- /dev/null +++ b/model_search_user_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the SearchUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SearchUserResponse{} + +// SearchUserResponse struct for SearchUserResponse +type SearchUserResponse struct { + Users []User `json:"users"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _SearchUserResponse SearchUserResponse + +// NewSearchUserResponse instantiates a new SearchUserResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSearchUserResponse(users []User, total int32) *SearchUserResponse { + this := SearchUserResponse{} + this.Users = users + this.Total = total + return &this +} + +// NewSearchUserResponseWithDefaults instantiates a new SearchUserResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSearchUserResponseWithDefaults() *SearchUserResponse { + this := SearchUserResponse{} + return &this +} + +// GetUsers returns the Users field value +func (o *SearchUserResponse) GetUsers() []User { + if o == nil { + var ret []User + return ret + } + + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value +// and a boolean to check if the value has been set. +func (o *SearchUserResponse) GetUsersOk() ([]User, bool) { + if o == nil { + return nil, false + } + return o.Users, true +} + +// SetUsers sets field value +func (o *SearchUserResponse) SetUsers(v []User) { + o.Users = v +} + +// GetTotal returns the Total field value +func (o *SearchUserResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *SearchUserResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *SearchUserResponse) SetTotal(v int32) { + o.Total = v +} + +func (o SearchUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SearchUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["users"] = o.Users + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SearchUserResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "users", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSearchUserResponse := _SearchUserResponse{} + + err = json.Unmarshal(data, &varSearchUserResponse) + + if err != nil { + return err + } + + *o = SearchUserResponse(varSearchUserResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "users") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSearchUserResponse struct { + value *SearchUserResponse + isSet bool +} + +func (v NullableSearchUserResponse) Get() *SearchUserResponse { + return v.value +} + +func (v *NullableSearchUserResponse) Set(val *SearchUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSearchUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSearchUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSearchUserResponse(val *SearchUserResponse) *NullableSearchUserResponse { + return &NullableSearchUserResponse{value: val, isSet: true} +} + +func (v NullableSearchUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSearchUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_severity_type.go b/model_severity_type.go new file mode 100644 index 0000000..b50be8c --- /dev/null +++ b/model_severity_type.go @@ -0,0 +1,116 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// SeverityType the model 'SeverityType' +type SeverityType string + +// List of SeverityType +const ( + NONE SeverityType = "none" + LOW SeverityType = "low" + MEDIUM SeverityType = "medium" + HIGH SeverityType = "high" + CRITICAL SeverityType = "critical" +) + +// All allowed values of SeverityType enum +var AllowedSeverityTypeEnumValues = []SeverityType{ + "none", + "low", + "medium", + "high", + "critical", +} + +func (v *SeverityType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := SeverityType(value) + for _, existing := range AllowedSeverityTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid SeverityType", value) +} + +// NewSeverityTypeFromValue returns a pointer to a valid SeverityType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewSeverityTypeFromValue(v string) (*SeverityType, error) { + ev := SeverityType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SeverityType: valid values are %v", v, AllowedSeverityTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v SeverityType) IsValid() bool { + for _, existing := range AllowedSeverityTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SeverityType value +func (v SeverityType) Ptr() *SeverityType { + return &v +} + +type NullableSeverityType struct { + value *SeverityType + isSet bool +} + +func (v NullableSeverityType) Get() *SeverityType { + return v.value +} + +func (v *NullableSeverityType) Set(val *SeverityType) { + v.value = val + v.isSet = true +} + +func (v NullableSeverityType) IsSet() bool { + return v.isSet +} + +func (v *NullableSeverityType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSeverityType(val *SeverityType) *NullableSeverityType { + return &NullableSeverityType{value: val, isSet: true} +} + +func (v NullableSeverityType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSeverityType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_sha1_input.go b/model_sha1_input.go new file mode 100644 index 0000000..e978868 --- /dev/null +++ b/model_sha1_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SHA1Input type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SHA1Input{} + +// SHA1Input struct for SHA1Input +type SHA1Input struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _SHA1Input SHA1Input + +// NewSHA1Input instantiates a new SHA1Input object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSHA1Input(value string) *SHA1Input { + this := SHA1Input{} + this.Value = value + var type_ string = "sha1" + this.Type = &type_ + return &this +} + +// NewSHA1InputWithDefaults instantiates a new SHA1Input object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSHA1InputWithDefaults() *SHA1Input { + this := SHA1Input{} + var type_ string = "sha1" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *SHA1Input) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *SHA1Input) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *SHA1Input) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SHA1Input) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA1Input) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SHA1Input) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SHA1Input) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SHA1Input) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA1Input) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SHA1Input) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SHA1Input) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *SHA1Input) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA1Input) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *SHA1Input) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *SHA1Input) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *SHA1Input) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA1Input) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *SHA1Input) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *SHA1Input) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o SHA1Input) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SHA1Input) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *SHA1Input) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSHA1Input := _SHA1Input{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSHA1Input) + + if err != nil { + return err + } + + *o = SHA1Input(varSHA1Input) + + return err +} + +type NullableSHA1Input struct { + value *SHA1Input + isSet bool +} + +func (v NullableSHA1Input) Get() *SHA1Input { + return v.value +} + +func (v *NullableSHA1Input) Set(val *SHA1Input) { + v.value = val + v.isSet = true +} + +func (v NullableSHA1Input) IsSet() bool { + return v.isSet +} + +func (v *NullableSHA1Input) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSHA1Input(val *SHA1Input) *NullableSHA1Input { + return &NullableSHA1Input{value: val, isSet: true} +} + +func (v NullableSHA1Input) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSHA1Input) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_sha1_output.go b/model_sha1_output.go new file mode 100644 index 0000000..a39f60d --- /dev/null +++ b/model_sha1_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SHA1Output type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SHA1Output{} + +// SHA1Output struct for SHA1Output +type SHA1Output struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _SHA1Output SHA1Output + +// NewSHA1Output instantiates a new SHA1Output object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSHA1Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *SHA1Output { + this := SHA1Output{} + this.Value = value + var type_ string = "sha1" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewSHA1OutputWithDefaults instantiates a new SHA1Output object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSHA1OutputWithDefaults() *SHA1Output { + this := SHA1Output{} + var type_ string = "sha1" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *SHA1Output) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *SHA1Output) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *SHA1Output) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SHA1Output) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA1Output) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SHA1Output) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SHA1Output) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SHA1Output) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA1Output) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SHA1Output) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SHA1Output) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *SHA1Output) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA1Output) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *SHA1Output) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *SHA1Output) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *SHA1Output) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA1Output) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *SHA1Output) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *SHA1Output) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *SHA1Output) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SHA1Output) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SHA1Output) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *SHA1Output) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *SHA1Output) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *SHA1Output) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *SHA1Output) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *SHA1Output) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *SHA1Output) SetRootType(v string) { + o.RootType = v +} + +func (o SHA1Output) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SHA1Output) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *SHA1Output) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSHA1Output := _SHA1Output{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSHA1Output) + + if err != nil { + return err + } + + *o = SHA1Output(varSHA1Output) + + return err +} + +type NullableSHA1Output struct { + value *SHA1Output + isSet bool +} + +func (v NullableSHA1Output) Get() *SHA1Output { + return v.value +} + +func (v *NullableSHA1Output) Set(val *SHA1Output) { + v.value = val + v.isSet = true +} + +func (v NullableSHA1Output) IsSet() bool { + return v.isSet +} + +func (v *NullableSHA1Output) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSHA1Output(val *SHA1Output) *NullableSHA1Output { + return &NullableSHA1Output{value: val, isSet: true} +} + +func (v NullableSHA1Output) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSHA1Output) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_sha256_input.go b/model_sha256_input.go new file mode 100644 index 0000000..b78554b --- /dev/null +++ b/model_sha256_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SHA256Input type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SHA256Input{} + +// SHA256Input struct for SHA256Input +type SHA256Input struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _SHA256Input SHA256Input + +// NewSHA256Input instantiates a new SHA256Input object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSHA256Input(value string) *SHA256Input { + this := SHA256Input{} + this.Value = value + var type_ string = "sha256" + this.Type = &type_ + return &this +} + +// NewSHA256InputWithDefaults instantiates a new SHA256Input object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSHA256InputWithDefaults() *SHA256Input { + this := SHA256Input{} + var type_ string = "sha256" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *SHA256Input) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *SHA256Input) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *SHA256Input) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SHA256Input) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA256Input) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SHA256Input) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SHA256Input) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SHA256Input) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA256Input) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SHA256Input) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SHA256Input) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *SHA256Input) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA256Input) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *SHA256Input) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *SHA256Input) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *SHA256Input) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA256Input) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *SHA256Input) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *SHA256Input) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o SHA256Input) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SHA256Input) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *SHA256Input) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSHA256Input := _SHA256Input{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSHA256Input) + + if err != nil { + return err + } + + *o = SHA256Input(varSHA256Input) + + return err +} + +type NullableSHA256Input struct { + value *SHA256Input + isSet bool +} + +func (v NullableSHA256Input) Get() *SHA256Input { + return v.value +} + +func (v *NullableSHA256Input) Set(val *SHA256Input) { + v.value = val + v.isSet = true +} + +func (v NullableSHA256Input) IsSet() bool { + return v.isSet +} + +func (v *NullableSHA256Input) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSHA256Input(val *SHA256Input) *NullableSHA256Input { + return &NullableSHA256Input{value: val, isSet: true} +} + +func (v NullableSHA256Input) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSHA256Input) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_sha256_output.go b/model_sha256_output.go new file mode 100644 index 0000000..08a3ce1 --- /dev/null +++ b/model_sha256_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SHA256Output type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SHA256Output{} + +// SHA256Output struct for SHA256Output +type SHA256Output struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _SHA256Output SHA256Output + +// NewSHA256Output instantiates a new SHA256Output object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSHA256Output(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *SHA256Output { + this := SHA256Output{} + this.Value = value + var type_ string = "sha256" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewSHA256OutputWithDefaults instantiates a new SHA256Output object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSHA256OutputWithDefaults() *SHA256Output { + this := SHA256Output{} + var type_ string = "sha256" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *SHA256Output) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *SHA256Output) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *SHA256Output) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SHA256Output) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA256Output) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SHA256Output) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SHA256Output) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SHA256Output) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA256Output) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SHA256Output) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SHA256Output) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *SHA256Output) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA256Output) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *SHA256Output) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *SHA256Output) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *SHA256Output) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SHA256Output) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *SHA256Output) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *SHA256Output) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *SHA256Output) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SHA256Output) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SHA256Output) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *SHA256Output) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *SHA256Output) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *SHA256Output) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *SHA256Output) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *SHA256Output) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *SHA256Output) SetRootType(v string) { + o.RootType = v +} + +func (o SHA256Output) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SHA256Output) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *SHA256Output) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSHA256Output := _SHA256Output{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSHA256Output) + + if err != nil { + return err + } + + *o = SHA256Output(varSHA256Output) + + return err +} + +type NullableSHA256Output struct { + value *SHA256Output + isSet bool +} + +func (v NullableSHA256Output) Get() *SHA256Output { + return v.value +} + +func (v *NullableSHA256Output) Set(val *SHA256Output) { + v.value = val + v.isSet = true +} + +func (v NullableSHA256Output) IsSet() bool { + return v.isSet +} + +func (v *NullableSHA256Output) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSHA256Output(val *SHA256Output) *NullableSHA256Output { + return &NullableSHA256Output{value: val, isSet: true} +} + +func (v NullableSHA256Output) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSHA256Output) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_sigma_input.go b/model_sigma_input.go new file mode 100644 index 0000000..7540df4 --- /dev/null +++ b/model_sigma_input.go @@ -0,0 +1,549 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SigmaInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SigmaInput{} + +// SigmaInput Represents a Sigma rule. Parsing and matching is yet TODO. +type SigmaInput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` +} + +type _SigmaInput SigmaInput + +// NewSigmaInput instantiates a new SigmaInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSigmaInput(name string, pattern string, diamond DiamondModel) *SigmaInput { + this := SigmaInput{} + this.Name = name + var type_ string = "sigma" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + return &this +} + +// NewSigmaInputWithDefaults instantiates a new SigmaInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSigmaInputWithDefaults() *SigmaInput { + this := SigmaInput{} + var type_ string = "sigma" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *SigmaInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SigmaInput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SigmaInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SigmaInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SigmaInput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *SigmaInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *SigmaInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *SigmaInput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SigmaInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SigmaInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SigmaInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *SigmaInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *SigmaInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *SigmaInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *SigmaInput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *SigmaInput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *SigmaInput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *SigmaInput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *SigmaInput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *SigmaInput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *SigmaInput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *SigmaInput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *SigmaInput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *SigmaInput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *SigmaInput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *SigmaInput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *SigmaInput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *SigmaInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *SigmaInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *SigmaInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *SigmaInput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaInput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *SigmaInput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *SigmaInput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +func (o SigmaInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SigmaInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + return toSerialize, nil +} + +func (o *SigmaInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSigmaInput := _SigmaInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSigmaInput) + + if err != nil { + return err + } + + *o = SigmaInput(varSigmaInput) + + return err +} + +type NullableSigmaInput struct { + value *SigmaInput + isSet bool +} + +func (v NullableSigmaInput) Get() *SigmaInput { + return v.value +} + +func (v *NullableSigmaInput) Set(val *SigmaInput) { + v.value = val + v.isSet = true +} + +func (v NullableSigmaInput) IsSet() bool { + return v.isSet +} + +func (v *NullableSigmaInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSigmaInput(val *SigmaInput) *NullableSigmaInput { + return &NullableSigmaInput{value: val, isSet: true} +} + +func (v NullableSigmaInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSigmaInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_sigma_output.go b/model_sigma_output.go new file mode 100644 index 0000000..01ae4a7 --- /dev/null +++ b/model_sigma_output.go @@ -0,0 +1,633 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SigmaOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SigmaOutput{} + +// SigmaOutput Represents a Sigma rule. Parsing and matching is yet TODO. +type SigmaOutput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _SigmaOutput SigmaOutput + +// NewSigmaOutput instantiates a new SigmaOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSigmaOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string) *SigmaOutput { + this := SigmaOutput{} + this.Name = name + var type_ string = "sigma" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewSigmaOutputWithDefaults instantiates a new SigmaOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSigmaOutputWithDefaults() *SigmaOutput { + this := SigmaOutput{} + var type_ string = "sigma" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *SigmaOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SigmaOutput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SigmaOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SigmaOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SigmaOutput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *SigmaOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *SigmaOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *SigmaOutput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SigmaOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SigmaOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SigmaOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *SigmaOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *SigmaOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *SigmaOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *SigmaOutput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *SigmaOutput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *SigmaOutput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *SigmaOutput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *SigmaOutput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *SigmaOutput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *SigmaOutput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *SigmaOutput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *SigmaOutput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *SigmaOutput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *SigmaOutput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *SigmaOutput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *SigmaOutput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *SigmaOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *SigmaOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *SigmaOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *SigmaOutput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *SigmaOutput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *SigmaOutput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetId returns the Id field value +func (o *SigmaOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SigmaOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *SigmaOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *SigmaOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *SigmaOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *SigmaOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *SigmaOutput) SetRootType(v string) { + o.RootType = v +} + +func (o SigmaOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SigmaOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *SigmaOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSigmaOutput := _SigmaOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSigmaOutput) + + if err != nil { + return err + } + + *o = SigmaOutput(varSigmaOutput) + + return err +} + +type NullableSigmaOutput struct { + value *SigmaOutput + isSet bool +} + +func (v NullableSigmaOutput) Get() *SigmaOutput { + return v.value +} + +func (v *NullableSigmaOutput) Set(val *SigmaOutput) { + v.value = val + v.isSet = true +} + +func (v NullableSigmaOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableSigmaOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSigmaOutput(val *SigmaOutput) *NullableSigmaOutput { + return &NullableSigmaOutput{value: val, isSet: true} +} + +func (v NullableSigmaOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSigmaOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_ssdeep_input.go b/model_ssdeep_input.go new file mode 100644 index 0000000..3dadc25 --- /dev/null +++ b/model_ssdeep_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SsdeepInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SsdeepInput{} + +// SsdeepInput struct for SsdeepInput +type SsdeepInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _SsdeepInput SsdeepInput + +// NewSsdeepInput instantiates a new SsdeepInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSsdeepInput(value string) *SsdeepInput { + this := SsdeepInput{} + this.Value = value + var type_ string = "ssdeep" + this.Type = &type_ + return &this +} + +// NewSsdeepInputWithDefaults instantiates a new SsdeepInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSsdeepInputWithDefaults() *SsdeepInput { + this := SsdeepInput{} + var type_ string = "ssdeep" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *SsdeepInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *SsdeepInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *SsdeepInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SsdeepInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsdeepInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SsdeepInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SsdeepInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SsdeepInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsdeepInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SsdeepInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SsdeepInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *SsdeepInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsdeepInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *SsdeepInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *SsdeepInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *SsdeepInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsdeepInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *SsdeepInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *SsdeepInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o SsdeepInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SsdeepInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *SsdeepInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSsdeepInput := _SsdeepInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSsdeepInput) + + if err != nil { + return err + } + + *o = SsdeepInput(varSsdeepInput) + + return err +} + +type NullableSsdeepInput struct { + value *SsdeepInput + isSet bool +} + +func (v NullableSsdeepInput) Get() *SsdeepInput { + return v.value +} + +func (v *NullableSsdeepInput) Set(val *SsdeepInput) { + v.value = val + v.isSet = true +} + +func (v NullableSsdeepInput) IsSet() bool { + return v.isSet +} + +func (v *NullableSsdeepInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSsdeepInput(val *SsdeepInput) *NullableSsdeepInput { + return &NullableSsdeepInput{value: val, isSet: true} +} + +func (v NullableSsdeepInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSsdeepInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_ssdeep_output.go b/model_ssdeep_output.go new file mode 100644 index 0000000..e60377c --- /dev/null +++ b/model_ssdeep_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SsdeepOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SsdeepOutput{} + +// SsdeepOutput struct for SsdeepOutput +type SsdeepOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _SsdeepOutput SsdeepOutput + +// NewSsdeepOutput instantiates a new SsdeepOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSsdeepOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *SsdeepOutput { + this := SsdeepOutput{} + this.Value = value + var type_ string = "ssdeep" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewSsdeepOutputWithDefaults instantiates a new SsdeepOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSsdeepOutputWithDefaults() *SsdeepOutput { + this := SsdeepOutput{} + var type_ string = "ssdeep" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *SsdeepOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *SsdeepOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *SsdeepOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SsdeepOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsdeepOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SsdeepOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SsdeepOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SsdeepOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsdeepOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SsdeepOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SsdeepOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *SsdeepOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsdeepOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *SsdeepOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *SsdeepOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *SsdeepOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsdeepOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *SsdeepOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *SsdeepOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *SsdeepOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SsdeepOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SsdeepOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *SsdeepOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *SsdeepOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *SsdeepOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *SsdeepOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *SsdeepOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *SsdeepOutput) SetRootType(v string) { + o.RootType = v +} + +func (o SsdeepOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SsdeepOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *SsdeepOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSsdeepOutput := _SsdeepOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSsdeepOutput) + + if err != nil { + return err + } + + *o = SsdeepOutput(varSsdeepOutput) + + return err +} + +type NullableSsdeepOutput struct { + value *SsdeepOutput + isSet bool +} + +func (v NullableSsdeepOutput) Get() *SsdeepOutput { + return v.value +} + +func (v *NullableSsdeepOutput) Set(val *SsdeepOutput) { + v.value = val + v.isSet = true +} + +func (v NullableSsdeepOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableSsdeepOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSsdeepOutput(val *SsdeepOutput) *NullableSsdeepOutput { + return &NullableSsdeepOutput{value: val, isSet: true} +} + +func (v NullableSsdeepOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSsdeepOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_suricata_input.go b/model_suricata_input.go new file mode 100644 index 0000000..034c912 --- /dev/null +++ b/model_suricata_input.go @@ -0,0 +1,661 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SuricataInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SuricataInput{} + +// SuricataInput Represents a Suricata rule. Parsing and matching is yet TODO. +type SuricataInput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + Sid *int32 `json:"sid,omitempty"` + Metadata []string `json:"metadata,omitempty"` + References []string `json:"references,omitempty"` +} + +type _SuricataInput SuricataInput + +// NewSuricataInput instantiates a new SuricataInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSuricataInput(name string, pattern string, diamond DiamondModel) *SuricataInput { + this := SuricataInput{} + this.Name = name + var type_ string = "suricata" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + var sid int32 = 0 + this.Sid = &sid + return &this +} + +// NewSuricataInputWithDefaults instantiates a new SuricataInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSuricataInputWithDefaults() *SuricataInput { + this := SuricataInput{} + var type_ string = "suricata" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + var sid int32 = 0 + this.Sid = &sid + return &this +} + +// GetName returns the Name field value +func (o *SuricataInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SuricataInput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SuricataInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SuricataInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SuricataInput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *SuricataInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *SuricataInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *SuricataInput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SuricataInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SuricataInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SuricataInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *SuricataInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *SuricataInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *SuricataInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *SuricataInput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *SuricataInput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *SuricataInput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *SuricataInput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *SuricataInput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *SuricataInput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *SuricataInput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *SuricataInput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *SuricataInput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *SuricataInput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *SuricataInput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *SuricataInput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *SuricataInput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *SuricataInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *SuricataInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *SuricataInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *SuricataInput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *SuricataInput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *SuricataInput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetSid returns the Sid field value if set, zero value otherwise. +func (o *SuricataInput) GetSid() int32 { + if o == nil || IsNil(o.Sid) { + var ret int32 + return ret + } + return *o.Sid +} + +// GetSidOk returns a tuple with the Sid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetSidOk() (*int32, bool) { + if o == nil || IsNil(o.Sid) { + return nil, false + } + return o.Sid, true +} + +// HasSid returns a boolean if a field has been set. +func (o *SuricataInput) HasSid() bool { + if o != nil && !IsNil(o.Sid) { + return true + } + + return false +} + +// SetSid gets a reference to the given int32 and assigns it to the Sid field. +func (o *SuricataInput) SetSid(v int32) { + o.Sid = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *SuricataInput) GetMetadata() []string { + if o == nil || IsNil(o.Metadata) { + var ret []string + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetMetadataOk() ([]string, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *SuricataInput) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given []string and assigns it to the Metadata field. +func (o *SuricataInput) SetMetadata(v []string) { + o.Metadata = v +} + +// GetReferences returns the References field value if set, zero value otherwise. +func (o *SuricataInput) GetReferences() []string { + if o == nil || IsNil(o.References) { + var ret []string + return ret + } + return o.References +} + +// GetReferencesOk returns a tuple with the References field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataInput) GetReferencesOk() ([]string, bool) { + if o == nil || IsNil(o.References) { + return nil, false + } + return o.References, true +} + +// HasReferences returns a boolean if a field has been set. +func (o *SuricataInput) HasReferences() bool { + if o != nil && !IsNil(o.References) { + return true + } + + return false +} + +// SetReferences gets a reference to the given []string and assigns it to the References field. +func (o *SuricataInput) SetReferences(v []string) { + o.References = v +} + +func (o SuricataInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SuricataInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + if !IsNil(o.Sid) { + toSerialize["sid"] = o.Sid + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.References) { + toSerialize["references"] = o.References + } + return toSerialize, nil +} + +func (o *SuricataInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSuricataInput := _SuricataInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSuricataInput) + + if err != nil { + return err + } + + *o = SuricataInput(varSuricataInput) + + return err +} + +type NullableSuricataInput struct { + value *SuricataInput + isSet bool +} + +func (v NullableSuricataInput) Get() *SuricataInput { + return v.value +} + +func (v *NullableSuricataInput) Set(val *SuricataInput) { + v.value = val + v.isSet = true +} + +func (v NullableSuricataInput) IsSet() bool { + return v.isSet +} + +func (v *NullableSuricataInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSuricataInput(val *SuricataInput) *NullableSuricataInput { + return &NullableSuricataInput{value: val, isSet: true} +} + +func (v NullableSuricataInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSuricataInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_suricata_output.go b/model_suricata_output.go new file mode 100644 index 0000000..542e9e8 --- /dev/null +++ b/model_suricata_output.go @@ -0,0 +1,745 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SuricataOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SuricataOutput{} + +// SuricataOutput Represents a Suricata rule. Parsing and matching is yet TODO. +type SuricataOutput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + Sid *int32 `json:"sid,omitempty"` + Metadata []string `json:"metadata,omitempty"` + References []string `json:"references,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _SuricataOutput SuricataOutput + +// NewSuricataOutput instantiates a new SuricataOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSuricataOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string) *SuricataOutput { + this := SuricataOutput{} + this.Name = name + var type_ string = "suricata" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + var sid int32 = 0 + this.Sid = &sid + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewSuricataOutputWithDefaults instantiates a new SuricataOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSuricataOutputWithDefaults() *SuricataOutput { + this := SuricataOutput{} + var type_ string = "suricata" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + var sid int32 = 0 + this.Sid = &sid + return &this +} + +// GetName returns the Name field value +func (o *SuricataOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SuricataOutput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SuricataOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SuricataOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SuricataOutput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *SuricataOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *SuricataOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *SuricataOutput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *SuricataOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *SuricataOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *SuricataOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *SuricataOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *SuricataOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *SuricataOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *SuricataOutput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *SuricataOutput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *SuricataOutput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *SuricataOutput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *SuricataOutput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *SuricataOutput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *SuricataOutput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *SuricataOutput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *SuricataOutput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *SuricataOutput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *SuricataOutput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *SuricataOutput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *SuricataOutput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *SuricataOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *SuricataOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *SuricataOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *SuricataOutput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *SuricataOutput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *SuricataOutput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetSid returns the Sid field value if set, zero value otherwise. +func (o *SuricataOutput) GetSid() int32 { + if o == nil || IsNil(o.Sid) { + var ret int32 + return ret + } + return *o.Sid +} + +// GetSidOk returns a tuple with the Sid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetSidOk() (*int32, bool) { + if o == nil || IsNil(o.Sid) { + return nil, false + } + return o.Sid, true +} + +// HasSid returns a boolean if a field has been set. +func (o *SuricataOutput) HasSid() bool { + if o != nil && !IsNil(o.Sid) { + return true + } + + return false +} + +// SetSid gets a reference to the given int32 and assigns it to the Sid field. +func (o *SuricataOutput) SetSid(v int32) { + o.Sid = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *SuricataOutput) GetMetadata() []string { + if o == nil || IsNil(o.Metadata) { + var ret []string + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetMetadataOk() ([]string, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *SuricataOutput) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given []string and assigns it to the Metadata field. +func (o *SuricataOutput) SetMetadata(v []string) { + o.Metadata = v +} + +// GetReferences returns the References field value if set, zero value otherwise. +func (o *SuricataOutput) GetReferences() []string { + if o == nil || IsNil(o.References) { + var ret []string + return ret + } + return o.References +} + +// GetReferencesOk returns a tuple with the References field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetReferencesOk() ([]string, bool) { + if o == nil || IsNil(o.References) { + return nil, false + } + return o.References, true +} + +// HasReferences returns a boolean if a field has been set. +func (o *SuricataOutput) HasReferences() bool { + if o != nil && !IsNil(o.References) { + return true + } + + return false +} + +// SetReferences gets a reference to the given []string and assigns it to the References field. +func (o *SuricataOutput) SetReferences(v []string) { + o.References = v +} + +// GetId returns the Id field value +func (o *SuricataOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SuricataOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *SuricataOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *SuricataOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *SuricataOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *SuricataOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *SuricataOutput) SetRootType(v string) { + o.RootType = v +} + +func (o SuricataOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SuricataOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + if !IsNil(o.Sid) { + toSerialize["sid"] = o.Sid + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.References) { + toSerialize["references"] = o.References + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *SuricataOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSuricataOutput := _SuricataOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSuricataOutput) + + if err != nil { + return err + } + + *o = SuricataOutput(varSuricataOutput) + + return err +} + +type NullableSuricataOutput struct { + value *SuricataOutput + isSet bool +} + +func (v NullableSuricataOutput) Get() *SuricataOutput { + return v.value +} + +func (v *NullableSuricataOutput) Set(val *SuricataOutput) { + v.value = val + v.isSet = true +} + +func (v NullableSuricataOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableSuricataOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSuricataOutput(val *SuricataOutput) *NullableSuricataOutput { + return &NullableSuricataOutput{value: val, isSet: true} +} + +func (v NullableSuricataOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSuricataOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_system_config_response.go b/model_system_config_response.go new file mode 100644 index 0000000..c744992 --- /dev/null +++ b/model_system_config_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the SystemConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SystemConfigResponse{} + +// SystemConfigResponse System config template. +type SystemConfigResponse struct { + Auth map[string]interface{} `json:"auth"` + System map[string]interface{} `json:"system"` + AdditionalProperties map[string]interface{} +} + +type _SystemConfigResponse SystemConfigResponse + +// NewSystemConfigResponse instantiates a new SystemConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSystemConfigResponse(auth map[string]interface{}, system map[string]interface{}) *SystemConfigResponse { + this := SystemConfigResponse{} + this.Auth = auth + this.System = system + return &this +} + +// NewSystemConfigResponseWithDefaults instantiates a new SystemConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSystemConfigResponseWithDefaults() *SystemConfigResponse { + this := SystemConfigResponse{} + return &this +} + +// GetAuth returns the Auth field value +func (o *SystemConfigResponse) GetAuth() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Auth +} + +// GetAuthOk returns a tuple with the Auth field value +// and a boolean to check if the value has been set. +func (o *SystemConfigResponse) GetAuthOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Auth, true +} + +// SetAuth sets field value +func (o *SystemConfigResponse) SetAuth(v map[string]interface{}) { + o.Auth = v +} + +// GetSystem returns the System field value +func (o *SystemConfigResponse) GetSystem() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.System +} + +// GetSystemOk returns a tuple with the System field value +// and a boolean to check if the value has been set. +func (o *SystemConfigResponse) GetSystemOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.System, true +} + +// SetSystem sets field value +func (o *SystemConfigResponse) SetSystem(v map[string]interface{}) { + o.System = v +} + +func (o SystemConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SystemConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["auth"] = o.Auth + toSerialize["system"] = o.System + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SystemConfigResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "auth", + "system", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSystemConfigResponse := _SystemConfigResponse{} + + err = json.Unmarshal(data, &varSystemConfigResponse) + + if err != nil { + return err + } + + *o = SystemConfigResponse(varSystemConfigResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "auth") + delete(additionalProperties, "system") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSystemConfigResponse struct { + value *SystemConfigResponse + isSet bool +} + +func (v NullableSystemConfigResponse) Get() *SystemConfigResponse { + return v.value +} + +func (v *NullableSystemConfigResponse) Set(val *SystemConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSystemConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSystemConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSystemConfigResponse(val *SystemConfigResponse) *NullableSystemConfigResponse { + return &NullableSystemConfigResponse{value: val, isSet: true} +} + +func (v NullableSystemConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSystemConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tag.go b/model_tag.go new file mode 100644 index 0000000..0b4d555 --- /dev/null +++ b/model_tag.go @@ -0,0 +1,373 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Tag type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Tag{} + +// Tag struct for Tag +type Tag struct { + Name string `json:"name"` + Count *int32 `json:"count,omitempty"` + Created *time.Time `json:"created,omitempty"` + DefaultExpiration *string `json:"default_expiration,omitempty"` + Produces []string `json:"produces,omitempty"` + Replaces []string `json:"replaces,omitempty"` + Id string `json:"id"` +} + +type _Tag Tag + +// NewTag instantiates a new Tag object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTag(name string, id string) *Tag { + this := Tag{} + this.Name = name + var count int32 = 0 + this.Count = &count + var defaultExpiration string = "P90D" + this.DefaultExpiration = &defaultExpiration + this.Id = id + return &this +} + +// NewTagWithDefaults instantiates a new Tag object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagWithDefaults() *Tag { + this := Tag{} + var count int32 = 0 + this.Count = &count + var defaultExpiration string = "P90D" + this.DefaultExpiration = &defaultExpiration + return &this +} + +// GetName returns the Name field value +func (o *Tag) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Tag) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Tag) SetName(v string) { + o.Name = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Tag) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *Tag) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *Tag) SetCount(v int32) { + o.Count = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *Tag) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *Tag) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *Tag) SetCreated(v time.Time) { + o.Created = &v +} + +// GetDefaultExpiration returns the DefaultExpiration field value if set, zero value otherwise. +func (o *Tag) GetDefaultExpiration() string { + if o == nil || IsNil(o.DefaultExpiration) { + var ret string + return ret + } + return *o.DefaultExpiration +} + +// GetDefaultExpirationOk returns a tuple with the DefaultExpiration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetDefaultExpirationOk() (*string, bool) { + if o == nil || IsNil(o.DefaultExpiration) { + return nil, false + } + return o.DefaultExpiration, true +} + +// HasDefaultExpiration returns a boolean if a field has been set. +func (o *Tag) HasDefaultExpiration() bool { + if o != nil && !IsNil(o.DefaultExpiration) { + return true + } + + return false +} + +// SetDefaultExpiration gets a reference to the given string and assigns it to the DefaultExpiration field. +func (o *Tag) SetDefaultExpiration(v string) { + o.DefaultExpiration = &v +} + +// GetProduces returns the Produces field value if set, zero value otherwise. +func (o *Tag) GetProduces() []string { + if o == nil || IsNil(o.Produces) { + var ret []string + return ret + } + return o.Produces +} + +// GetProducesOk returns a tuple with the Produces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetProducesOk() ([]string, bool) { + if o == nil || IsNil(o.Produces) { + return nil, false + } + return o.Produces, true +} + +// HasProduces returns a boolean if a field has been set. +func (o *Tag) HasProduces() bool { + if o != nil && !IsNil(o.Produces) { + return true + } + + return false +} + +// SetProduces gets a reference to the given []string and assigns it to the Produces field. +func (o *Tag) SetProduces(v []string) { + o.Produces = v +} + +// GetReplaces returns the Replaces field value if set, zero value otherwise. +func (o *Tag) GetReplaces() []string { + if o == nil || IsNil(o.Replaces) { + var ret []string + return ret + } + return o.Replaces +} + +// GetReplacesOk returns a tuple with the Replaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetReplacesOk() ([]string, bool) { + if o == nil || IsNil(o.Replaces) { + return nil, false + } + return o.Replaces, true +} + +// HasReplaces returns a boolean if a field has been set. +func (o *Tag) HasReplaces() bool { + if o != nil && !IsNil(o.Replaces) { + return true + } + + return false +} + +// SetReplaces gets a reference to the given []string and assigns it to the Replaces field. +func (o *Tag) SetReplaces(v []string) { + o.Replaces = v +} + +// GetId returns the Id field value +func (o *Tag) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Tag) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Tag) SetId(v string) { + o.Id = v +} + +func (o Tag) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Tag) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.DefaultExpiration) { + toSerialize["default_expiration"] = o.DefaultExpiration + } + if !IsNil(o.Produces) { + toSerialize["produces"] = o.Produces + } + if !IsNil(o.Replaces) { + toSerialize["replaces"] = o.Replaces + } + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *Tag) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTag := _Tag{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTag) + + if err != nil { + return err + } + + *o = Tag(varTag) + + return err +} + +type NullableTag struct { + value *Tag + isSet bool +} + +func (v NullableTag) Get() *Tag { + return v.value +} + +func (v *NullableTag) Set(val *Tag) { + v.value = val + v.isSet = true +} + +func (v NullableTag) IsSet() bool { + return v.isSet +} + +func (v *NullableTag) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTag(val *Tag) *NullableTag { + return &NullableTag{value: val, isSet: true} +} + +func (v NullableTag) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTag) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tag_relationship_input.go b/model_tag_relationship_input.go new file mode 100644 index 0000000..653ce71 --- /dev/null +++ b/model_tag_relationship_input.go @@ -0,0 +1,288 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TagRelationshipInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TagRelationshipInput{} + +// TagRelationshipInput struct for TagRelationshipInput +type TagRelationshipInput struct { + Source string `json:"source"` + Target string `json:"target"` + LastSeen time.Time `json:"last_seen"` + Expires NullableTime `json:"expires,omitempty"` + Fresh bool `json:"fresh"` +} + +type _TagRelationshipInput TagRelationshipInput + +// NewTagRelationshipInput instantiates a new TagRelationshipInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTagRelationshipInput(source string, target string, lastSeen time.Time, fresh bool) *TagRelationshipInput { + this := TagRelationshipInput{} + this.Source = source + this.Target = target + this.LastSeen = lastSeen + this.Fresh = fresh + return &this +} + +// NewTagRelationshipInputWithDefaults instantiates a new TagRelationshipInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagRelationshipInputWithDefaults() *TagRelationshipInput { + this := TagRelationshipInput{} + return &this +} + +// GetSource returns the Source field value +func (o *TagRelationshipInput) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipInput) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *TagRelationshipInput) SetSource(v string) { + o.Source = v +} + +// GetTarget returns the Target field value +func (o *TagRelationshipInput) GetTarget() string { + if o == nil { + var ret string + return ret + } + + return o.Target +} + +// GetTargetOk returns a tuple with the Target field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipInput) GetTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Target, true +} + +// SetTarget sets field value +func (o *TagRelationshipInput) SetTarget(v string) { + o.Target = v +} + +// GetLastSeen returns the LastSeen field value +func (o *TagRelationshipInput) GetLastSeen() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipInput) GetLastSeenOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastSeen, true +} + +// SetLastSeen sets field value +func (o *TagRelationshipInput) SetLastSeen(v time.Time) { + o.LastSeen = v +} + +// GetExpires returns the Expires field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TagRelationshipInput) GetExpires() time.Time { + if o == nil || IsNil(o.Expires.Get()) { + var ret time.Time + return ret + } + return *o.Expires.Get() +} + +// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TagRelationshipInput) GetExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Expires.Get(), o.Expires.IsSet() +} + +// HasExpires returns a boolean if a field has been set. +func (o *TagRelationshipInput) HasExpires() bool { + if o != nil && o.Expires.IsSet() { + return true + } + + return false +} + +// SetExpires gets a reference to the given NullableTime and assigns it to the Expires field. +func (o *TagRelationshipInput) SetExpires(v time.Time) { + o.Expires.Set(&v) +} + +// SetExpiresNil sets the value for Expires to be an explicit nil +func (o *TagRelationshipInput) SetExpiresNil() { + o.Expires.Set(nil) +} + +// UnsetExpires ensures that no value is present for Expires, not even an explicit nil +func (o *TagRelationshipInput) UnsetExpires() { + o.Expires.Unset() +} + +// GetFresh returns the Fresh field value +func (o *TagRelationshipInput) GetFresh() bool { + if o == nil { + var ret bool + return ret + } + + return o.Fresh +} + +// GetFreshOk returns a tuple with the Fresh field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipInput) GetFreshOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Fresh, true +} + +// SetFresh sets field value +func (o *TagRelationshipInput) SetFresh(v bool) { + o.Fresh = v +} + +func (o TagRelationshipInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TagRelationshipInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source"] = o.Source + toSerialize["target"] = o.Target + toSerialize["last_seen"] = o.LastSeen + if o.Expires.IsSet() { + toSerialize["expires"] = o.Expires.Get() + } + toSerialize["fresh"] = o.Fresh + return toSerialize, nil +} + +func (o *TagRelationshipInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source", + "target", + "last_seen", + "fresh", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTagRelationshipInput := _TagRelationshipInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTagRelationshipInput) + + if err != nil { + return err + } + + *o = TagRelationshipInput(varTagRelationshipInput) + + return err +} + +type NullableTagRelationshipInput struct { + value *TagRelationshipInput + isSet bool +} + +func (v NullableTagRelationshipInput) Get() *TagRelationshipInput { + return v.value +} + +func (v *NullableTagRelationshipInput) Set(val *TagRelationshipInput) { + v.value = val + v.isSet = true +} + +func (v NullableTagRelationshipInput) IsSet() bool { + return v.isSet +} + +func (v *NullableTagRelationshipInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTagRelationshipInput(val *TagRelationshipInput) *NullableTagRelationshipInput { + return &NullableTagRelationshipInput{value: val, isSet: true} +} + +func (v NullableTagRelationshipInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTagRelationshipInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tag_relationship_output.go b/model_tag_relationship_output.go new file mode 100644 index 0000000..ae7b31e --- /dev/null +++ b/model_tag_relationship_output.go @@ -0,0 +1,316 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TagRelationshipOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TagRelationshipOutput{} + +// TagRelationshipOutput struct for TagRelationshipOutput +type TagRelationshipOutput struct { + Source string `json:"source"` + Target string `json:"target"` + LastSeen time.Time `json:"last_seen"` + Expires NullableTime `json:"expires,omitempty"` + Fresh bool `json:"fresh"` + Id string `json:"id"` +} + +type _TagRelationshipOutput TagRelationshipOutput + +// NewTagRelationshipOutput instantiates a new TagRelationshipOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTagRelationshipOutput(source string, target string, lastSeen time.Time, fresh bool, id string) *TagRelationshipOutput { + this := TagRelationshipOutput{} + this.Source = source + this.Target = target + this.LastSeen = lastSeen + this.Fresh = fresh + this.Id = id + return &this +} + +// NewTagRelationshipOutputWithDefaults instantiates a new TagRelationshipOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagRelationshipOutputWithDefaults() *TagRelationshipOutput { + this := TagRelationshipOutput{} + return &this +} + +// GetSource returns the Source field value +func (o *TagRelationshipOutput) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipOutput) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *TagRelationshipOutput) SetSource(v string) { + o.Source = v +} + +// GetTarget returns the Target field value +func (o *TagRelationshipOutput) GetTarget() string { + if o == nil { + var ret string + return ret + } + + return o.Target +} + +// GetTargetOk returns a tuple with the Target field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipOutput) GetTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Target, true +} + +// SetTarget sets field value +func (o *TagRelationshipOutput) SetTarget(v string) { + o.Target = v +} + +// GetLastSeen returns the LastSeen field value +func (o *TagRelationshipOutput) GetLastSeen() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipOutput) GetLastSeenOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastSeen, true +} + +// SetLastSeen sets field value +func (o *TagRelationshipOutput) SetLastSeen(v time.Time) { + o.LastSeen = v +} + +// GetExpires returns the Expires field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TagRelationshipOutput) GetExpires() time.Time { + if o == nil || IsNil(o.Expires.Get()) { + var ret time.Time + return ret + } + return *o.Expires.Get() +} + +// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TagRelationshipOutput) GetExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Expires.Get(), o.Expires.IsSet() +} + +// HasExpires returns a boolean if a field has been set. +func (o *TagRelationshipOutput) HasExpires() bool { + if o != nil && o.Expires.IsSet() { + return true + } + + return false +} + +// SetExpires gets a reference to the given NullableTime and assigns it to the Expires field. +func (o *TagRelationshipOutput) SetExpires(v time.Time) { + o.Expires.Set(&v) +} + +// SetExpiresNil sets the value for Expires to be an explicit nil +func (o *TagRelationshipOutput) SetExpiresNil() { + o.Expires.Set(nil) +} + +// UnsetExpires ensures that no value is present for Expires, not even an explicit nil +func (o *TagRelationshipOutput) UnsetExpires() { + o.Expires.Unset() +} + +// GetFresh returns the Fresh field value +func (o *TagRelationshipOutput) GetFresh() bool { + if o == nil { + var ret bool + return ret + } + + return o.Fresh +} + +// GetFreshOk returns a tuple with the Fresh field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipOutput) GetFreshOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Fresh, true +} + +// SetFresh sets field value +func (o *TagRelationshipOutput) SetFresh(v bool) { + o.Fresh = v +} + +// GetId returns the Id field value +func (o *TagRelationshipOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TagRelationshipOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TagRelationshipOutput) SetId(v string) { + o.Id = v +} + +func (o TagRelationshipOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TagRelationshipOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source"] = o.Source + toSerialize["target"] = o.Target + toSerialize["last_seen"] = o.LastSeen + if o.Expires.IsSet() { + toSerialize["expires"] = o.Expires.Get() + } + toSerialize["fresh"] = o.Fresh + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *TagRelationshipOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source", + "target", + "last_seen", + "fresh", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTagRelationshipOutput := _TagRelationshipOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTagRelationshipOutput) + + if err != nil { + return err + } + + *o = TagRelationshipOutput(varTagRelationshipOutput) + + return err +} + +type NullableTagRelationshipOutput struct { + value *TagRelationshipOutput + isSet bool +} + +func (v NullableTagRelationshipOutput) Get() *TagRelationshipOutput { + return v.value +} + +func (v *NullableTagRelationshipOutput) Set(val *TagRelationshipOutput) { + v.value = val + v.isSet = true +} + +func (v NullableTagRelationshipOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableTagRelationshipOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTagRelationshipOutput(val *TagRelationshipOutput) *NullableTagRelationshipOutput { + return &NullableTagRelationshipOutput{value: val, isSet: true} +} + +func (v NullableTagRelationshipOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTagRelationshipOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tag_search_request.go b/model_tag_search_request.go new file mode 100644 index 0000000..11f3508 --- /dev/null +++ b/model_tag_search_request.go @@ -0,0 +1,306 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the TagSearchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TagSearchRequest{} + +// TagSearchRequest struct for TagSearchRequest +type TagSearchRequest struct { + Name *Name `json:"name,omitempty"` + Produces []string `json:"produces,omitempty"` + Replaces []string `json:"replaces,omitempty"` + Count int32 `json:"count"` + Page int32 `json:"page"` + AdditionalProperties map[string]interface{} +} + +type _TagSearchRequest TagSearchRequest + +// NewTagSearchRequest instantiates a new TagSearchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTagSearchRequest(count int32, page int32) *TagSearchRequest { + this := TagSearchRequest{} + this.Count = count + this.Page = page + return &this +} + +// NewTagSearchRequestWithDefaults instantiates a new TagSearchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagSearchRequestWithDefaults() *TagSearchRequest { + this := TagSearchRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TagSearchRequest) GetName() Name { + if o == nil || IsNil(o.Name) { + var ret Name + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagSearchRequest) GetNameOk() (*Name, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TagSearchRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given Name and assigns it to the Name field. +func (o *TagSearchRequest) SetName(v Name) { + o.Name = &v +} + +// GetProduces returns the Produces field value if set, zero value otherwise. +func (o *TagSearchRequest) GetProduces() []string { + if o == nil || IsNil(o.Produces) { + var ret []string + return ret + } + return o.Produces +} + +// GetProducesOk returns a tuple with the Produces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagSearchRequest) GetProducesOk() ([]string, bool) { + if o == nil || IsNil(o.Produces) { + return nil, false + } + return o.Produces, true +} + +// HasProduces returns a boolean if a field has been set. +func (o *TagSearchRequest) HasProduces() bool { + if o != nil && !IsNil(o.Produces) { + return true + } + + return false +} + +// SetProduces gets a reference to the given []string and assigns it to the Produces field. +func (o *TagSearchRequest) SetProduces(v []string) { + o.Produces = v +} + +// GetReplaces returns the Replaces field value if set, zero value otherwise. +func (o *TagSearchRequest) GetReplaces() []string { + if o == nil || IsNil(o.Replaces) { + var ret []string + return ret + } + return o.Replaces +} + +// GetReplacesOk returns a tuple with the Replaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagSearchRequest) GetReplacesOk() ([]string, bool) { + if o == nil || IsNil(o.Replaces) { + return nil, false + } + return o.Replaces, true +} + +// HasReplaces returns a boolean if a field has been set. +func (o *TagSearchRequest) HasReplaces() bool { + if o != nil && !IsNil(o.Replaces) { + return true + } + + return false +} + +// SetReplaces gets a reference to the given []string and assigns it to the Replaces field. +func (o *TagSearchRequest) SetReplaces(v []string) { + o.Replaces = v +} + +// GetCount returns the Count field value +func (o *TagSearchRequest) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *TagSearchRequest) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *TagSearchRequest) SetCount(v int32) { + o.Count = v +} + +// GetPage returns the Page field value +func (o *TagSearchRequest) GetPage() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *TagSearchRequest) GetPageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *TagSearchRequest) SetPage(v int32) { + o.Page = v +} + +func (o TagSearchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TagSearchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Produces) { + toSerialize["produces"] = o.Produces + } + if !IsNil(o.Replaces) { + toSerialize["replaces"] = o.Replaces + } + toSerialize["count"] = o.Count + toSerialize["page"] = o.Page + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TagSearchRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "page", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTagSearchRequest := _TagSearchRequest{} + + err = json.Unmarshal(data, &varTagSearchRequest) + + if err != nil { + return err + } + + *o = TagSearchRequest(varTagSearchRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "produces") + delete(additionalProperties, "replaces") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTagSearchRequest struct { + value *TagSearchRequest + isSet bool +} + +func (v NullableTagSearchRequest) Get() *TagSearchRequest { + return v.value +} + +func (v *NullableTagSearchRequest) Set(val *TagSearchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTagSearchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTagSearchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTagSearchRequest(val *TagSearchRequest) *NullableTagSearchRequest { + return &NullableTagSearchRequest{value: val, isSet: true} +} + +func (v NullableTagSearchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTagSearchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tag_search_response.go b/model_tag_search_response.go new file mode 100644 index 0000000..4af765d --- /dev/null +++ b/model_tag_search_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the TagSearchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TagSearchResponse{} + +// TagSearchResponse struct for TagSearchResponse +type TagSearchResponse struct { + Tags []Tag `json:"tags"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _TagSearchResponse TagSearchResponse + +// NewTagSearchResponse instantiates a new TagSearchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTagSearchResponse(tags []Tag, total int32) *TagSearchResponse { + this := TagSearchResponse{} + this.Tags = tags + this.Total = total + return &this +} + +// NewTagSearchResponseWithDefaults instantiates a new TagSearchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagSearchResponseWithDefaults() *TagSearchResponse { + this := TagSearchResponse{} + return &this +} + +// GetTags returns the Tags field value +func (o *TagSearchResponse) GetTags() []Tag { + if o == nil { + var ret []Tag + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *TagSearchResponse) GetTagsOk() ([]Tag, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *TagSearchResponse) SetTags(v []Tag) { + o.Tags = v +} + +// GetTotal returns the Total field value +func (o *TagSearchResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *TagSearchResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *TagSearchResponse) SetTotal(v int32) { + o.Total = v +} + +func (o TagSearchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TagSearchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tags"] = o.Tags + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TagSearchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tags", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTagSearchResponse := _TagSearchResponse{} + + err = json.Unmarshal(data, &varTagSearchResponse) + + if err != nil { + return err + } + + *o = TagSearchResponse(varTagSearchResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tags") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTagSearchResponse struct { + value *TagSearchResponse + isSet bool +} + +func (v NullableTagSearchResponse) Get() *TagSearchResponse { + return v.value +} + +func (v *NullableTagSearchResponse) Set(val *TagSearchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTagSearchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTagSearchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTagSearchResponse(val *TagSearchResponse) *NullableTagSearchResponse { + return &NullableTagSearchResponse{value: val, isSet: true} +} + +func (v NullableTagSearchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTagSearchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_task_params.go b/model_task_params.go new file mode 100644 index 0000000..ce82c15 --- /dev/null +++ b/model_task_params.go @@ -0,0 +1,124 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the TaskParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskParams{} + +// TaskParams struct for TaskParams +type TaskParams struct { + Params map[string]interface{} `json:"params,omitempty"` +} + +// NewTaskParams instantiates a new TaskParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskParams() *TaskParams { + this := TaskParams{} + return &this +} + +// NewTaskParamsWithDefaults instantiates a new TaskParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskParamsWithDefaults() *TaskParams { + this := TaskParams{} + return &this +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *TaskParams) GetParams() map[string]interface{} { + if o == nil || IsNil(o.Params) { + var ret map[string]interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskParams) GetParamsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Params) { + return map[string]interface{}{}, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *TaskParams) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]interface{} and assigns it to the Params field. +func (o *TaskParams) SetParams(v map[string]interface{}) { + o.Params = v +} + +func (o TaskParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + return toSerialize, nil +} + +type NullableTaskParams struct { + value *TaskParams + isSet bool +} + +func (v NullableTaskParams) Get() *TaskParams { + return v.value +} + +func (v *NullableTaskParams) Set(val *TaskParams) { + v.value = val + v.isSet = true +} + +func (v NullableTaskParams) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskParams(val *TaskParams) *NullableTaskParams { + return &NullableTaskParams{value: val, isSet: true} +} + +func (v NullableTaskParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_task_search_request.go b/model_task_search_request.go new file mode 100644 index 0000000..b455f42 --- /dev/null +++ b/model_task_search_request.go @@ -0,0 +1,309 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the TaskSearchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskSearchRequest{} + +// TaskSearchRequest struct for TaskSearchRequest +type TaskSearchRequest struct { + Query map[string]QueryValue `json:"query,omitempty"` + Type *TaskSearchRequestType `json:"type,omitempty"` + Sorting [][]interface{} `json:"sorting,omitempty"` + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _TaskSearchRequest TaskSearchRequest + +// NewTaskSearchRequest instantiates a new TaskSearchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskSearchRequest() *TaskSearchRequest { + this := TaskSearchRequest{} + var count int32 = 100 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// NewTaskSearchRequestWithDefaults instantiates a new TaskSearchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskSearchRequestWithDefaults() *TaskSearchRequest { + this := TaskSearchRequest{} + var count int32 = 100 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *TaskSearchRequest) GetQuery() map[string]QueryValue { + if o == nil || IsNil(o.Query) { + var ret map[string]QueryValue + return ret + } + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskSearchRequest) GetQueryOk() (map[string]QueryValue, bool) { + if o == nil || IsNil(o.Query) { + return map[string]QueryValue{}, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *TaskSearchRequest) HasQuery() bool { + if o != nil && !IsNil(o.Query) { + return true + } + + return false +} + +// SetQuery gets a reference to the given map[string]QueryValue and assigns it to the Query field. +func (o *TaskSearchRequest) SetQuery(v map[string]QueryValue) { + o.Query = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TaskSearchRequest) GetType() TaskSearchRequestType { + if o == nil || IsNil(o.Type) { + var ret TaskSearchRequestType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskSearchRequest) GetTypeOk() (*TaskSearchRequestType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *TaskSearchRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given TaskSearchRequestType and assigns it to the Type field. +func (o *TaskSearchRequest) SetType(v TaskSearchRequestType) { + o.Type = &v +} + +// GetSorting returns the Sorting field value if set, zero value otherwise. +func (o *TaskSearchRequest) GetSorting() [][]interface{} { + if o == nil || IsNil(o.Sorting) { + var ret [][]interface{} + return ret + } + return o.Sorting +} + +// GetSortingOk returns a tuple with the Sorting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskSearchRequest) GetSortingOk() ([][]interface{}, bool) { + if o == nil || IsNil(o.Sorting) { + return nil, false + } + return o.Sorting, true +} + +// HasSorting returns a boolean if a field has been set. +func (o *TaskSearchRequest) HasSorting() bool { + if o != nil && !IsNil(o.Sorting) { + return true + } + + return false +} + +// SetSorting gets a reference to the given [][]interface{} and assigns it to the Sorting field. +func (o *TaskSearchRequest) SetSorting(v [][]interface{}) { + o.Sorting = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *TaskSearchRequest) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskSearchRequest) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *TaskSearchRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *TaskSearchRequest) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *TaskSearchRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskSearchRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *TaskSearchRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *TaskSearchRequest) SetPage(v int32) { + o.Page = &v +} + +func (o TaskSearchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskSearchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Query) { + toSerialize["query"] = o.Query + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Sorting) { + toSerialize["sorting"] = o.Sorting + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TaskSearchRequest) UnmarshalJSON(data []byte) (err error) { + varTaskSearchRequest := _TaskSearchRequest{} + + err = json.Unmarshal(data, &varTaskSearchRequest) + + if err != nil { + return err + } + + *o = TaskSearchRequest(varTaskSearchRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "query") + delete(additionalProperties, "type") + delete(additionalProperties, "sorting") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTaskSearchRequest struct { + value *TaskSearchRequest + isSet bool +} + +func (v NullableTaskSearchRequest) Get() *TaskSearchRequest { + return v.value +} + +func (v *NullableTaskSearchRequest) Set(val *TaskSearchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTaskSearchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskSearchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskSearchRequest(val *TaskSearchRequest) *NullableTaskSearchRequest { + return &NullableTaskSearchRequest{value: val, isSet: true} +} + +func (v NullableTaskSearchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskSearchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_task_search_request_type.go b/model_task_search_request_type.go new file mode 100644 index 0000000..3d7c7e1 --- /dev/null +++ b/model_task_search_request_type.go @@ -0,0 +1,90 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// TaskSearchRequestType struct for TaskSearchRequestType +type TaskSearchRequestType struct { + TaskType *TaskType +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *TaskSearchRequestType) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // try to unmarshal JSON data into TaskType + err = json.Unmarshal(data, &dst.TaskType) + if err == nil { + jsonTaskType, _ := json.Marshal(dst.TaskType) + if string(jsonTaskType) == "{}" { // empty struct + dst.TaskType = nil + } else { + return nil // data stored in dst.TaskType, return on the first match + } + } else { + dst.TaskType = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(TaskSearchRequestType)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src TaskSearchRequestType) MarshalJSON() ([]byte, error) { + if src.TaskType != nil { + return json.Marshal(&src.TaskType) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableTaskSearchRequestType struct { + value *TaskSearchRequestType + isSet bool +} + +func (v NullableTaskSearchRequestType) Get() *TaskSearchRequestType { + return v.value +} + +func (v *NullableTaskSearchRequestType) Set(val *TaskSearchRequestType) { + v.value = val + v.isSet = true +} + +func (v NullableTaskSearchRequestType) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskSearchRequestType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskSearchRequestType(val *TaskSearchRequestType) *NullableTaskSearchRequestType { + return &NullableTaskSearchRequestType{value: val, isSet: true} +} + +func (v NullableTaskSearchRequestType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskSearchRequestType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_task_search_response.go b/model_task_search_response.go new file mode 100644 index 0000000..3163cf9 --- /dev/null +++ b/model_task_search_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the TaskSearchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskSearchResponse{} + +// TaskSearchResponse struct for TaskSearchResponse +type TaskSearchResponse struct { + Tasks []TasksInner `json:"tasks"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _TaskSearchResponse TaskSearchResponse + +// NewTaskSearchResponse instantiates a new TaskSearchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskSearchResponse(tasks []TasksInner, total int32) *TaskSearchResponse { + this := TaskSearchResponse{} + this.Tasks = tasks + this.Total = total + return &this +} + +// NewTaskSearchResponseWithDefaults instantiates a new TaskSearchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskSearchResponseWithDefaults() *TaskSearchResponse { + this := TaskSearchResponse{} + return &this +} + +// GetTasks returns the Tasks field value +func (o *TaskSearchResponse) GetTasks() []TasksInner { + if o == nil { + var ret []TasksInner + return ret + } + + return o.Tasks +} + +// GetTasksOk returns a tuple with the Tasks field value +// and a boolean to check if the value has been set. +func (o *TaskSearchResponse) GetTasksOk() ([]TasksInner, bool) { + if o == nil { + return nil, false + } + return o.Tasks, true +} + +// SetTasks sets field value +func (o *TaskSearchResponse) SetTasks(v []TasksInner) { + o.Tasks = v +} + +// GetTotal returns the Total field value +func (o *TaskSearchResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *TaskSearchResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *TaskSearchResponse) SetTotal(v int32) { + o.Total = v +} + +func (o TaskSearchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskSearchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tasks"] = o.Tasks + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TaskSearchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tasks", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTaskSearchResponse := _TaskSearchResponse{} + + err = json.Unmarshal(data, &varTaskSearchResponse) + + if err != nil { + return err + } + + *o = TaskSearchResponse(varTaskSearchResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tasks") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTaskSearchResponse struct { + value *TaskSearchResponse + isSet bool +} + +func (v NullableTaskSearchResponse) Get() *TaskSearchResponse { + return v.value +} + +func (v *NullableTaskSearchResponse) Set(val *TaskSearchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTaskSearchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskSearchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskSearchResponse(val *TaskSearchResponse) *NullableTaskSearchResponse { + return &NullableTaskSearchResponse{value: val, isSet: true} +} + +func (v NullableTaskSearchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskSearchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_task_status.go b/model_task_status.go new file mode 100644 index 0000000..2687ec5 --- /dev/null +++ b/model_task_status.go @@ -0,0 +1,114 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// TaskStatus the model 'TaskStatus' +type TaskStatus string + +// List of TaskStatus +const ( + IDLE TaskStatus = "idle" + RUNNING TaskStatus = "running" + COMPLETED TaskStatus = "completed" + FAILED TaskStatus = "failed" +) + +// All allowed values of TaskStatus enum +var AllowedTaskStatusEnumValues = []TaskStatus{ + "idle", + "running", + "completed", + "failed", +} + +func (v *TaskStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := TaskStatus(value) + for _, existing := range AllowedTaskStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid TaskStatus", value) +} + +// NewTaskStatusFromValue returns a pointer to a valid TaskStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewTaskStatusFromValue(v string) (*TaskStatus, error) { + ev := TaskStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for TaskStatus: valid values are %v", v, AllowedTaskStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v TaskStatus) IsValid() bool { + for _, existing := range AllowedTaskStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TaskStatus value +func (v TaskStatus) Ptr() *TaskStatus { + return &v +} + +type NullableTaskStatus struct { + value *TaskStatus + isSet bool +} + +func (v NullableTaskStatus) Get() *TaskStatus { + return v.value +} + +func (v *NullableTaskStatus) Set(val *TaskStatus) { + v.value = val + v.isSet = true +} + +func (v NullableTaskStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskStatus(val *TaskStatus) *NullableTaskStatus { + return &NullableTaskStatus{value: val, isSet: true} +} + +func (v NullableTaskStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_task_type.go b/model_task_type.go new file mode 100644 index 0000000..e535699 --- /dev/null +++ b/model_task_type.go @@ -0,0 +1,116 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// TaskType the model 'TaskType' +type TaskType string + +// List of TaskType +const ( + FEED TaskType = "feed" + ANALYTICS TaskType = "analytics" + EXPORT TaskType = "export" + ONESHOT TaskType = "oneshot" + INLINE TaskType = "inline" +) + +// All allowed values of TaskType enum +var AllowedTaskTypeEnumValues = []TaskType{ + "feed", + "analytics", + "export", + "oneshot", + "inline", +} + +func (v *TaskType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := TaskType(value) + for _, existing := range AllowedTaskTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid TaskType", value) +} + +// NewTaskTypeFromValue returns a pointer to a valid TaskType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewTaskTypeFromValue(v string) (*TaskType, error) { + ev := TaskType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for TaskType: valid values are %v", v, AllowedTaskTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v TaskType) IsValid() bool { + for _, existing := range AllowedTaskTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TaskType value +func (v TaskType) Ptr() *TaskType { + return &v +} + +type NullableTaskType struct { + value *TaskType + isSet bool +} + +func (v NullableTaskType) Get() *TaskType { + return v.value +} + +func (v *NullableTaskType) Set(val *TaskType) { + v.value = val + v.isSet = true +} + +func (v NullableTaskType) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskType(val *TaskType) *NullableTaskType { + return &NullableTaskType{value: val, isSet: true} +} + +func (v NullableTaskType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tasks_inner.go b/model_tasks_inner.go new file mode 100644 index 0000000..3bfb19c --- /dev/null +++ b/model_tasks_inner.go @@ -0,0 +1,139 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// TasksInner struct for TasksInner +type TasksInner struct { + AnalyticsTask *AnalyticsTask + ExportTaskOutput *ExportTaskOutput + FeedTask *FeedTask + OneShotTask *OneShotTask +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *TasksInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AnalyticsTask + err = json.Unmarshal(data, &dst.AnalyticsTask) + if err == nil { + jsonAnalyticsTask, _ := json.Marshal(dst.AnalyticsTask) + if string(jsonAnalyticsTask) == "{}" { // empty struct + dst.AnalyticsTask = nil + } else { + return nil // data stored in dst.AnalyticsTask, return on the first match + } + } else { + dst.AnalyticsTask = nil + } + + // try to unmarshal JSON data into ExportTaskOutput + err = json.Unmarshal(data, &dst.ExportTaskOutput) + if err == nil { + jsonExportTaskOutput, _ := json.Marshal(dst.ExportTaskOutput) + if string(jsonExportTaskOutput) == "{}" { // empty struct + dst.ExportTaskOutput = nil + } else { + return nil // data stored in dst.ExportTaskOutput, return on the first match + } + } else { + dst.ExportTaskOutput = nil + } + + // try to unmarshal JSON data into FeedTask + err = json.Unmarshal(data, &dst.FeedTask) + if err == nil { + jsonFeedTask, _ := json.Marshal(dst.FeedTask) + if string(jsonFeedTask) == "{}" { // empty struct + dst.FeedTask = nil + } else { + return nil // data stored in dst.FeedTask, return on the first match + } + } else { + dst.FeedTask = nil + } + + // try to unmarshal JSON data into OneShotTask + err = json.Unmarshal(data, &dst.OneShotTask) + if err == nil { + jsonOneShotTask, _ := json.Marshal(dst.OneShotTask) + if string(jsonOneShotTask) == "{}" { // empty struct + dst.OneShotTask = nil + } else { + return nil // data stored in dst.OneShotTask, return on the first match + } + } else { + dst.OneShotTask = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(TasksInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src TasksInner) MarshalJSON() ([]byte, error) { + if src.AnalyticsTask != nil { + return json.Marshal(&src.AnalyticsTask) + } + + if src.ExportTaskOutput != nil { + return json.Marshal(&src.ExportTaskOutput) + } + + if src.FeedTask != nil { + return json.Marshal(&src.FeedTask) + } + + if src.OneShotTask != nil { + return json.Marshal(&src.OneShotTask) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableTasksInner struct { + value *TasksInner + isSet bool +} + +func (v NullableTasksInner) Get() *TasksInner { + return v.value +} + +func (v *NullableTasksInner) Set(val *TasksInner) { + v.value = val + v.isSet = true +} + +func (v NullableTasksInner) IsSet() bool { + return v.isSet +} + +func (v *NullableTasksInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTasksInner(val *TasksInner) *NullableTasksInner { + return &NullableTasksInner{value: val, isSet: true} +} + +func (v NullableTasksInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTasksInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_template.go b/model_template.go new file mode 100644 index 0000000..27662d4 --- /dev/null +++ b/model_template.go @@ -0,0 +1,184 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Template type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Template{} + +// Template A template for exporting data to an external system. +type Template struct { + Name string `json:"name"` + Template string `json:"template"` +} + +type _Template Template + +// NewTemplate instantiates a new Template object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplate(name string, template string) *Template { + this := Template{} + this.Name = name + this.Template = template + return &this +} + +// NewTemplateWithDefaults instantiates a new Template object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateWithDefaults() *Template { + this := Template{} + return &this +} + +// GetName returns the Name field value +func (o *Template) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Template) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Template) SetName(v string) { + o.Name = v +} + +// GetTemplate returns the Template field value +func (o *Template) GetTemplate() string { + if o == nil { + var ret string + return ret + } + + return o.Template +} + +// GetTemplateOk returns a tuple with the Template field value +// and a boolean to check if the value has been set. +func (o *Template) GetTemplateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Template, true +} + +// SetTemplate sets field value +func (o *Template) SetTemplate(v string) { + o.Template = v +} + +func (o Template) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Template) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["template"] = o.Template + return toSerialize, nil +} + +func (o *Template) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "template", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTemplate := _Template{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTemplate) + + if err != nil { + return err + } + + *o = Template(varTemplate) + + return err +} + +type NullableTemplate struct { + value *Template + isSet bool +} + +func (v NullableTemplate) Get() *Template { + return v.value +} + +func (v *NullableTemplate) Set(val *Template) { + v.value = val + v.isSet = true +} + +func (v NullableTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplate(val *Template) *NullableTemplate { + return &NullableTemplate{value: val, isSet: true} +} + +func (v NullableTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_template_search_request.go b/model_template_search_request.go new file mode 100644 index 0000000..757c6f4 --- /dev/null +++ b/model_template_search_request.go @@ -0,0 +1,239 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" +) + +// checks if the TemplateSearchRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateSearchRequest{} + +// TemplateSearchRequest struct for TemplateSearchRequest +type TemplateSearchRequest struct { + Name *string `json:"name,omitempty"` + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _TemplateSearchRequest TemplateSearchRequest + +// NewTemplateSearchRequest instantiates a new TemplateSearchRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSearchRequest() *TemplateSearchRequest { + this := TemplateSearchRequest{} + var name string = "" + this.Name = &name + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// NewTemplateSearchRequestWithDefaults instantiates a new TemplateSearchRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSearchRequestWithDefaults() *TemplateSearchRequest { + this := TemplateSearchRequest{} + var name string = "" + this.Name = &name + var count int32 = 50 + this.Count = &count + var page int32 = 0 + this.Page = &page + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TemplateSearchRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSearchRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TemplateSearchRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TemplateSearchRequest) SetName(v string) { + o.Name = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *TemplateSearchRequest) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSearchRequest) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *TemplateSearchRequest) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *TemplateSearchRequest) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *TemplateSearchRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSearchRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *TemplateSearchRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *TemplateSearchRequest) SetPage(v int32) { + o.Page = &v +} + +func (o TemplateSearchRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateSearchRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TemplateSearchRequest) UnmarshalJSON(data []byte) (err error) { + varTemplateSearchRequest := _TemplateSearchRequest{} + + err = json.Unmarshal(data, &varTemplateSearchRequest) + + if err != nil { + return err + } + + *o = TemplateSearchRequest(varTemplateSearchRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "count") + delete(additionalProperties, "page") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTemplateSearchRequest struct { + value *TemplateSearchRequest + isSet bool +} + +func (v NullableTemplateSearchRequest) Get() *TemplateSearchRequest { + return v.value +} + +func (v *NullableTemplateSearchRequest) Set(val *TemplateSearchRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSearchRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSearchRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSearchRequest(val *TemplateSearchRequest) *NullableTemplateSearchRequest { + return &NullableTemplateSearchRequest{value: val, isSet: true} +} + +func (v NullableTemplateSearchRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSearchRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_template_search_response.go b/model_template_search_response.go new file mode 100644 index 0000000..70c7dd3 --- /dev/null +++ b/model_template_search_response.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the TemplateSearchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateSearchResponse{} + +// TemplateSearchResponse struct for TemplateSearchResponse +type TemplateSearchResponse struct { + Templates []Template `json:"templates"` + Total int32 `json:"total"` + AdditionalProperties map[string]interface{} +} + +type _TemplateSearchResponse TemplateSearchResponse + +// NewTemplateSearchResponse instantiates a new TemplateSearchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSearchResponse(templates []Template, total int32) *TemplateSearchResponse { + this := TemplateSearchResponse{} + this.Templates = templates + this.Total = total + return &this +} + +// NewTemplateSearchResponseWithDefaults instantiates a new TemplateSearchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSearchResponseWithDefaults() *TemplateSearchResponse { + this := TemplateSearchResponse{} + return &this +} + +// GetTemplates returns the Templates field value +func (o *TemplateSearchResponse) GetTemplates() []Template { + if o == nil { + var ret []Template + return ret + } + + return o.Templates +} + +// GetTemplatesOk returns a tuple with the Templates field value +// and a boolean to check if the value has been set. +func (o *TemplateSearchResponse) GetTemplatesOk() ([]Template, bool) { + if o == nil { + return nil, false + } + return o.Templates, true +} + +// SetTemplates sets field value +func (o *TemplateSearchResponse) SetTemplates(v []Template) { + o.Templates = v +} + +// GetTotal returns the Total field value +func (o *TemplateSearchResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *TemplateSearchResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *TemplateSearchResponse) SetTotal(v int32) { + o.Total = v +} + +func (o TemplateSearchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateSearchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["templates"] = o.Templates + toSerialize["total"] = o.Total + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TemplateSearchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "templates", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTemplateSearchResponse := _TemplateSearchResponse{} + + err = json.Unmarshal(data, &varTemplateSearchResponse) + + if err != nil { + return err + } + + *o = TemplateSearchResponse(varTemplateSearchResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "templates") + delete(additionalProperties, "total") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTemplateSearchResponse struct { + value *TemplateSearchResponse + isSet bool +} + +func (v NullableTemplateSearchResponse) Get() *TemplateSearchResponse { + return v.value +} + +func (v *NullableTemplateSearchResponse) Set(val *TemplateSearchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSearchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSearchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSearchResponse(val *TemplateSearchResponse) *NullableTemplateSearchResponse { + return &NullableTemplateSearchResponse{value: val, isSet: true} +} + +func (v NullableTemplateSearchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSearchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_threat_actor_input.go b/model_threat_actor_input.go new file mode 100644 index 0000000..26e1e70 --- /dev/null +++ b/model_threat_actor_input.go @@ -0,0 +1,489 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ThreatActorInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ThreatActorInput{} + +// ThreatActorInput struct for ThreatActorInput +type ThreatActorInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ThreatActorTypes []string `json:"threat_actor_types,omitempty"` + Aliases []string `json:"aliases,omitempty"` + FirstSeen *time.Time `json:"first_seen,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` +} + +type _ThreatActorInput ThreatActorInput + +// NewThreatActorInput instantiates a new ThreatActorInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewThreatActorInput(name string) *ThreatActorInput { + this := ThreatActorInput{} + var type_ string = "threat-actor" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + return &this +} + +// NewThreatActorInputWithDefaults instantiates a new ThreatActorInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewThreatActorInputWithDefaults() *ThreatActorInput { + this := ThreatActorInput{} + var type_ string = "threat-actor" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ThreatActorInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ThreatActorInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ThreatActorInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *ThreatActorInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ThreatActorInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ThreatActorInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ThreatActorInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ThreatActorInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *ThreatActorInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *ThreatActorInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *ThreatActorInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ThreatActorInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ThreatActorInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ThreatActorInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *ThreatActorInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *ThreatActorInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *ThreatActorInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetThreatActorTypes returns the ThreatActorTypes field value if set, zero value otherwise. +func (o *ThreatActorInput) GetThreatActorTypes() []string { + if o == nil || IsNil(o.ThreatActorTypes) { + var ret []string + return ret + } + return o.ThreatActorTypes +} + +// GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetThreatActorTypesOk() ([]string, bool) { + if o == nil || IsNil(o.ThreatActorTypes) { + return nil, false + } + return o.ThreatActorTypes, true +} + +// HasThreatActorTypes returns a boolean if a field has been set. +func (o *ThreatActorInput) HasThreatActorTypes() bool { + if o != nil && !IsNil(o.ThreatActorTypes) { + return true + } + + return false +} + +// SetThreatActorTypes gets a reference to the given []string and assigns it to the ThreatActorTypes field. +func (o *ThreatActorInput) SetThreatActorTypes(v []string) { + o.ThreatActorTypes = v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *ThreatActorInput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *ThreatActorInput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *ThreatActorInput) SetAliases(v []string) { + o.Aliases = v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *ThreatActorInput) GetFirstSeen() time.Time { + if o == nil || IsNil(o.FirstSeen) { + var ret time.Time + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetFirstSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *ThreatActorInput) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given time.Time and assigns it to the FirstSeen field. +func (o *ThreatActorInput) SetFirstSeen(v time.Time) { + o.FirstSeen = &v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *ThreatActorInput) GetLastSeen() time.Time { + if o == nil || IsNil(o.LastSeen) { + var ret time.Time + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorInput) GetLastSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *ThreatActorInput) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given time.Time and assigns it to the LastSeen field. +func (o *ThreatActorInput) SetLastSeen(v time.Time) { + o.LastSeen = &v +} + +func (o ThreatActorInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThreatActorInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ThreatActorTypes) { + toSerialize["threat_actor_types"] = o.ThreatActorTypes + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + return toSerialize, nil +} + +func (o *ThreatActorInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varThreatActorInput := _ThreatActorInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varThreatActorInput) + + if err != nil { + return err + } + + *o = ThreatActorInput(varThreatActorInput) + + return err +} + +type NullableThreatActorInput struct { + value *ThreatActorInput + isSet bool +} + +func (v NullableThreatActorInput) Get() *ThreatActorInput { + return v.value +} + +func (v *NullableThreatActorInput) Set(val *ThreatActorInput) { + v.value = val + v.isSet = true +} + +func (v NullableThreatActorInput) IsSet() bool { + return v.isSet +} + +func (v *NullableThreatActorInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThreatActorInput(val *ThreatActorInput) *NullableThreatActorInput { + return &NullableThreatActorInput{value: val, isSet: true} +} + +func (v NullableThreatActorInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThreatActorInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_threat_actor_output.go b/model_threat_actor_output.go new file mode 100644 index 0000000..dc4aeb3 --- /dev/null +++ b/model_threat_actor_output.go @@ -0,0 +1,601 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ThreatActorOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ThreatActorOutput{} + +// ThreatActorOutput struct for ThreatActorOutput +type ThreatActorOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ThreatActorTypes []string `json:"threat_actor_types,omitempty"` + Aliases []string `json:"aliases,omitempty"` + FirstSeen *time.Time `json:"first_seen,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _ThreatActorOutput ThreatActorOutput + +// NewThreatActorOutput instantiates a new ThreatActorOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewThreatActorOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *ThreatActorOutput { + this := ThreatActorOutput{} + var type_ string = "threat-actor" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewThreatActorOutputWithDefaults instantiates a new ThreatActorOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewThreatActorOutputWithDefaults() *ThreatActorOutput { + this := ThreatActorOutput{} + var type_ string = "threat-actor" + this.Type = &type_ + var description string = "" + this.Description = &description + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ThreatActorOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *ThreatActorOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ThreatActorOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ThreatActorOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *ThreatActorOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ThreatActorOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *ThreatActorOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetThreatActorTypes returns the ThreatActorTypes field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetThreatActorTypes() []string { + if o == nil || IsNil(o.ThreatActorTypes) { + var ret []string + return ret + } + return o.ThreatActorTypes +} + +// GetThreatActorTypesOk returns a tuple with the ThreatActorTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetThreatActorTypesOk() ([]string, bool) { + if o == nil || IsNil(o.ThreatActorTypes) { + return nil, false + } + return o.ThreatActorTypes, true +} + +// HasThreatActorTypes returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasThreatActorTypes() bool { + if o != nil && !IsNil(o.ThreatActorTypes) { + return true + } + + return false +} + +// SetThreatActorTypes gets a reference to the given []string and assigns it to the ThreatActorTypes field. +func (o *ThreatActorOutput) SetThreatActorTypes(v []string) { + o.ThreatActorTypes = v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *ThreatActorOutput) SetAliases(v []string) { + o.Aliases = v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetFirstSeen() time.Time { + if o == nil || IsNil(o.FirstSeen) { + var ret time.Time + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetFirstSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given time.Time and assigns it to the FirstSeen field. +func (o *ThreatActorOutput) SetFirstSeen(v time.Time) { + o.FirstSeen = &v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *ThreatActorOutput) GetLastSeen() time.Time { + if o == nil || IsNil(o.LastSeen) { + var ret time.Time + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetLastSeenOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *ThreatActorOutput) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given time.Time and assigns it to the LastSeen field. +func (o *ThreatActorOutput) SetLastSeen(v time.Time) { + o.LastSeen = &v +} + +// GetId returns the Id field value +func (o *ThreatActorOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ThreatActorOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *ThreatActorOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *ThreatActorOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *ThreatActorOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *ThreatActorOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *ThreatActorOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *ThreatActorOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *ThreatActorOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o ThreatActorOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThreatActorOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ThreatActorTypes) { + toSerialize["threat_actor_types"] = o.ThreatActorTypes + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *ThreatActorOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varThreatActorOutput := _ThreatActorOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varThreatActorOutput) + + if err != nil { + return err + } + + *o = ThreatActorOutput(varThreatActorOutput) + + return err +} + +type NullableThreatActorOutput struct { + value *ThreatActorOutput + isSet bool +} + +func (v NullableThreatActorOutput) Get() *ThreatActorOutput { + return v.value +} + +func (v *NullableThreatActorOutput) Set(val *ThreatActorOutput) { + v.value = val + v.isSet = true +} + +func (v NullableThreatActorOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableThreatActorOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThreatActorOutput(val *ThreatActorOutput) *NullableThreatActorOutput { + return &NullableThreatActorOutput{value: val, isSet: true} +} + +func (v NullableThreatActorOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThreatActorOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tlsh_input.go b/model_tlsh_input.go new file mode 100644 index 0000000..f85d8fb --- /dev/null +++ b/model_tlsh_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TLSHInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TLSHInput{} + +// TLSHInput struct for TLSHInput +type TLSHInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _TLSHInput TLSHInput + +// NewTLSHInput instantiates a new TLSHInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTLSHInput(value string) *TLSHInput { + this := TLSHInput{} + this.Value = value + var type_ string = "tlsh" + this.Type = &type_ + return &this +} + +// NewTLSHInputWithDefaults instantiates a new TLSHInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTLSHInputWithDefaults() *TLSHInput { + this := TLSHInput{} + var type_ string = "tlsh" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *TLSHInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *TLSHInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *TLSHInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TLSHInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSHInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *TLSHInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *TLSHInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *TLSHInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSHInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *TLSHInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *TLSHInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *TLSHInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSHInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *TLSHInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *TLSHInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *TLSHInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSHInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *TLSHInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *TLSHInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o TLSHInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TLSHInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *TLSHInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTLSHInput := _TLSHInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTLSHInput) + + if err != nil { + return err + } + + *o = TLSHInput(varTLSHInput) + + return err +} + +type NullableTLSHInput struct { + value *TLSHInput + isSet bool +} + +func (v NullableTLSHInput) Get() *TLSHInput { + return v.value +} + +func (v *NullableTLSHInput) Set(val *TLSHInput) { + v.value = val + v.isSet = true +} + +func (v NullableTLSHInput) IsSet() bool { + return v.isSet +} + +func (v *NullableTLSHInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTLSHInput(val *TLSHInput) *NullableTLSHInput { + return &NullableTLSHInput{value: val, isSet: true} +} + +func (v NullableTLSHInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTLSHInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tlsh_output.go b/model_tlsh_output.go new file mode 100644 index 0000000..dd6115d --- /dev/null +++ b/model_tlsh_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TLSHOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TLSHOutput{} + +// TLSHOutput struct for TLSHOutput +type TLSHOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _TLSHOutput TLSHOutput + +// NewTLSHOutput instantiates a new TLSHOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTLSHOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *TLSHOutput { + this := TLSHOutput{} + this.Value = value + var type_ string = "tlsh" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewTLSHOutputWithDefaults instantiates a new TLSHOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTLSHOutputWithDefaults() *TLSHOutput { + this := TLSHOutput{} + var type_ string = "tlsh" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *TLSHOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *TLSHOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *TLSHOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TLSHOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSHOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *TLSHOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *TLSHOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *TLSHOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSHOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *TLSHOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *TLSHOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *TLSHOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSHOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *TLSHOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *TLSHOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *TLSHOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSHOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *TLSHOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *TLSHOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *TLSHOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TLSHOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TLSHOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *TLSHOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *TLSHOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *TLSHOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *TLSHOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *TLSHOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *TLSHOutput) SetRootType(v string) { + o.RootType = v +} + +func (o TLSHOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TLSHOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *TLSHOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTLSHOutput := _TLSHOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTLSHOutput) + + if err != nil { + return err + } + + *o = TLSHOutput(varTLSHOutput) + + return err +} + +type NullableTLSHOutput struct { + value *TLSHOutput + isSet bool +} + +func (v NullableTLSHOutput) Get() *TLSHOutput { + return v.value +} + +func (v *NullableTLSHOutput) Set(val *TLSHOutput) { + v.value = val + v.isSet = true +} + +func (v NullableTLSHOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableTLSHOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTLSHOutput(val *TLSHOutput) *NullableTLSHOutput { + return &NullableTLSHOutput{value: val, isSet: true} +} + +func (v NullableTLSHOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTLSHOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_toggle_user_request.go b/model_toggle_user_request.go new file mode 100644 index 0000000..a1f002b --- /dev/null +++ b/model_toggle_user_request.go @@ -0,0 +1,195 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the ToggleUserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ToggleUserRequest{} + +// ToggleUserRequest struct for ToggleUserRequest +type ToggleUserRequest struct { + UserId string `json:"user_id"` + Field ToggleableField `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _ToggleUserRequest ToggleUserRequest + +// NewToggleUserRequest instantiates a new ToggleUserRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewToggleUserRequest(userId string, field ToggleableField) *ToggleUserRequest { + this := ToggleUserRequest{} + this.UserId = userId + this.Field = field + return &this +} + +// NewToggleUserRequestWithDefaults instantiates a new ToggleUserRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewToggleUserRequestWithDefaults() *ToggleUserRequest { + this := ToggleUserRequest{} + return &this +} + +// GetUserId returns the UserId field value +func (o *ToggleUserRequest) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *ToggleUserRequest) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *ToggleUserRequest) SetUserId(v string) { + o.UserId = v +} + +// GetField returns the Field field value +func (o *ToggleUserRequest) GetField() ToggleableField { + if o == nil { + var ret ToggleableField + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *ToggleUserRequest) GetFieldOk() (*ToggleableField, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *ToggleUserRequest) SetField(v ToggleableField) { + o.Field = v +} + +func (o ToggleUserRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ToggleUserRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_id"] = o.UserId + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ToggleUserRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varToggleUserRequest := _ToggleUserRequest{} + + err = json.Unmarshal(data, &varToggleUserRequest) + + if err != nil { + return err + } + + *o = ToggleUserRequest(varToggleUserRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "user_id") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableToggleUserRequest struct { + value *ToggleUserRequest + isSet bool +} + +func (v NullableToggleUserRequest) Get() *ToggleUserRequest { + return v.value +} + +func (v *NullableToggleUserRequest) Set(val *ToggleUserRequest) { + v.value = val + v.isSet = true +} + +func (v NullableToggleUserRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableToggleUserRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToggleUserRequest(val *ToggleUserRequest) *NullableToggleUserRequest { + return &NullableToggleUserRequest{value: val, isSet: true} +} + +func (v NullableToggleUserRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToggleUserRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_toggleable_field.go b/model_toggleable_field.go new file mode 100644 index 0000000..05a5eff --- /dev/null +++ b/model_toggleable_field.go @@ -0,0 +1,110 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ToggleableField the model 'ToggleableField' +type ToggleableField string + +// List of ToggleableField +const ( + ENABLED ToggleableField = "enabled" + ADMIN ToggleableField = "admin" +) + +// All allowed values of ToggleableField enum +var AllowedToggleableFieldEnumValues = []ToggleableField{ + "enabled", + "admin", +} + +func (v *ToggleableField) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ToggleableField(value) + for _, existing := range AllowedToggleableFieldEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ToggleableField", value) +} + +// NewToggleableFieldFromValue returns a pointer to a valid ToggleableField +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewToggleableFieldFromValue(v string) (*ToggleableField, error) { + ev := ToggleableField(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ToggleableField: valid values are %v", v, AllowedToggleableFieldEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ToggleableField) IsValid() bool { + for _, existing := range AllowedToggleableFieldEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ToggleableField value +func (v ToggleableField) Ptr() *ToggleableField { + return &v +} + +type NullableToggleableField struct { + value *ToggleableField + isSet bool +} + +func (v NullableToggleableField) Get() *ToggleableField { + return v.value +} + +func (v *NullableToggleableField) Set(val *ToggleableField) { + v.value = val + v.isSet = true +} + +func (v NullableToggleableField) IsSet() bool { + return v.isSet +} + +func (v *NullableToggleableField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToggleableField(val *ToggleableField) *NullableToggleableField { + return &NullableToggleableField{value: val, isSet: true} +} + +func (v NullableToggleableField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToggleableField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tool_input.go b/model_tool_input.go new file mode 100644 index 0000000..08a0d42 --- /dev/null +++ b/model_tool_input.go @@ -0,0 +1,457 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ToolInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ToolInput{} + +// ToolInput struct for ToolInput +type ToolInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Aliases []string `json:"aliases,omitempty"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + ToolVersion *string `json:"tool_version,omitempty"` +} + +type _ToolInput ToolInput + +// NewToolInput instantiates a new ToolInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewToolInput(name string) *ToolInput { + this := ToolInput{} + var type_ string = "tool" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var toolVersion string = "" + this.ToolVersion = &toolVersion + return &this +} + +// NewToolInputWithDefaults instantiates a new ToolInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewToolInputWithDefaults() *ToolInput { + this := ToolInput{} + var type_ string = "tool" + this.Type = &type_ + var description string = "" + this.Description = &description + var toolVersion string = "" + this.ToolVersion = &toolVersion + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ToolInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ToolInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ToolInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *ToolInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ToolInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ToolInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ToolInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ToolInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ToolInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *ToolInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *ToolInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *ToolInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ToolInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ToolInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ToolInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *ToolInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *ToolInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *ToolInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *ToolInput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolInput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *ToolInput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *ToolInput) SetAliases(v []string) { + o.Aliases = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *ToolInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *ToolInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *ToolInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetToolVersion returns the ToolVersion field value if set, zero value otherwise. +func (o *ToolInput) GetToolVersion() string { + if o == nil || IsNil(o.ToolVersion) { + var ret string + return ret + } + return *o.ToolVersion +} + +// GetToolVersionOk returns a tuple with the ToolVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolInput) GetToolVersionOk() (*string, bool) { + if o == nil || IsNil(o.ToolVersion) { + return nil, false + } + return o.ToolVersion, true +} + +// HasToolVersion returns a boolean if a field has been set. +func (o *ToolInput) HasToolVersion() bool { + if o != nil && !IsNil(o.ToolVersion) { + return true + } + + return false +} + +// SetToolVersion gets a reference to the given string and assigns it to the ToolVersion field. +func (o *ToolInput) SetToolVersion(v string) { + o.ToolVersion = &v +} + +func (o ToolInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ToolInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.ToolVersion) { + toSerialize["tool_version"] = o.ToolVersion + } + return toSerialize, nil +} + +func (o *ToolInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varToolInput := _ToolInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varToolInput) + + if err != nil { + return err + } + + *o = ToolInput(varToolInput) + + return err +} + +type NullableToolInput struct { + value *ToolInput + isSet bool +} + +func (v NullableToolInput) Get() *ToolInput { + return v.value +} + +func (v *NullableToolInput) Set(val *ToolInput) { + v.value = val + v.isSet = true +} + +func (v NullableToolInput) IsSet() bool { + return v.isSet +} + +func (v *NullableToolInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToolInput(val *ToolInput) *NullableToolInput { + return &NullableToolInput{value: val, isSet: true} +} + +func (v NullableToolInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToolInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_tool_output.go b/model_tool_output.go new file mode 100644 index 0000000..85a077d --- /dev/null +++ b/model_tool_output.go @@ -0,0 +1,569 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ToolOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ToolOutput{} + +// ToolOutput struct for ToolOutput +type ToolOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Aliases []string `json:"aliases,omitempty"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + ToolVersion *string `json:"tool_version,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _ToolOutput ToolOutput + +// NewToolOutput instantiates a new ToolOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewToolOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *ToolOutput { + this := ToolOutput{} + var type_ string = "tool" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var toolVersion string = "" + this.ToolVersion = &toolVersion + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewToolOutputWithDefaults instantiates a new ToolOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewToolOutputWithDefaults() *ToolOutput { + this := ToolOutput{} + var type_ string = "tool" + this.Type = &type_ + var description string = "" + this.Description = &description + var toolVersion string = "" + this.ToolVersion = &toolVersion + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ToolOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ToolOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ToolOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *ToolOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ToolOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ToolOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ToolOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ToolOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *ToolOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *ToolOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *ToolOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *ToolOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *ToolOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *ToolOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *ToolOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *ToolOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *ToolOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetAliases returns the Aliases field value if set, zero value otherwise. +func (o *ToolOutput) GetAliases() []string { + if o == nil || IsNil(o.Aliases) { + var ret []string + return ret + } + return o.Aliases +} + +// GetAliasesOk returns a tuple with the Aliases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetAliasesOk() ([]string, bool) { + if o == nil || IsNil(o.Aliases) { + return nil, false + } + return o.Aliases, true +} + +// HasAliases returns a boolean if a field has been set. +func (o *ToolOutput) HasAliases() bool { + if o != nil && !IsNil(o.Aliases) { + return true + } + + return false +} + +// SetAliases gets a reference to the given []string and assigns it to the Aliases field. +func (o *ToolOutput) SetAliases(v []string) { + o.Aliases = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *ToolOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *ToolOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *ToolOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetToolVersion returns the ToolVersion field value if set, zero value otherwise. +func (o *ToolOutput) GetToolVersion() string { + if o == nil || IsNil(o.ToolVersion) { + var ret string + return ret + } + return *o.ToolVersion +} + +// GetToolVersionOk returns a tuple with the ToolVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetToolVersionOk() (*string, bool) { + if o == nil || IsNil(o.ToolVersion) { + return nil, false + } + return o.ToolVersion, true +} + +// HasToolVersion returns a boolean if a field has been set. +func (o *ToolOutput) HasToolVersion() bool { + if o != nil && !IsNil(o.ToolVersion) { + return true + } + + return false +} + +// SetToolVersion gets a reference to the given string and assigns it to the ToolVersion field. +func (o *ToolOutput) SetToolVersion(v string) { + o.ToolVersion = &v +} + +// GetId returns the Id field value +func (o *ToolOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ToolOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *ToolOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *ToolOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *ToolOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *ToolOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *ToolOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *ToolOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *ToolOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o ToolOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ToolOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Aliases) { + toSerialize["aliases"] = o.Aliases + } + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.ToolVersion) { + toSerialize["tool_version"] = o.ToolVersion + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *ToolOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varToolOutput := _ToolOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varToolOutput) + + if err != nil { + return err + } + + *o = ToolOutput(varToolOutput) + + return err +} + +type NullableToolOutput struct { + value *ToolOutput + isSet bool +} + +func (v NullableToolOutput) Get() *ToolOutput { + return v.value +} + +func (v *NullableToolOutput) Set(val *ToolOutput) { + v.value = val + v.isSet = true +} + +func (v NullableToolOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableToolOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToolOutput(val *ToolOutput) *NullableToolOutput { + return &NullableToolOutput{value: val, isSet: true} +} + +func (v NullableToolOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToolOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_update_request.go b/model_update_request.go new file mode 100644 index 0000000..29fcdde --- /dev/null +++ b/model_update_request.go @@ -0,0 +1,281 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateRequest{} + +// UpdateRequest struct for UpdateRequest +type UpdateRequest struct { + Name string `json:"name"` + DefaultExpiration *string `json:"default_expiration,omitempty"` + Produces []string `json:"produces,omitempty"` + Replaces []string `json:"replaces,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateRequest UpdateRequest + +// NewUpdateRequest instantiates a new UpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateRequest(name string) *UpdateRequest { + this := UpdateRequest{} + this.Name = name + var defaultExpiration string = "P90D" + this.DefaultExpiration = &defaultExpiration + return &this +} + +// NewUpdateRequestWithDefaults instantiates a new UpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateRequestWithDefaults() *UpdateRequest { + this := UpdateRequest{} + var defaultExpiration string = "P90D" + this.DefaultExpiration = &defaultExpiration + return &this +} + +// GetName returns the Name field value +func (o *UpdateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateRequest) SetName(v string) { + o.Name = v +} + +// GetDefaultExpiration returns the DefaultExpiration field value if set, zero value otherwise. +func (o *UpdateRequest) GetDefaultExpiration() string { + if o == nil || IsNil(o.DefaultExpiration) { + var ret string + return ret + } + return *o.DefaultExpiration +} + +// GetDefaultExpirationOk returns a tuple with the DefaultExpiration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRequest) GetDefaultExpirationOk() (*string, bool) { + if o == nil || IsNil(o.DefaultExpiration) { + return nil, false + } + return o.DefaultExpiration, true +} + +// HasDefaultExpiration returns a boolean if a field has been set. +func (o *UpdateRequest) HasDefaultExpiration() bool { + if o != nil && !IsNil(o.DefaultExpiration) { + return true + } + + return false +} + +// SetDefaultExpiration gets a reference to the given string and assigns it to the DefaultExpiration field. +func (o *UpdateRequest) SetDefaultExpiration(v string) { + o.DefaultExpiration = &v +} + +// GetProduces returns the Produces field value if set, zero value otherwise. +func (o *UpdateRequest) GetProduces() []string { + if o == nil || IsNil(o.Produces) { + var ret []string + return ret + } + return o.Produces +} + +// GetProducesOk returns a tuple with the Produces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRequest) GetProducesOk() ([]string, bool) { + if o == nil || IsNil(o.Produces) { + return nil, false + } + return o.Produces, true +} + +// HasProduces returns a boolean if a field has been set. +func (o *UpdateRequest) HasProduces() bool { + if o != nil && !IsNil(o.Produces) { + return true + } + + return false +} + +// SetProduces gets a reference to the given []string and assigns it to the Produces field. +func (o *UpdateRequest) SetProduces(v []string) { + o.Produces = v +} + +// GetReplaces returns the Replaces field value if set, zero value otherwise. +func (o *UpdateRequest) GetReplaces() []string { + if o == nil || IsNil(o.Replaces) { + var ret []string + return ret + } + return o.Replaces +} + +// GetReplacesOk returns a tuple with the Replaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRequest) GetReplacesOk() ([]string, bool) { + if o == nil || IsNil(o.Replaces) { + return nil, false + } + return o.Replaces, true +} + +// HasReplaces returns a boolean if a field has been set. +func (o *UpdateRequest) HasReplaces() bool { + if o != nil && !IsNil(o.Replaces) { + return true + } + + return false +} + +// SetReplaces gets a reference to the given []string and assigns it to the Replaces field. +func (o *UpdateRequest) SetReplaces(v []string) { + o.Replaces = v +} + +func (o UpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.DefaultExpiration) { + toSerialize["default_expiration"] = o.DefaultExpiration + } + if !IsNil(o.Produces) { + toSerialize["produces"] = o.Produces + } + if !IsNil(o.Replaces) { + toSerialize["replaces"] = o.Replaces + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateRequest := _UpdateRequest{} + + err = json.Unmarshal(data, &varUpdateRequest) + + if err != nil { + return err + } + + *o = UpdateRequest(varUpdateRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "default_expiration") + delete(additionalProperties, "produces") + delete(additionalProperties, "replaces") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateRequest struct { + value *UpdateRequest + isSet bool +} + +func (v NullableUpdateRequest) Get() *UpdateRequest { + return v.value +} + +func (v *NullableUpdateRequest) Set(val *UpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateRequest(val *UpdateRequest) *NullableUpdateRequest { + return &NullableUpdateRequest{value: val, isSet: true} +} + +func (v NullableUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_url_input.go b/model_url_input.go new file mode 100644 index 0000000..95dcc28 --- /dev/null +++ b/model_url_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UrlInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UrlInput{} + +// UrlInput struct for UrlInput +type UrlInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _UrlInput UrlInput + +// NewUrlInput instantiates a new UrlInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUrlInput(value string) *UrlInput { + this := UrlInput{} + this.Value = value + var type_ string = "url" + this.Type = &type_ + return &this +} + +// NewUrlInputWithDefaults instantiates a new UrlInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUrlInputWithDefaults() *UrlInput { + this := UrlInput{} + var type_ string = "url" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *UrlInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *UrlInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *UrlInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UrlInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UrlInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UrlInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UrlInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *UrlInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UrlInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *UrlInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *UrlInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *UrlInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UrlInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *UrlInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *UrlInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *UrlInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UrlInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *UrlInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *UrlInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o UrlInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UrlInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *UrlInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUrlInput := _UrlInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUrlInput) + + if err != nil { + return err + } + + *o = UrlInput(varUrlInput) + + return err +} + +type NullableUrlInput struct { + value *UrlInput + isSet bool +} + +func (v NullableUrlInput) Get() *UrlInput { + return v.value +} + +func (v *NullableUrlInput) Set(val *UrlInput) { + v.value = val + v.isSet = true +} + +func (v NullableUrlInput) IsSet() bool { + return v.isSet +} + +func (v *NullableUrlInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUrlInput(val *UrlInput) *NullableUrlInput { + return &NullableUrlInput{value: val, isSet: true} +} + +func (v NullableUrlInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUrlInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_url_output.go b/model_url_output.go new file mode 100644 index 0000000..f09cc3c --- /dev/null +++ b/model_url_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UrlOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UrlOutput{} + +// UrlOutput struct for UrlOutput +type UrlOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _UrlOutput UrlOutput + +// NewUrlOutput instantiates a new UrlOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUrlOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *UrlOutput { + this := UrlOutput{} + this.Value = value + var type_ string = "url" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewUrlOutputWithDefaults instantiates a new UrlOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUrlOutputWithDefaults() *UrlOutput { + this := UrlOutput{} + var type_ string = "url" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *UrlOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *UrlOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *UrlOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UrlOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UrlOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UrlOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UrlOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *UrlOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UrlOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *UrlOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *UrlOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *UrlOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UrlOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *UrlOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *UrlOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *UrlOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UrlOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *UrlOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *UrlOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *UrlOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *UrlOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *UrlOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *UrlOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *UrlOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *UrlOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *UrlOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *UrlOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *UrlOutput) SetRootType(v string) { + o.RootType = v +} + +func (o UrlOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UrlOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *UrlOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUrlOutput := _UrlOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUrlOutput) + + if err != nil { + return err + } + + *o = UrlOutput(varUrlOutput) + + return err +} + +type NullableUrlOutput struct { + value *UrlOutput + isSet bool +} + +func (v NullableUrlOutput) Get() *UrlOutput { + return v.value +} + +func (v *NullableUrlOutput) Set(val *UrlOutput) { + v.value = val + v.isSet = true +} + +func (v NullableUrlOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableUrlOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUrlOutput(val *UrlOutput) *NullableUrlOutput { + return &NullableUrlOutput{value: val, isSet: true} +} + +func (v NullableUrlOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUrlOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_user.go b/model_user.go new file mode 100644 index 0000000..03c5314 --- /dev/null +++ b/model_user.go @@ -0,0 +1,300 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User struct for User +type User struct { + Username string `json:"username"` + Enabled *bool `json:"enabled,omitempty"` + Admin *bool `json:"admin,omitempty"` + ApiKey *string `json:"api_key,omitempty"` + Id string `json:"id"` +} + +type _User User + +// NewUser instantiates a new User object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUser(username string, id string) *User { + this := User{} + this.Username = username + var enabled bool = true + this.Enabled = &enabled + var admin bool = false + this.Admin = &admin + this.Id = id + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserWithDefaults() *User { + this := User{} + var enabled bool = true + this.Enabled = &enabled + var admin bool = false + this.Admin = &admin + return &this +} + +// GetUsername returns the Username field value +func (o *User) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *User) SetUsername(v string) { + o.Username = v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *User) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *User) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *User) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetAdmin returns the Admin field value if set, zero value otherwise. +func (o *User) GetAdmin() bool { + if o == nil || IsNil(o.Admin) { + var ret bool + return ret + } + return *o.Admin +} + +// GetAdminOk returns a tuple with the Admin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetAdminOk() (*bool, bool) { + if o == nil || IsNil(o.Admin) { + return nil, false + } + return o.Admin, true +} + +// HasAdmin returns a boolean if a field has been set. +func (o *User) HasAdmin() bool { + if o != nil && !IsNil(o.Admin) { + return true + } + + return false +} + +// SetAdmin gets a reference to the given bool and assigns it to the Admin field. +func (o *User) SetAdmin(v bool) { + o.Admin = &v +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise. +func (o *User) GetApiKey() string { + if o == nil || IsNil(o.ApiKey) { + var ret string + return ret + } + return *o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.ApiKey) { + return nil, false + } + return o.ApiKey, true +} + +// HasApiKey returns a boolean if a field has been set. +func (o *User) HasApiKey() bool { + if o != nil && !IsNil(o.ApiKey) { + return true + } + + return false +} + +// SetApiKey gets a reference to the given string and assigns it to the ApiKey field. +func (o *User) SetApiKey(v string) { + o.ApiKey = &v +} + +// GetId returns the Id field value +func (o *User) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *User) SetId(v string) { + o.Id = v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Admin) { + toSerialize["admin"] = o.Admin + } + if !IsNil(o.ApiKey) { + toSerialize["api_key"] = o.ApiKey + } + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *User) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "username", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUser := _User{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUser) + + if err != nil { + return err + } + + *o = User(varUser) + + return err +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_user_account_input.go b/model_user_account_input.go new file mode 100644 index 0000000..b282cae --- /dev/null +++ b/model_user_account_input.go @@ -0,0 +1,963 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UserAccountInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAccountInput{} + +// UserAccountInput Represents a user account observable based on the Oasis schema. https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_azo70vgj1vm2 account_login and account_type must be provided. Value should to be in the form :. +type UserAccountInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + UserId NullableString `json:"user_id,omitempty"` + Credential NullableString `json:"credential,omitempty"` + AccountLogin NullableString `json:"account_login,omitempty"` + AccountType NullableString `json:"account_type,omitempty"` + DisplayName NullableString `json:"display_name,omitempty"` + IsServiceAccount NullableBool `json:"is_service_account,omitempty"` + IsPrivileged NullableBool `json:"is_privileged,omitempty"` + CanEscalatePrivs NullableBool `json:"can_escalate_privs,omitempty"` + IsDisabled NullableBool `json:"is_disabled,omitempty"` + AccountCreated NullableTime `json:"account_created,omitempty"` + AccountExpires NullableTime `json:"account_expires,omitempty"` + CredentialLastChanged NullableTime `json:"credential_last_changed,omitempty"` + AccountFirstLogin NullableTime `json:"account_first_login,omitempty"` + AccountLastLogin NullableTime `json:"account_last_login,omitempty"` +} + +type _UserAccountInput UserAccountInput + +// NewUserAccountInput instantiates a new UserAccountInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAccountInput(value string) *UserAccountInput { + this := UserAccountInput{} + this.Value = value + var type_ string = "user_account" + this.Type = &type_ + return &this +} + +// NewUserAccountInputWithDefaults instantiates a new UserAccountInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAccountInputWithDefaults() *UserAccountInput { + this := UserAccountInput{} + var type_ string = "user_account" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *UserAccountInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *UserAccountInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *UserAccountInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UserAccountInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAccountInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UserAccountInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UserAccountInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *UserAccountInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAccountInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *UserAccountInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *UserAccountInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *UserAccountInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAccountInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *UserAccountInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *UserAccountInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *UserAccountInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAccountInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *UserAccountInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *UserAccountInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetUserId returns the UserId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetUserId() string { + if o == nil || IsNil(o.UserId.Get()) { + var ret string + return ret + } + return *o.UserId.Get() +} + +// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UserId.Get(), o.UserId.IsSet() +} + +// HasUserId returns a boolean if a field has been set. +func (o *UserAccountInput) HasUserId() bool { + if o != nil && o.UserId.IsSet() { + return true + } + + return false +} + +// SetUserId gets a reference to the given NullableString and assigns it to the UserId field. +func (o *UserAccountInput) SetUserId(v string) { + o.UserId.Set(&v) +} + +// SetUserIdNil sets the value for UserId to be an explicit nil +func (o *UserAccountInput) SetUserIdNil() { + o.UserId.Set(nil) +} + +// UnsetUserId ensures that no value is present for UserId, not even an explicit nil +func (o *UserAccountInput) UnsetUserId() { + o.UserId.Unset() +} + +// GetCredential returns the Credential field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetCredential() string { + if o == nil || IsNil(o.Credential.Get()) { + var ret string + return ret + } + return *o.Credential.Get() +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetCredentialOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Credential.Get(), o.Credential.IsSet() +} + +// HasCredential returns a boolean if a field has been set. +func (o *UserAccountInput) HasCredential() bool { + if o != nil && o.Credential.IsSet() { + return true + } + + return false +} + +// SetCredential gets a reference to the given NullableString and assigns it to the Credential field. +func (o *UserAccountInput) SetCredential(v string) { + o.Credential.Set(&v) +} + +// SetCredentialNil sets the value for Credential to be an explicit nil +func (o *UserAccountInput) SetCredentialNil() { + o.Credential.Set(nil) +} + +// UnsetCredential ensures that no value is present for Credential, not even an explicit nil +func (o *UserAccountInput) UnsetCredential() { + o.Credential.Unset() +} + +// GetAccountLogin returns the AccountLogin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetAccountLogin() string { + if o == nil || IsNil(o.AccountLogin.Get()) { + var ret string + return ret + } + return *o.AccountLogin.Get() +} + +// GetAccountLoginOk returns a tuple with the AccountLogin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetAccountLoginOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountLogin.Get(), o.AccountLogin.IsSet() +} + +// HasAccountLogin returns a boolean if a field has been set. +func (o *UserAccountInput) HasAccountLogin() bool { + if o != nil && o.AccountLogin.IsSet() { + return true + } + + return false +} + +// SetAccountLogin gets a reference to the given NullableString and assigns it to the AccountLogin field. +func (o *UserAccountInput) SetAccountLogin(v string) { + o.AccountLogin.Set(&v) +} + +// SetAccountLoginNil sets the value for AccountLogin to be an explicit nil +func (o *UserAccountInput) SetAccountLoginNil() { + o.AccountLogin.Set(nil) +} + +// UnsetAccountLogin ensures that no value is present for AccountLogin, not even an explicit nil +func (o *UserAccountInput) UnsetAccountLogin() { + o.AccountLogin.Unset() +} + +// GetAccountType returns the AccountType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetAccountType() string { + if o == nil || IsNil(o.AccountType.Get()) { + var ret string + return ret + } + return *o.AccountType.Get() +} + +// GetAccountTypeOk returns a tuple with the AccountType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetAccountTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountType.Get(), o.AccountType.IsSet() +} + +// HasAccountType returns a boolean if a field has been set. +func (o *UserAccountInput) HasAccountType() bool { + if o != nil && o.AccountType.IsSet() { + return true + } + + return false +} + +// SetAccountType gets a reference to the given NullableString and assigns it to the AccountType field. +func (o *UserAccountInput) SetAccountType(v string) { + o.AccountType.Set(&v) +} + +// SetAccountTypeNil sets the value for AccountType to be an explicit nil +func (o *UserAccountInput) SetAccountTypeNil() { + o.AccountType.Set(nil) +} + +// UnsetAccountType ensures that no value is present for AccountType, not even an explicit nil +func (o *UserAccountInput) UnsetAccountType() { + o.AccountType.Unset() +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName.Get()) { + var ret string + return ret + } + return *o.DisplayName.Get() +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DisplayName.Get(), o.DisplayName.IsSet() +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *UserAccountInput) HasDisplayName() bool { + if o != nil && o.DisplayName.IsSet() { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given NullableString and assigns it to the DisplayName field. +func (o *UserAccountInput) SetDisplayName(v string) { + o.DisplayName.Set(&v) +} + +// SetDisplayNameNil sets the value for DisplayName to be an explicit nil +func (o *UserAccountInput) SetDisplayNameNil() { + o.DisplayName.Set(nil) +} + +// UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil +func (o *UserAccountInput) UnsetDisplayName() { + o.DisplayName.Unset() +} + +// GetIsServiceAccount returns the IsServiceAccount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetIsServiceAccount() bool { + if o == nil || IsNil(o.IsServiceAccount.Get()) { + var ret bool + return ret + } + return *o.IsServiceAccount.Get() +} + +// GetIsServiceAccountOk returns a tuple with the IsServiceAccount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetIsServiceAccountOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsServiceAccount.Get(), o.IsServiceAccount.IsSet() +} + +// HasIsServiceAccount returns a boolean if a field has been set. +func (o *UserAccountInput) HasIsServiceAccount() bool { + if o != nil && o.IsServiceAccount.IsSet() { + return true + } + + return false +} + +// SetIsServiceAccount gets a reference to the given NullableBool and assigns it to the IsServiceAccount field. +func (o *UserAccountInput) SetIsServiceAccount(v bool) { + o.IsServiceAccount.Set(&v) +} + +// SetIsServiceAccountNil sets the value for IsServiceAccount to be an explicit nil +func (o *UserAccountInput) SetIsServiceAccountNil() { + o.IsServiceAccount.Set(nil) +} + +// UnsetIsServiceAccount ensures that no value is present for IsServiceAccount, not even an explicit nil +func (o *UserAccountInput) UnsetIsServiceAccount() { + o.IsServiceAccount.Unset() +} + +// GetIsPrivileged returns the IsPrivileged field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetIsPrivileged() bool { + if o == nil || IsNil(o.IsPrivileged.Get()) { + var ret bool + return ret + } + return *o.IsPrivileged.Get() +} + +// GetIsPrivilegedOk returns a tuple with the IsPrivileged field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetIsPrivilegedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsPrivileged.Get(), o.IsPrivileged.IsSet() +} + +// HasIsPrivileged returns a boolean if a field has been set. +func (o *UserAccountInput) HasIsPrivileged() bool { + if o != nil && o.IsPrivileged.IsSet() { + return true + } + + return false +} + +// SetIsPrivileged gets a reference to the given NullableBool and assigns it to the IsPrivileged field. +func (o *UserAccountInput) SetIsPrivileged(v bool) { + o.IsPrivileged.Set(&v) +} + +// SetIsPrivilegedNil sets the value for IsPrivileged to be an explicit nil +func (o *UserAccountInput) SetIsPrivilegedNil() { + o.IsPrivileged.Set(nil) +} + +// UnsetIsPrivileged ensures that no value is present for IsPrivileged, not even an explicit nil +func (o *UserAccountInput) UnsetIsPrivileged() { + o.IsPrivileged.Unset() +} + +// GetCanEscalatePrivs returns the CanEscalatePrivs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetCanEscalatePrivs() bool { + if o == nil || IsNil(o.CanEscalatePrivs.Get()) { + var ret bool + return ret + } + return *o.CanEscalatePrivs.Get() +} + +// GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetCanEscalatePrivsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.CanEscalatePrivs.Get(), o.CanEscalatePrivs.IsSet() +} + +// HasCanEscalatePrivs returns a boolean if a field has been set. +func (o *UserAccountInput) HasCanEscalatePrivs() bool { + if o != nil && o.CanEscalatePrivs.IsSet() { + return true + } + + return false +} + +// SetCanEscalatePrivs gets a reference to the given NullableBool and assigns it to the CanEscalatePrivs field. +func (o *UserAccountInput) SetCanEscalatePrivs(v bool) { + o.CanEscalatePrivs.Set(&v) +} + +// SetCanEscalatePrivsNil sets the value for CanEscalatePrivs to be an explicit nil +func (o *UserAccountInput) SetCanEscalatePrivsNil() { + o.CanEscalatePrivs.Set(nil) +} + +// UnsetCanEscalatePrivs ensures that no value is present for CanEscalatePrivs, not even an explicit nil +func (o *UserAccountInput) UnsetCanEscalatePrivs() { + o.CanEscalatePrivs.Unset() +} + +// GetIsDisabled returns the IsDisabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetIsDisabled() bool { + if o == nil || IsNil(o.IsDisabled.Get()) { + var ret bool + return ret + } + return *o.IsDisabled.Get() +} + +// GetIsDisabledOk returns a tuple with the IsDisabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetIsDisabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDisabled.Get(), o.IsDisabled.IsSet() +} + +// HasIsDisabled returns a boolean if a field has been set. +func (o *UserAccountInput) HasIsDisabled() bool { + if o != nil && o.IsDisabled.IsSet() { + return true + } + + return false +} + +// SetIsDisabled gets a reference to the given NullableBool and assigns it to the IsDisabled field. +func (o *UserAccountInput) SetIsDisabled(v bool) { + o.IsDisabled.Set(&v) +} + +// SetIsDisabledNil sets the value for IsDisabled to be an explicit nil +func (o *UserAccountInput) SetIsDisabledNil() { + o.IsDisabled.Set(nil) +} + +// UnsetIsDisabled ensures that no value is present for IsDisabled, not even an explicit nil +func (o *UserAccountInput) UnsetIsDisabled() { + o.IsDisabled.Unset() +} + +// GetAccountCreated returns the AccountCreated field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetAccountCreated() time.Time { + if o == nil || IsNil(o.AccountCreated.Get()) { + var ret time.Time + return ret + } + return *o.AccountCreated.Get() +} + +// GetAccountCreatedOk returns a tuple with the AccountCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetAccountCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.AccountCreated.Get(), o.AccountCreated.IsSet() +} + +// HasAccountCreated returns a boolean if a field has been set. +func (o *UserAccountInput) HasAccountCreated() bool { + if o != nil && o.AccountCreated.IsSet() { + return true + } + + return false +} + +// SetAccountCreated gets a reference to the given NullableTime and assigns it to the AccountCreated field. +func (o *UserAccountInput) SetAccountCreated(v time.Time) { + o.AccountCreated.Set(&v) +} + +// SetAccountCreatedNil sets the value for AccountCreated to be an explicit nil +func (o *UserAccountInput) SetAccountCreatedNil() { + o.AccountCreated.Set(nil) +} + +// UnsetAccountCreated ensures that no value is present for AccountCreated, not even an explicit nil +func (o *UserAccountInput) UnsetAccountCreated() { + o.AccountCreated.Unset() +} + +// GetAccountExpires returns the AccountExpires field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetAccountExpires() time.Time { + if o == nil || IsNil(o.AccountExpires.Get()) { + var ret time.Time + return ret + } + return *o.AccountExpires.Get() +} + +// GetAccountExpiresOk returns a tuple with the AccountExpires field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetAccountExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.AccountExpires.Get(), o.AccountExpires.IsSet() +} + +// HasAccountExpires returns a boolean if a field has been set. +func (o *UserAccountInput) HasAccountExpires() bool { + if o != nil && o.AccountExpires.IsSet() { + return true + } + + return false +} + +// SetAccountExpires gets a reference to the given NullableTime and assigns it to the AccountExpires field. +func (o *UserAccountInput) SetAccountExpires(v time.Time) { + o.AccountExpires.Set(&v) +} + +// SetAccountExpiresNil sets the value for AccountExpires to be an explicit nil +func (o *UserAccountInput) SetAccountExpiresNil() { + o.AccountExpires.Set(nil) +} + +// UnsetAccountExpires ensures that no value is present for AccountExpires, not even an explicit nil +func (o *UserAccountInput) UnsetAccountExpires() { + o.AccountExpires.Unset() +} + +// GetCredentialLastChanged returns the CredentialLastChanged field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetCredentialLastChanged() time.Time { + if o == nil || IsNil(o.CredentialLastChanged.Get()) { + var ret time.Time + return ret + } + return *o.CredentialLastChanged.Get() +} + +// GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetCredentialLastChangedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CredentialLastChanged.Get(), o.CredentialLastChanged.IsSet() +} + +// HasCredentialLastChanged returns a boolean if a field has been set. +func (o *UserAccountInput) HasCredentialLastChanged() bool { + if o != nil && o.CredentialLastChanged.IsSet() { + return true + } + + return false +} + +// SetCredentialLastChanged gets a reference to the given NullableTime and assigns it to the CredentialLastChanged field. +func (o *UserAccountInput) SetCredentialLastChanged(v time.Time) { + o.CredentialLastChanged.Set(&v) +} + +// SetCredentialLastChangedNil sets the value for CredentialLastChanged to be an explicit nil +func (o *UserAccountInput) SetCredentialLastChangedNil() { + o.CredentialLastChanged.Set(nil) +} + +// UnsetCredentialLastChanged ensures that no value is present for CredentialLastChanged, not even an explicit nil +func (o *UserAccountInput) UnsetCredentialLastChanged() { + o.CredentialLastChanged.Unset() +} + +// GetAccountFirstLogin returns the AccountFirstLogin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetAccountFirstLogin() time.Time { + if o == nil || IsNil(o.AccountFirstLogin.Get()) { + var ret time.Time + return ret + } + return *o.AccountFirstLogin.Get() +} + +// GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetAccountFirstLoginOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.AccountFirstLogin.Get(), o.AccountFirstLogin.IsSet() +} + +// HasAccountFirstLogin returns a boolean if a field has been set. +func (o *UserAccountInput) HasAccountFirstLogin() bool { + if o != nil && o.AccountFirstLogin.IsSet() { + return true + } + + return false +} + +// SetAccountFirstLogin gets a reference to the given NullableTime and assigns it to the AccountFirstLogin field. +func (o *UserAccountInput) SetAccountFirstLogin(v time.Time) { + o.AccountFirstLogin.Set(&v) +} + +// SetAccountFirstLoginNil sets the value for AccountFirstLogin to be an explicit nil +func (o *UserAccountInput) SetAccountFirstLoginNil() { + o.AccountFirstLogin.Set(nil) +} + +// UnsetAccountFirstLogin ensures that no value is present for AccountFirstLogin, not even an explicit nil +func (o *UserAccountInput) UnsetAccountFirstLogin() { + o.AccountFirstLogin.Unset() +} + +// GetAccountLastLogin returns the AccountLastLogin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountInput) GetAccountLastLogin() time.Time { + if o == nil || IsNil(o.AccountLastLogin.Get()) { + var ret time.Time + return ret + } + return *o.AccountLastLogin.Get() +} + +// GetAccountLastLoginOk returns a tuple with the AccountLastLogin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountInput) GetAccountLastLoginOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.AccountLastLogin.Get(), o.AccountLastLogin.IsSet() +} + +// HasAccountLastLogin returns a boolean if a field has been set. +func (o *UserAccountInput) HasAccountLastLogin() bool { + if o != nil && o.AccountLastLogin.IsSet() { + return true + } + + return false +} + +// SetAccountLastLogin gets a reference to the given NullableTime and assigns it to the AccountLastLogin field. +func (o *UserAccountInput) SetAccountLastLogin(v time.Time) { + o.AccountLastLogin.Set(&v) +} + +// SetAccountLastLoginNil sets the value for AccountLastLogin to be an explicit nil +func (o *UserAccountInput) SetAccountLastLoginNil() { + o.AccountLastLogin.Set(nil) +} + +// UnsetAccountLastLogin ensures that no value is present for AccountLastLogin, not even an explicit nil +func (o *UserAccountInput) UnsetAccountLastLogin() { + o.AccountLastLogin.Unset() +} + +func (o UserAccountInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAccountInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if o.UserId.IsSet() { + toSerialize["user_id"] = o.UserId.Get() + } + if o.Credential.IsSet() { + toSerialize["credential"] = o.Credential.Get() + } + if o.AccountLogin.IsSet() { + toSerialize["account_login"] = o.AccountLogin.Get() + } + if o.AccountType.IsSet() { + toSerialize["account_type"] = o.AccountType.Get() + } + if o.DisplayName.IsSet() { + toSerialize["display_name"] = o.DisplayName.Get() + } + if o.IsServiceAccount.IsSet() { + toSerialize["is_service_account"] = o.IsServiceAccount.Get() + } + if o.IsPrivileged.IsSet() { + toSerialize["is_privileged"] = o.IsPrivileged.Get() + } + if o.CanEscalatePrivs.IsSet() { + toSerialize["can_escalate_privs"] = o.CanEscalatePrivs.Get() + } + if o.IsDisabled.IsSet() { + toSerialize["is_disabled"] = o.IsDisabled.Get() + } + if o.AccountCreated.IsSet() { + toSerialize["account_created"] = o.AccountCreated.Get() + } + if o.AccountExpires.IsSet() { + toSerialize["account_expires"] = o.AccountExpires.Get() + } + if o.CredentialLastChanged.IsSet() { + toSerialize["credential_last_changed"] = o.CredentialLastChanged.Get() + } + if o.AccountFirstLogin.IsSet() { + toSerialize["account_first_login"] = o.AccountFirstLogin.Get() + } + if o.AccountLastLogin.IsSet() { + toSerialize["account_last_login"] = o.AccountLastLogin.Get() + } + return toSerialize, nil +} + +func (o *UserAccountInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAccountInput := _UserAccountInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAccountInput) + + if err != nil { + return err + } + + *o = UserAccountInput(varUserAccountInput) + + return err +} + +type NullableUserAccountInput struct { + value *UserAccountInput + isSet bool +} + +func (v NullableUserAccountInput) Get() *UserAccountInput { + return v.value +} + +func (v *NullableUserAccountInput) Set(val *UserAccountInput) { + v.value = val + v.isSet = true +} + +func (v NullableUserAccountInput) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAccountInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAccountInput(val *UserAccountInput) *NullableUserAccountInput { + return &NullableUserAccountInput{value: val, isSet: true} +} + +func (v NullableUserAccountInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAccountInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_user_account_output.go b/model_user_account_output.go new file mode 100644 index 0000000..73d56ff --- /dev/null +++ b/model_user_account_output.go @@ -0,0 +1,1047 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UserAccountOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAccountOutput{} + +// UserAccountOutput Represents a user account observable based on the Oasis schema. https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_azo70vgj1vm2 account_login and account_type must be provided. Value should to be in the form :. +type UserAccountOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + UserId NullableString `json:"user_id,omitempty"` + Credential NullableString `json:"credential,omitempty"` + AccountLogin NullableString `json:"account_login,omitempty"` + AccountType NullableString `json:"account_type,omitempty"` + DisplayName NullableString `json:"display_name,omitempty"` + IsServiceAccount NullableBool `json:"is_service_account,omitempty"` + IsPrivileged NullableBool `json:"is_privileged,omitempty"` + CanEscalatePrivs NullableBool `json:"can_escalate_privs,omitempty"` + IsDisabled NullableBool `json:"is_disabled,omitempty"` + AccountCreated NullableTime `json:"account_created,omitempty"` + AccountExpires NullableTime `json:"account_expires,omitempty"` + CredentialLastChanged NullableTime `json:"credential_last_changed,omitempty"` + AccountFirstLogin NullableTime `json:"account_first_login,omitempty"` + AccountLastLogin NullableTime `json:"account_last_login,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _UserAccountOutput UserAccountOutput + +// NewUserAccountOutput instantiates a new UserAccountOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAccountOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *UserAccountOutput { + this := UserAccountOutput{} + this.Value = value + var type_ string = "user_account" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewUserAccountOutputWithDefaults instantiates a new UserAccountOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAccountOutputWithDefaults() *UserAccountOutput { + this := UserAccountOutput{} + var type_ string = "user_account" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *UserAccountOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *UserAccountOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *UserAccountOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UserAccountOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAccountOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UserAccountOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UserAccountOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *UserAccountOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAccountOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *UserAccountOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *UserAccountOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *UserAccountOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAccountOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *UserAccountOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *UserAccountOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *UserAccountOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAccountOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *UserAccountOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *UserAccountOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetUserId returns the UserId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetUserId() string { + if o == nil || IsNil(o.UserId.Get()) { + var ret string + return ret + } + return *o.UserId.Get() +} + +// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UserId.Get(), o.UserId.IsSet() +} + +// HasUserId returns a boolean if a field has been set. +func (o *UserAccountOutput) HasUserId() bool { + if o != nil && o.UserId.IsSet() { + return true + } + + return false +} + +// SetUserId gets a reference to the given NullableString and assigns it to the UserId field. +func (o *UserAccountOutput) SetUserId(v string) { + o.UserId.Set(&v) +} + +// SetUserIdNil sets the value for UserId to be an explicit nil +func (o *UserAccountOutput) SetUserIdNil() { + o.UserId.Set(nil) +} + +// UnsetUserId ensures that no value is present for UserId, not even an explicit nil +func (o *UserAccountOutput) UnsetUserId() { + o.UserId.Unset() +} + +// GetCredential returns the Credential field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetCredential() string { + if o == nil || IsNil(o.Credential.Get()) { + var ret string + return ret + } + return *o.Credential.Get() +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetCredentialOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Credential.Get(), o.Credential.IsSet() +} + +// HasCredential returns a boolean if a field has been set. +func (o *UserAccountOutput) HasCredential() bool { + if o != nil && o.Credential.IsSet() { + return true + } + + return false +} + +// SetCredential gets a reference to the given NullableString and assigns it to the Credential field. +func (o *UserAccountOutput) SetCredential(v string) { + o.Credential.Set(&v) +} + +// SetCredentialNil sets the value for Credential to be an explicit nil +func (o *UserAccountOutput) SetCredentialNil() { + o.Credential.Set(nil) +} + +// UnsetCredential ensures that no value is present for Credential, not even an explicit nil +func (o *UserAccountOutput) UnsetCredential() { + o.Credential.Unset() +} + +// GetAccountLogin returns the AccountLogin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetAccountLogin() string { + if o == nil || IsNil(o.AccountLogin.Get()) { + var ret string + return ret + } + return *o.AccountLogin.Get() +} + +// GetAccountLoginOk returns a tuple with the AccountLogin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetAccountLoginOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountLogin.Get(), o.AccountLogin.IsSet() +} + +// HasAccountLogin returns a boolean if a field has been set. +func (o *UserAccountOutput) HasAccountLogin() bool { + if o != nil && o.AccountLogin.IsSet() { + return true + } + + return false +} + +// SetAccountLogin gets a reference to the given NullableString and assigns it to the AccountLogin field. +func (o *UserAccountOutput) SetAccountLogin(v string) { + o.AccountLogin.Set(&v) +} + +// SetAccountLoginNil sets the value for AccountLogin to be an explicit nil +func (o *UserAccountOutput) SetAccountLoginNil() { + o.AccountLogin.Set(nil) +} + +// UnsetAccountLogin ensures that no value is present for AccountLogin, not even an explicit nil +func (o *UserAccountOutput) UnsetAccountLogin() { + o.AccountLogin.Unset() +} + +// GetAccountType returns the AccountType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetAccountType() string { + if o == nil || IsNil(o.AccountType.Get()) { + var ret string + return ret + } + return *o.AccountType.Get() +} + +// GetAccountTypeOk returns a tuple with the AccountType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetAccountTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountType.Get(), o.AccountType.IsSet() +} + +// HasAccountType returns a boolean if a field has been set. +func (o *UserAccountOutput) HasAccountType() bool { + if o != nil && o.AccountType.IsSet() { + return true + } + + return false +} + +// SetAccountType gets a reference to the given NullableString and assigns it to the AccountType field. +func (o *UserAccountOutput) SetAccountType(v string) { + o.AccountType.Set(&v) +} + +// SetAccountTypeNil sets the value for AccountType to be an explicit nil +func (o *UserAccountOutput) SetAccountTypeNil() { + o.AccountType.Set(nil) +} + +// UnsetAccountType ensures that no value is present for AccountType, not even an explicit nil +func (o *UserAccountOutput) UnsetAccountType() { + o.AccountType.Unset() +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName.Get()) { + var ret string + return ret + } + return *o.DisplayName.Get() +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DisplayName.Get(), o.DisplayName.IsSet() +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *UserAccountOutput) HasDisplayName() bool { + if o != nil && o.DisplayName.IsSet() { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given NullableString and assigns it to the DisplayName field. +func (o *UserAccountOutput) SetDisplayName(v string) { + o.DisplayName.Set(&v) +} + +// SetDisplayNameNil sets the value for DisplayName to be an explicit nil +func (o *UserAccountOutput) SetDisplayNameNil() { + o.DisplayName.Set(nil) +} + +// UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil +func (o *UserAccountOutput) UnsetDisplayName() { + o.DisplayName.Unset() +} + +// GetIsServiceAccount returns the IsServiceAccount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetIsServiceAccount() bool { + if o == nil || IsNil(o.IsServiceAccount.Get()) { + var ret bool + return ret + } + return *o.IsServiceAccount.Get() +} + +// GetIsServiceAccountOk returns a tuple with the IsServiceAccount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetIsServiceAccountOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsServiceAccount.Get(), o.IsServiceAccount.IsSet() +} + +// HasIsServiceAccount returns a boolean if a field has been set. +func (o *UserAccountOutput) HasIsServiceAccount() bool { + if o != nil && o.IsServiceAccount.IsSet() { + return true + } + + return false +} + +// SetIsServiceAccount gets a reference to the given NullableBool and assigns it to the IsServiceAccount field. +func (o *UserAccountOutput) SetIsServiceAccount(v bool) { + o.IsServiceAccount.Set(&v) +} + +// SetIsServiceAccountNil sets the value for IsServiceAccount to be an explicit nil +func (o *UserAccountOutput) SetIsServiceAccountNil() { + o.IsServiceAccount.Set(nil) +} + +// UnsetIsServiceAccount ensures that no value is present for IsServiceAccount, not even an explicit nil +func (o *UserAccountOutput) UnsetIsServiceAccount() { + o.IsServiceAccount.Unset() +} + +// GetIsPrivileged returns the IsPrivileged field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetIsPrivileged() bool { + if o == nil || IsNil(o.IsPrivileged.Get()) { + var ret bool + return ret + } + return *o.IsPrivileged.Get() +} + +// GetIsPrivilegedOk returns a tuple with the IsPrivileged field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetIsPrivilegedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsPrivileged.Get(), o.IsPrivileged.IsSet() +} + +// HasIsPrivileged returns a boolean if a field has been set. +func (o *UserAccountOutput) HasIsPrivileged() bool { + if o != nil && o.IsPrivileged.IsSet() { + return true + } + + return false +} + +// SetIsPrivileged gets a reference to the given NullableBool and assigns it to the IsPrivileged field. +func (o *UserAccountOutput) SetIsPrivileged(v bool) { + o.IsPrivileged.Set(&v) +} + +// SetIsPrivilegedNil sets the value for IsPrivileged to be an explicit nil +func (o *UserAccountOutput) SetIsPrivilegedNil() { + o.IsPrivileged.Set(nil) +} + +// UnsetIsPrivileged ensures that no value is present for IsPrivileged, not even an explicit nil +func (o *UserAccountOutput) UnsetIsPrivileged() { + o.IsPrivileged.Unset() +} + +// GetCanEscalatePrivs returns the CanEscalatePrivs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetCanEscalatePrivs() bool { + if o == nil || IsNil(o.CanEscalatePrivs.Get()) { + var ret bool + return ret + } + return *o.CanEscalatePrivs.Get() +} + +// GetCanEscalatePrivsOk returns a tuple with the CanEscalatePrivs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetCanEscalatePrivsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.CanEscalatePrivs.Get(), o.CanEscalatePrivs.IsSet() +} + +// HasCanEscalatePrivs returns a boolean if a field has been set. +func (o *UserAccountOutput) HasCanEscalatePrivs() bool { + if o != nil && o.CanEscalatePrivs.IsSet() { + return true + } + + return false +} + +// SetCanEscalatePrivs gets a reference to the given NullableBool and assigns it to the CanEscalatePrivs field. +func (o *UserAccountOutput) SetCanEscalatePrivs(v bool) { + o.CanEscalatePrivs.Set(&v) +} + +// SetCanEscalatePrivsNil sets the value for CanEscalatePrivs to be an explicit nil +func (o *UserAccountOutput) SetCanEscalatePrivsNil() { + o.CanEscalatePrivs.Set(nil) +} + +// UnsetCanEscalatePrivs ensures that no value is present for CanEscalatePrivs, not even an explicit nil +func (o *UserAccountOutput) UnsetCanEscalatePrivs() { + o.CanEscalatePrivs.Unset() +} + +// GetIsDisabled returns the IsDisabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetIsDisabled() bool { + if o == nil || IsNil(o.IsDisabled.Get()) { + var ret bool + return ret + } + return *o.IsDisabled.Get() +} + +// GetIsDisabledOk returns a tuple with the IsDisabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetIsDisabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDisabled.Get(), o.IsDisabled.IsSet() +} + +// HasIsDisabled returns a boolean if a field has been set. +func (o *UserAccountOutput) HasIsDisabled() bool { + if o != nil && o.IsDisabled.IsSet() { + return true + } + + return false +} + +// SetIsDisabled gets a reference to the given NullableBool and assigns it to the IsDisabled field. +func (o *UserAccountOutput) SetIsDisabled(v bool) { + o.IsDisabled.Set(&v) +} + +// SetIsDisabledNil sets the value for IsDisabled to be an explicit nil +func (o *UserAccountOutput) SetIsDisabledNil() { + o.IsDisabled.Set(nil) +} + +// UnsetIsDisabled ensures that no value is present for IsDisabled, not even an explicit nil +func (o *UserAccountOutput) UnsetIsDisabled() { + o.IsDisabled.Unset() +} + +// GetAccountCreated returns the AccountCreated field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetAccountCreated() time.Time { + if o == nil || IsNil(o.AccountCreated.Get()) { + var ret time.Time + return ret + } + return *o.AccountCreated.Get() +} + +// GetAccountCreatedOk returns a tuple with the AccountCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetAccountCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.AccountCreated.Get(), o.AccountCreated.IsSet() +} + +// HasAccountCreated returns a boolean if a field has been set. +func (o *UserAccountOutput) HasAccountCreated() bool { + if o != nil && o.AccountCreated.IsSet() { + return true + } + + return false +} + +// SetAccountCreated gets a reference to the given NullableTime and assigns it to the AccountCreated field. +func (o *UserAccountOutput) SetAccountCreated(v time.Time) { + o.AccountCreated.Set(&v) +} + +// SetAccountCreatedNil sets the value for AccountCreated to be an explicit nil +func (o *UserAccountOutput) SetAccountCreatedNil() { + o.AccountCreated.Set(nil) +} + +// UnsetAccountCreated ensures that no value is present for AccountCreated, not even an explicit nil +func (o *UserAccountOutput) UnsetAccountCreated() { + o.AccountCreated.Unset() +} + +// GetAccountExpires returns the AccountExpires field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetAccountExpires() time.Time { + if o == nil || IsNil(o.AccountExpires.Get()) { + var ret time.Time + return ret + } + return *o.AccountExpires.Get() +} + +// GetAccountExpiresOk returns a tuple with the AccountExpires field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetAccountExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.AccountExpires.Get(), o.AccountExpires.IsSet() +} + +// HasAccountExpires returns a boolean if a field has been set. +func (o *UserAccountOutput) HasAccountExpires() bool { + if o != nil && o.AccountExpires.IsSet() { + return true + } + + return false +} + +// SetAccountExpires gets a reference to the given NullableTime and assigns it to the AccountExpires field. +func (o *UserAccountOutput) SetAccountExpires(v time.Time) { + o.AccountExpires.Set(&v) +} + +// SetAccountExpiresNil sets the value for AccountExpires to be an explicit nil +func (o *UserAccountOutput) SetAccountExpiresNil() { + o.AccountExpires.Set(nil) +} + +// UnsetAccountExpires ensures that no value is present for AccountExpires, not even an explicit nil +func (o *UserAccountOutput) UnsetAccountExpires() { + o.AccountExpires.Unset() +} + +// GetCredentialLastChanged returns the CredentialLastChanged field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetCredentialLastChanged() time.Time { + if o == nil || IsNil(o.CredentialLastChanged.Get()) { + var ret time.Time + return ret + } + return *o.CredentialLastChanged.Get() +} + +// GetCredentialLastChangedOk returns a tuple with the CredentialLastChanged field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetCredentialLastChangedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CredentialLastChanged.Get(), o.CredentialLastChanged.IsSet() +} + +// HasCredentialLastChanged returns a boolean if a field has been set. +func (o *UserAccountOutput) HasCredentialLastChanged() bool { + if o != nil && o.CredentialLastChanged.IsSet() { + return true + } + + return false +} + +// SetCredentialLastChanged gets a reference to the given NullableTime and assigns it to the CredentialLastChanged field. +func (o *UserAccountOutput) SetCredentialLastChanged(v time.Time) { + o.CredentialLastChanged.Set(&v) +} + +// SetCredentialLastChangedNil sets the value for CredentialLastChanged to be an explicit nil +func (o *UserAccountOutput) SetCredentialLastChangedNil() { + o.CredentialLastChanged.Set(nil) +} + +// UnsetCredentialLastChanged ensures that no value is present for CredentialLastChanged, not even an explicit nil +func (o *UserAccountOutput) UnsetCredentialLastChanged() { + o.CredentialLastChanged.Unset() +} + +// GetAccountFirstLogin returns the AccountFirstLogin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetAccountFirstLogin() time.Time { + if o == nil || IsNil(o.AccountFirstLogin.Get()) { + var ret time.Time + return ret + } + return *o.AccountFirstLogin.Get() +} + +// GetAccountFirstLoginOk returns a tuple with the AccountFirstLogin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetAccountFirstLoginOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.AccountFirstLogin.Get(), o.AccountFirstLogin.IsSet() +} + +// HasAccountFirstLogin returns a boolean if a field has been set. +func (o *UserAccountOutput) HasAccountFirstLogin() bool { + if o != nil && o.AccountFirstLogin.IsSet() { + return true + } + + return false +} + +// SetAccountFirstLogin gets a reference to the given NullableTime and assigns it to the AccountFirstLogin field. +func (o *UserAccountOutput) SetAccountFirstLogin(v time.Time) { + o.AccountFirstLogin.Set(&v) +} + +// SetAccountFirstLoginNil sets the value for AccountFirstLogin to be an explicit nil +func (o *UserAccountOutput) SetAccountFirstLoginNil() { + o.AccountFirstLogin.Set(nil) +} + +// UnsetAccountFirstLogin ensures that no value is present for AccountFirstLogin, not even an explicit nil +func (o *UserAccountOutput) UnsetAccountFirstLogin() { + o.AccountFirstLogin.Unset() +} + +// GetAccountLastLogin returns the AccountLastLogin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAccountOutput) GetAccountLastLogin() time.Time { + if o == nil || IsNil(o.AccountLastLogin.Get()) { + var ret time.Time + return ret + } + return *o.AccountLastLogin.Get() +} + +// GetAccountLastLoginOk returns a tuple with the AccountLastLogin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAccountOutput) GetAccountLastLoginOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.AccountLastLogin.Get(), o.AccountLastLogin.IsSet() +} + +// HasAccountLastLogin returns a boolean if a field has been set. +func (o *UserAccountOutput) HasAccountLastLogin() bool { + if o != nil && o.AccountLastLogin.IsSet() { + return true + } + + return false +} + +// SetAccountLastLogin gets a reference to the given NullableTime and assigns it to the AccountLastLogin field. +func (o *UserAccountOutput) SetAccountLastLogin(v time.Time) { + o.AccountLastLogin.Set(&v) +} + +// SetAccountLastLoginNil sets the value for AccountLastLogin to be an explicit nil +func (o *UserAccountOutput) SetAccountLastLoginNil() { + o.AccountLastLogin.Set(nil) +} + +// UnsetAccountLastLogin ensures that no value is present for AccountLastLogin, not even an explicit nil +func (o *UserAccountOutput) UnsetAccountLastLogin() { + o.AccountLastLogin.Unset() +} + +// GetId returns the Id field value +func (o *UserAccountOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *UserAccountOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *UserAccountOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *UserAccountOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *UserAccountOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *UserAccountOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *UserAccountOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *UserAccountOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *UserAccountOutput) SetRootType(v string) { + o.RootType = v +} + +func (o UserAccountOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAccountOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if o.UserId.IsSet() { + toSerialize["user_id"] = o.UserId.Get() + } + if o.Credential.IsSet() { + toSerialize["credential"] = o.Credential.Get() + } + if o.AccountLogin.IsSet() { + toSerialize["account_login"] = o.AccountLogin.Get() + } + if o.AccountType.IsSet() { + toSerialize["account_type"] = o.AccountType.Get() + } + if o.DisplayName.IsSet() { + toSerialize["display_name"] = o.DisplayName.Get() + } + if o.IsServiceAccount.IsSet() { + toSerialize["is_service_account"] = o.IsServiceAccount.Get() + } + if o.IsPrivileged.IsSet() { + toSerialize["is_privileged"] = o.IsPrivileged.Get() + } + if o.CanEscalatePrivs.IsSet() { + toSerialize["can_escalate_privs"] = o.CanEscalatePrivs.Get() + } + if o.IsDisabled.IsSet() { + toSerialize["is_disabled"] = o.IsDisabled.Get() + } + if o.AccountCreated.IsSet() { + toSerialize["account_created"] = o.AccountCreated.Get() + } + if o.AccountExpires.IsSet() { + toSerialize["account_expires"] = o.AccountExpires.Get() + } + if o.CredentialLastChanged.IsSet() { + toSerialize["credential_last_changed"] = o.CredentialLastChanged.Get() + } + if o.AccountFirstLogin.IsSet() { + toSerialize["account_first_login"] = o.AccountFirstLogin.Get() + } + if o.AccountLastLogin.IsSet() { + toSerialize["account_last_login"] = o.AccountLastLogin.Get() + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *UserAccountOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAccountOutput := _UserAccountOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAccountOutput) + + if err != nil { + return err + } + + *o = UserAccountOutput(varUserAccountOutput) + + return err +} + +type NullableUserAccountOutput struct { + value *UserAccountOutput + isSet bool +} + +func (v NullableUserAccountOutput) Get() *UserAccountOutput { + return v.value +} + +func (v *NullableUserAccountOutput) Set(val *UserAccountOutput) { + v.value = val + v.isSet = true +} + +func (v NullableUserAccountOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAccountOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAccountOutput(val *UserAccountOutput) *NullableUserAccountOutput { + return &NullableUserAccountOutput{value: val, isSet: true} +} + +func (v NullableUserAccountOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAccountOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_user_agent_input.go b/model_user_agent_input.go new file mode 100644 index 0000000..4d1477f --- /dev/null +++ b/model_user_agent_input.go @@ -0,0 +1,305 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UserAgentInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAgentInput{} + +// UserAgentInput struct for UserAgentInput +type UserAgentInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` +} + +type _UserAgentInput UserAgentInput + +// NewUserAgentInput instantiates a new UserAgentInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAgentInput(value string) *UserAgentInput { + this := UserAgentInput{} + this.Value = value + var type_ string = "user_agent" + this.Type = &type_ + return &this +} + +// NewUserAgentInputWithDefaults instantiates a new UserAgentInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAgentInputWithDefaults() *UserAgentInput { + this := UserAgentInput{} + var type_ string = "user_agent" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *UserAgentInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *UserAgentInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *UserAgentInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UserAgentInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAgentInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UserAgentInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UserAgentInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *UserAgentInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAgentInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *UserAgentInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *UserAgentInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *UserAgentInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAgentInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *UserAgentInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *UserAgentInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *UserAgentInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAgentInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *UserAgentInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *UserAgentInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +func (o UserAgentInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAgentInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + return toSerialize, nil +} + +func (o *UserAgentInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAgentInput := _UserAgentInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAgentInput) + + if err != nil { + return err + } + + *o = UserAgentInput(varUserAgentInput) + + return err +} + +type NullableUserAgentInput struct { + value *UserAgentInput + isSet bool +} + +func (v NullableUserAgentInput) Get() *UserAgentInput { + return v.value +} + +func (v *NullableUserAgentInput) Set(val *UserAgentInput) { + v.value = val + v.isSet = true +} + +func (v NullableUserAgentInput) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAgentInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAgentInput(val *UserAgentInput) *NullableUserAgentInput { + return &NullableUserAgentInput{value: val, isSet: true} +} + +func (v NullableUserAgentInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAgentInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_user_agent_output.go b/model_user_agent_output.go new file mode 100644 index 0000000..31f9582 --- /dev/null +++ b/model_user_agent_output.go @@ -0,0 +1,389 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UserAgentOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAgentOutput{} + +// UserAgentOutput struct for UserAgentOutput +type UserAgentOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _UserAgentOutput UserAgentOutput + +// NewUserAgentOutput instantiates a new UserAgentOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAgentOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *UserAgentOutput { + this := UserAgentOutput{} + this.Value = value + var type_ string = "user_agent" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewUserAgentOutputWithDefaults instantiates a new UserAgentOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAgentOutputWithDefaults() *UserAgentOutput { + this := UserAgentOutput{} + var type_ string = "user_agent" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *UserAgentOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *UserAgentOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *UserAgentOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UserAgentOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAgentOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UserAgentOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UserAgentOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *UserAgentOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAgentOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *UserAgentOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *UserAgentOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *UserAgentOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAgentOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *UserAgentOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *UserAgentOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *UserAgentOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAgentOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *UserAgentOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *UserAgentOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetId returns the Id field value +func (o *UserAgentOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *UserAgentOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *UserAgentOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *UserAgentOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *UserAgentOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *UserAgentOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *UserAgentOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *UserAgentOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *UserAgentOutput) SetRootType(v string) { + o.RootType = v +} + +func (o UserAgentOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAgentOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *UserAgentOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAgentOutput := _UserAgentOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAgentOutput) + + if err != nil { + return err + } + + *o = UserAgentOutput(varUserAgentOutput) + + return err +} + +type NullableUserAgentOutput struct { + value *UserAgentOutput + isSet bool +} + +func (v NullableUserAgentOutput) Get() *UserAgentOutput { + return v.value +} + +func (v *NullableUserAgentOutput) Set(val *UserAgentOutput) { + v.value = val + v.isSet = true +} + +func (v NullableUserAgentOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAgentOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAgentOutput(val *UserAgentOutput) *NullableUserAgentOutput { + return &NullableUserAgentOutput{value: val, isSet: true} +} + +func (v NullableUserAgentOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAgentOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_validation_error.go b/model_validation_error.go new file mode 100644 index 0000000..d38a575 --- /dev/null +++ b/model_validation_error.go @@ -0,0 +1,212 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ValidationError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationError{} + +// ValidationError struct for ValidationError +type ValidationError struct { + Loc []ValidationErrorLocInner `json:"loc"` + Msg string `json:"msg"` + Type string `json:"type"` +} + +type _ValidationError ValidationError + +// NewValidationError instantiates a new ValidationError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidationError(loc []ValidationErrorLocInner, msg string, type_ string) *ValidationError { + this := ValidationError{} + this.Loc = loc + this.Msg = msg + this.Type = type_ + return &this +} + +// NewValidationErrorWithDefaults instantiates a new ValidationError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidationErrorWithDefaults() *ValidationError { + this := ValidationError{} + return &this +} + +// GetLoc returns the Loc field value +func (o *ValidationError) GetLoc() []ValidationErrorLocInner { + if o == nil { + var ret []ValidationErrorLocInner + return ret + } + + return o.Loc +} + +// GetLocOk returns a tuple with the Loc field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetLocOk() ([]ValidationErrorLocInner, bool) { + if o == nil { + return nil, false + } + return o.Loc, true +} + +// SetLoc sets field value +func (o *ValidationError) SetLoc(v []ValidationErrorLocInner) { + o.Loc = v +} + +// GetMsg returns the Msg field value +func (o *ValidationError) GetMsg() string { + if o == nil { + var ret string + return ret + } + + return o.Msg +} + +// GetMsgOk returns a tuple with the Msg field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetMsgOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Msg, true +} + +// SetMsg sets field value +func (o *ValidationError) SetMsg(v string) { + o.Msg = v +} + +// GetType returns the Type field value +func (o *ValidationError) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ValidationError) SetType(v string) { + o.Type = v +} + +func (o ValidationError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["loc"] = o.Loc + toSerialize["msg"] = o.Msg + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *ValidationError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "loc", + "msg", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varValidationError := _ValidationError{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varValidationError) + + if err != nil { + return err + } + + *o = ValidationError(varValidationError) + + return err +} + +type NullableValidationError struct { + value *ValidationError + isSet bool +} + +func (v NullableValidationError) Get() *ValidationError { + return v.value +} + +func (v *NullableValidationError) Set(val *ValidationError) { + v.value = val + v.isSet = true +} + +func (v NullableValidationError) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationError(val *ValidationError) *NullableValidationError { + return &NullableValidationError{value: val, isSet: true} +} + +func (v NullableValidationError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_validation_error_loc_inner.go b/model_validation_error_loc_inner.go new file mode 100644 index 0000000..d33a80f --- /dev/null +++ b/model_validation_error_loc_inner.go @@ -0,0 +1,103 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// ValidationErrorLocInner struct for ValidationErrorLocInner +type ValidationErrorLocInner struct { + Int32 *int32 + String *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *ValidationErrorLocInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into Int32 + err = json.Unmarshal(data, &dst.Int32) + if err == nil { + jsonInt32, _ := json.Marshal(dst.Int32) + if string(jsonInt32) == "{}" { // empty struct + dst.Int32 = nil + } else { + return nil // data stored in dst.Int32, return on the first match + } + } else { + dst.Int32 = nil + } + + // try to unmarshal JSON data into String + err = json.Unmarshal(data, &dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + return nil // data stored in dst.String, return on the first match + } + } else { + dst.String = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(ValidationErrorLocInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ValidationErrorLocInner) MarshalJSON() ([]byte, error) { + if src.Int32 != nil { + return json.Marshal(&src.Int32) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableValidationErrorLocInner struct { + value *ValidationErrorLocInner + isSet bool +} + +func (v NullableValidationErrorLocInner) Get() *ValidationErrorLocInner { + return v.value +} + +func (v *NullableValidationErrorLocInner) Set(val *ValidationErrorLocInner) { + v.value = val + v.isSet = true +} + +func (v NullableValidationErrorLocInner) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationErrorLocInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationErrorLocInner(val *ValidationErrorLocInner) *NullableValidationErrorLocInner { + return &NullableValidationErrorLocInner{value: val, isSet: true} +} + +func (v NullableValidationErrorLocInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationErrorLocInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_vertices_value.go b/model_vertices_value.go new file mode 100644 index 0000000..c2e7c13 --- /dev/null +++ b/model_vertices_value.go @@ -0,0 +1,463 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "encoding/json" + "fmt" +) + +// VerticesValue struct for VerticesValue +type VerticesValue struct { + AttackPatternOutput *AttackPatternOutput + CampaignOutput *CampaignOutput + CompanyOutput *CompanyOutput + CourseOfActionOutput *CourseOfActionOutput + DfiqInner *DfiqInner + ForensicArtifactOutput *ForensicArtifactOutput + IdentityOutput *IdentityOutput + IntrusionSetOutput *IntrusionSetOutput + InvestigationOutput *InvestigationOutput + MalwareOutput *MalwareOutput + NoteOutput *NoteOutput + Observable *Observable + PhoneOutput *PhoneOutput + QueryOutput *QueryOutput + RegexOutput *RegexOutput + SigmaOutput *SigmaOutput + SuricataOutput *SuricataOutput + Tag *Tag + ThreatActorOutput *ThreatActorOutput + ToolOutput *ToolOutput + VulnerabilityOutput *VulnerabilityOutput + YaraOutput *YaraOutput +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *VerticesValue) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AttackPatternOutput + err = json.Unmarshal(data, &dst.AttackPatternOutput) + if err == nil { + jsonAttackPatternOutput, _ := json.Marshal(dst.AttackPatternOutput) + if string(jsonAttackPatternOutput) == "{}" { // empty struct + dst.AttackPatternOutput = nil + } else { + return nil // data stored in dst.AttackPatternOutput, return on the first match + } + } else { + dst.AttackPatternOutput = nil + } + + // try to unmarshal JSON data into CampaignOutput + err = json.Unmarshal(data, &dst.CampaignOutput) + if err == nil { + jsonCampaignOutput, _ := json.Marshal(dst.CampaignOutput) + if string(jsonCampaignOutput) == "{}" { // empty struct + dst.CampaignOutput = nil + } else { + return nil // data stored in dst.CampaignOutput, return on the first match + } + } else { + dst.CampaignOutput = nil + } + + // try to unmarshal JSON data into CompanyOutput + err = json.Unmarshal(data, &dst.CompanyOutput) + if err == nil { + jsonCompanyOutput, _ := json.Marshal(dst.CompanyOutput) + if string(jsonCompanyOutput) == "{}" { // empty struct + dst.CompanyOutput = nil + } else { + return nil // data stored in dst.CompanyOutput, return on the first match + } + } else { + dst.CompanyOutput = nil + } + + // try to unmarshal JSON data into CourseOfActionOutput + err = json.Unmarshal(data, &dst.CourseOfActionOutput) + if err == nil { + jsonCourseOfActionOutput, _ := json.Marshal(dst.CourseOfActionOutput) + if string(jsonCourseOfActionOutput) == "{}" { // empty struct + dst.CourseOfActionOutput = nil + } else { + return nil // data stored in dst.CourseOfActionOutput, return on the first match + } + } else { + dst.CourseOfActionOutput = nil + } + + // try to unmarshal JSON data into DfiqInner + err = json.Unmarshal(data, &dst.DfiqInner) + if err == nil { + jsonDfiqInner, _ := json.Marshal(dst.DfiqInner) + if string(jsonDfiqInner) == "{}" { // empty struct + dst.DfiqInner = nil + } else { + return nil // data stored in dst.DfiqInner, return on the first match + } + } else { + dst.DfiqInner = nil + } + + // try to unmarshal JSON data into ForensicArtifactOutput + err = json.Unmarshal(data, &dst.ForensicArtifactOutput) + if err == nil { + jsonForensicArtifactOutput, _ := json.Marshal(dst.ForensicArtifactOutput) + if string(jsonForensicArtifactOutput) == "{}" { // empty struct + dst.ForensicArtifactOutput = nil + } else { + return nil // data stored in dst.ForensicArtifactOutput, return on the first match + } + } else { + dst.ForensicArtifactOutput = nil + } + + // try to unmarshal JSON data into IdentityOutput + err = json.Unmarshal(data, &dst.IdentityOutput) + if err == nil { + jsonIdentityOutput, _ := json.Marshal(dst.IdentityOutput) + if string(jsonIdentityOutput) == "{}" { // empty struct + dst.IdentityOutput = nil + } else { + return nil // data stored in dst.IdentityOutput, return on the first match + } + } else { + dst.IdentityOutput = nil + } + + // try to unmarshal JSON data into IntrusionSetOutput + err = json.Unmarshal(data, &dst.IntrusionSetOutput) + if err == nil { + jsonIntrusionSetOutput, _ := json.Marshal(dst.IntrusionSetOutput) + if string(jsonIntrusionSetOutput) == "{}" { // empty struct + dst.IntrusionSetOutput = nil + } else { + return nil // data stored in dst.IntrusionSetOutput, return on the first match + } + } else { + dst.IntrusionSetOutput = nil + } + + // try to unmarshal JSON data into InvestigationOutput + err = json.Unmarshal(data, &dst.InvestigationOutput) + if err == nil { + jsonInvestigationOutput, _ := json.Marshal(dst.InvestigationOutput) + if string(jsonInvestigationOutput) == "{}" { // empty struct + dst.InvestigationOutput = nil + } else { + return nil // data stored in dst.InvestigationOutput, return on the first match + } + } else { + dst.InvestigationOutput = nil + } + + // try to unmarshal JSON data into MalwareOutput + err = json.Unmarshal(data, &dst.MalwareOutput) + if err == nil { + jsonMalwareOutput, _ := json.Marshal(dst.MalwareOutput) + if string(jsonMalwareOutput) == "{}" { // empty struct + dst.MalwareOutput = nil + } else { + return nil // data stored in dst.MalwareOutput, return on the first match + } + } else { + dst.MalwareOutput = nil + } + + // try to unmarshal JSON data into NoteOutput + err = json.Unmarshal(data, &dst.NoteOutput) + if err == nil { + jsonNoteOutput, _ := json.Marshal(dst.NoteOutput) + if string(jsonNoteOutput) == "{}" { // empty struct + dst.NoteOutput = nil + } else { + return nil // data stored in dst.NoteOutput, return on the first match + } + } else { + dst.NoteOutput = nil + } + + // try to unmarshal JSON data into Observable + err = json.Unmarshal(data, &dst.Observable) + if err == nil { + jsonObservable, _ := json.Marshal(dst.Observable) + if string(jsonObservable) == "{}" { // empty struct + dst.Observable = nil + } else { + return nil // data stored in dst.Observable, return on the first match + } + } else { + dst.Observable = nil + } + + // try to unmarshal JSON data into PhoneOutput + err = json.Unmarshal(data, &dst.PhoneOutput) + if err == nil { + jsonPhoneOutput, _ := json.Marshal(dst.PhoneOutput) + if string(jsonPhoneOutput) == "{}" { // empty struct + dst.PhoneOutput = nil + } else { + return nil // data stored in dst.PhoneOutput, return on the first match + } + } else { + dst.PhoneOutput = nil + } + + // try to unmarshal JSON data into QueryOutput + err = json.Unmarshal(data, &dst.QueryOutput) + if err == nil { + jsonQueryOutput, _ := json.Marshal(dst.QueryOutput) + if string(jsonQueryOutput) == "{}" { // empty struct + dst.QueryOutput = nil + } else { + return nil // data stored in dst.QueryOutput, return on the first match + } + } else { + dst.QueryOutput = nil + } + + // try to unmarshal JSON data into RegexOutput + err = json.Unmarshal(data, &dst.RegexOutput) + if err == nil { + jsonRegexOutput, _ := json.Marshal(dst.RegexOutput) + if string(jsonRegexOutput) == "{}" { // empty struct + dst.RegexOutput = nil + } else { + return nil // data stored in dst.RegexOutput, return on the first match + } + } else { + dst.RegexOutput = nil + } + + // try to unmarshal JSON data into SigmaOutput + err = json.Unmarshal(data, &dst.SigmaOutput) + if err == nil { + jsonSigmaOutput, _ := json.Marshal(dst.SigmaOutput) + if string(jsonSigmaOutput) == "{}" { // empty struct + dst.SigmaOutput = nil + } else { + return nil // data stored in dst.SigmaOutput, return on the first match + } + } else { + dst.SigmaOutput = nil + } + + // try to unmarshal JSON data into SuricataOutput + err = json.Unmarshal(data, &dst.SuricataOutput) + if err == nil { + jsonSuricataOutput, _ := json.Marshal(dst.SuricataOutput) + if string(jsonSuricataOutput) == "{}" { // empty struct + dst.SuricataOutput = nil + } else { + return nil // data stored in dst.SuricataOutput, return on the first match + } + } else { + dst.SuricataOutput = nil + } + + // try to unmarshal JSON data into Tag + err = json.Unmarshal(data, &dst.Tag) + if err == nil { + jsonTag, _ := json.Marshal(dst.Tag) + if string(jsonTag) == "{}" { // empty struct + dst.Tag = nil + } else { + return nil // data stored in dst.Tag, return on the first match + } + } else { + dst.Tag = nil + } + + // try to unmarshal JSON data into ThreatActorOutput + err = json.Unmarshal(data, &dst.ThreatActorOutput) + if err == nil { + jsonThreatActorOutput, _ := json.Marshal(dst.ThreatActorOutput) + if string(jsonThreatActorOutput) == "{}" { // empty struct + dst.ThreatActorOutput = nil + } else { + return nil // data stored in dst.ThreatActorOutput, return on the first match + } + } else { + dst.ThreatActorOutput = nil + } + + // try to unmarshal JSON data into ToolOutput + err = json.Unmarshal(data, &dst.ToolOutput) + if err == nil { + jsonToolOutput, _ := json.Marshal(dst.ToolOutput) + if string(jsonToolOutput) == "{}" { // empty struct + dst.ToolOutput = nil + } else { + return nil // data stored in dst.ToolOutput, return on the first match + } + } else { + dst.ToolOutput = nil + } + + // try to unmarshal JSON data into VulnerabilityOutput + err = json.Unmarshal(data, &dst.VulnerabilityOutput) + if err == nil { + jsonVulnerabilityOutput, _ := json.Marshal(dst.VulnerabilityOutput) + if string(jsonVulnerabilityOutput) == "{}" { // empty struct + dst.VulnerabilityOutput = nil + } else { + return nil // data stored in dst.VulnerabilityOutput, return on the first match + } + } else { + dst.VulnerabilityOutput = nil + } + + // try to unmarshal JSON data into YaraOutput + err = json.Unmarshal(data, &dst.YaraOutput) + if err == nil { + jsonYaraOutput, _ := json.Marshal(dst.YaraOutput) + if string(jsonYaraOutput) == "{}" { // empty struct + dst.YaraOutput = nil + } else { + return nil // data stored in dst.YaraOutput, return on the first match + } + } else { + dst.YaraOutput = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(VerticesValue)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src VerticesValue) MarshalJSON() ([]byte, error) { + if src.AttackPatternOutput != nil { + return json.Marshal(&src.AttackPatternOutput) + } + + if src.CampaignOutput != nil { + return json.Marshal(&src.CampaignOutput) + } + + if src.CompanyOutput != nil { + return json.Marshal(&src.CompanyOutput) + } + + if src.CourseOfActionOutput != nil { + return json.Marshal(&src.CourseOfActionOutput) + } + + if src.DfiqInner != nil { + return json.Marshal(&src.DfiqInner) + } + + if src.ForensicArtifactOutput != nil { + return json.Marshal(&src.ForensicArtifactOutput) + } + + if src.IdentityOutput != nil { + return json.Marshal(&src.IdentityOutput) + } + + if src.IntrusionSetOutput != nil { + return json.Marshal(&src.IntrusionSetOutput) + } + + if src.InvestigationOutput != nil { + return json.Marshal(&src.InvestigationOutput) + } + + if src.MalwareOutput != nil { + return json.Marshal(&src.MalwareOutput) + } + + if src.NoteOutput != nil { + return json.Marshal(&src.NoteOutput) + } + + if src.Observable != nil { + return json.Marshal(&src.Observable) + } + + if src.PhoneOutput != nil { + return json.Marshal(&src.PhoneOutput) + } + + if src.QueryOutput != nil { + return json.Marshal(&src.QueryOutput) + } + + if src.RegexOutput != nil { + return json.Marshal(&src.RegexOutput) + } + + if src.SigmaOutput != nil { + return json.Marshal(&src.SigmaOutput) + } + + if src.SuricataOutput != nil { + return json.Marshal(&src.SuricataOutput) + } + + if src.Tag != nil { + return json.Marshal(&src.Tag) + } + + if src.ThreatActorOutput != nil { + return json.Marshal(&src.ThreatActorOutput) + } + + if src.ToolOutput != nil { + return json.Marshal(&src.ToolOutput) + } + + if src.VulnerabilityOutput != nil { + return json.Marshal(&src.VulnerabilityOutput) + } + + if src.YaraOutput != nil { + return json.Marshal(&src.YaraOutput) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableVerticesValue struct { + value *VerticesValue + isSet bool +} + +func (v NullableVerticesValue) Get() *VerticesValue { + return v.value +} + +func (v *NullableVerticesValue) Set(val *VerticesValue) { + v.value = val + v.isSet = true +} + +func (v NullableVerticesValue) IsSet() bool { + return v.isSet +} + +func (v *NullableVerticesValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerticesValue(val *VerticesValue) *NullableVerticesValue { + return &NullableVerticesValue{value: val, isSet: true} +} + +func (v NullableVerticesValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerticesValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_vulnerability_input.go b/model_vulnerability_input.go new file mode 100644 index 0000000..0bba95e --- /dev/null +++ b/model_vulnerability_input.go @@ -0,0 +1,501 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the VulnerabilityInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VulnerabilityInput{} + +// VulnerabilityInput This class represents a vulnerability in the schema. Attributes: title: title of the vulnerability. base_score : base score of the vulnerability obtained from CVSS metric ranging from 0.0 to 10.0. severity: represents the severity of a vulnerability. One of none, low, medium, high, critical. +type VulnerabilityInput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Title *string `json:"title,omitempty"` + BaseScore *float32 `json:"base_score,omitempty"` + Severity *SeverityType `json:"severity,omitempty"` + Reference *string `json:"reference,omitempty"` +} + +type _VulnerabilityInput VulnerabilityInput + +// NewVulnerabilityInput instantiates a new VulnerabilityInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerabilityInput(name string) *VulnerabilityInput { + this := VulnerabilityInput{} + var type_ string = "vulnerability" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var title string = "" + this.Title = &title + var baseScore float32 = 0.0 + this.BaseScore = &baseScore + var reference string = "" + this.Reference = &reference + return &this +} + +// NewVulnerabilityInputWithDefaults instantiates a new VulnerabilityInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityInputWithDefaults() *VulnerabilityInput { + this := VulnerabilityInput{} + var type_ string = "vulnerability" + this.Type = &type_ + var description string = "" + this.Description = &description + var title string = "" + this.Title = &title + var baseScore float32 = 0.0 + this.BaseScore = &baseScore + var reference string = "" + this.Reference = &reference + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *VulnerabilityInput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *VulnerabilityInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *VulnerabilityInput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *VulnerabilityInput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *VulnerabilityInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *VulnerabilityInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *VulnerabilityInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *VulnerabilityInput) SetTitle(v string) { + o.Title = &v +} + +// GetBaseScore returns the BaseScore field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetBaseScore() float32 { + if o == nil || IsNil(o.BaseScore) { + var ret float32 + return ret + } + return *o.BaseScore +} + +// GetBaseScoreOk returns a tuple with the BaseScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetBaseScoreOk() (*float32, bool) { + if o == nil || IsNil(o.BaseScore) { + return nil, false + } + return o.BaseScore, true +} + +// HasBaseScore returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasBaseScore() bool { + if o != nil && !IsNil(o.BaseScore) { + return true + } + + return false +} + +// SetBaseScore gets a reference to the given float32 and assigns it to the BaseScore field. +func (o *VulnerabilityInput) SetBaseScore(v float32) { + o.BaseScore = &v +} + +// GetSeverity returns the Severity field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetSeverity() SeverityType { + if o == nil || IsNil(o.Severity) { + var ret SeverityType + return ret + } + return *o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetSeverityOk() (*SeverityType, bool) { + if o == nil || IsNil(o.Severity) { + return nil, false + } + return o.Severity, true +} + +// HasSeverity returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasSeverity() bool { + if o != nil && !IsNil(o.Severity) { + return true + } + + return false +} + +// SetSeverity gets a reference to the given SeverityType and assigns it to the Severity field. +func (o *VulnerabilityInput) SetSeverity(v SeverityType) { + o.Severity = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *VulnerabilityInput) GetReference() string { + if o == nil || IsNil(o.Reference) { + var ret string + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityInput) GetReferenceOk() (*string, bool) { + if o == nil || IsNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *VulnerabilityInput) HasReference() bool { + if o != nil && !IsNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given string and assigns it to the Reference field. +func (o *VulnerabilityInput) SetReference(v string) { + o.Reference = &v +} + +func (o VulnerabilityInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VulnerabilityInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.BaseScore) { + toSerialize["base_score"] = o.BaseScore + } + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity + } + if !IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + return toSerialize, nil +} + +func (o *VulnerabilityInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVulnerabilityInput := _VulnerabilityInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVulnerabilityInput) + + if err != nil { + return err + } + + *o = VulnerabilityInput(varVulnerabilityInput) + + return err +} + +type NullableVulnerabilityInput struct { + value *VulnerabilityInput + isSet bool +} + +func (v NullableVulnerabilityInput) Get() *VulnerabilityInput { + return v.value +} + +func (v *NullableVulnerabilityInput) Set(val *VulnerabilityInput) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerabilityInput) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerabilityInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerabilityInput(val *VulnerabilityInput) *NullableVulnerabilityInput { + return &NullableVulnerabilityInput{value: val, isSet: true} +} + +func (v NullableVulnerabilityInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerabilityInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_vulnerability_output.go b/model_vulnerability_output.go new file mode 100644 index 0000000..13abf38 --- /dev/null +++ b/model_vulnerability_output.go @@ -0,0 +1,613 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the VulnerabilityOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VulnerabilityOutput{} + +// VulnerabilityOutput This class represents a vulnerability in the schema. Attributes: title: title of the vulnerability. base_score : base score of the vulnerability obtained from CVSS metric ranging from 0.0 to 10.0. severity: represents the severity of a vulnerability. One of none, low, medium, high, critical. +type VulnerabilityOutput struct { + Type *string `json:"type,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Title *string `json:"title,omitempty"` + BaseScore *float32 `json:"base_score,omitempty"` + Severity *SeverityType `json:"severity,omitempty"` + Reference *string `json:"reference,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` + RelatedObservablesCount int32 `json:"related_observables_count"` +} + +type _VulnerabilityOutput VulnerabilityOutput + +// NewVulnerabilityOutput instantiates a new VulnerabilityOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerabilityOutput(name string, id string, tags map[string]TagRelationshipOutput, rootType string, relatedObservablesCount int32) *VulnerabilityOutput { + this := VulnerabilityOutput{} + var type_ string = "vulnerability" + this.Type = &type_ + this.Name = name + var description string = "" + this.Description = &description + var title string = "" + this.Title = &title + var baseScore float32 = 0.0 + this.BaseScore = &baseScore + var reference string = "" + this.Reference = &reference + this.Id = id + this.Tags = tags + this.RootType = rootType + this.RelatedObservablesCount = relatedObservablesCount + return &this +} + +// NewVulnerabilityOutputWithDefaults instantiates a new VulnerabilityOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityOutputWithDefaults() *VulnerabilityOutput { + this := VulnerabilityOutput{} + var type_ string = "vulnerability" + this.Type = &type_ + var description string = "" + this.Description = &description + var title string = "" + this.Title = &title + var baseScore float32 = 0.0 + this.BaseScore = &baseScore + var reference string = "" + this.Reference = &reference + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *VulnerabilityOutput) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value +func (o *VulnerabilityOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *VulnerabilityOutput) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *VulnerabilityOutput) SetDescription(v string) { + o.Description = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *VulnerabilityOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *VulnerabilityOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *VulnerabilityOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *VulnerabilityOutput) SetTitle(v string) { + o.Title = &v +} + +// GetBaseScore returns the BaseScore field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetBaseScore() float32 { + if o == nil || IsNil(o.BaseScore) { + var ret float32 + return ret + } + return *o.BaseScore +} + +// GetBaseScoreOk returns a tuple with the BaseScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetBaseScoreOk() (*float32, bool) { + if o == nil || IsNil(o.BaseScore) { + return nil, false + } + return o.BaseScore, true +} + +// HasBaseScore returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasBaseScore() bool { + if o != nil && !IsNil(o.BaseScore) { + return true + } + + return false +} + +// SetBaseScore gets a reference to the given float32 and assigns it to the BaseScore field. +func (o *VulnerabilityOutput) SetBaseScore(v float32) { + o.BaseScore = &v +} + +// GetSeverity returns the Severity field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetSeverity() SeverityType { + if o == nil || IsNil(o.Severity) { + var ret SeverityType + return ret + } + return *o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetSeverityOk() (*SeverityType, bool) { + if o == nil || IsNil(o.Severity) { + return nil, false + } + return o.Severity, true +} + +// HasSeverity returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasSeverity() bool { + if o != nil && !IsNil(o.Severity) { + return true + } + + return false +} + +// SetSeverity gets a reference to the given SeverityType and assigns it to the Severity field. +func (o *VulnerabilityOutput) SetSeverity(v SeverityType) { + o.Severity = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *VulnerabilityOutput) GetReference() string { + if o == nil || IsNil(o.Reference) { + var ret string + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetReferenceOk() (*string, bool) { + if o == nil || IsNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *VulnerabilityOutput) HasReference() bool { + if o != nil && !IsNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given string and assigns it to the Reference field. +func (o *VulnerabilityOutput) SetReference(v string) { + o.Reference = &v +} + +// GetId returns the Id field value +func (o *VulnerabilityOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *VulnerabilityOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *VulnerabilityOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *VulnerabilityOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *VulnerabilityOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *VulnerabilityOutput) SetRootType(v string) { + o.RootType = v +} + +// GetRelatedObservablesCount returns the RelatedObservablesCount field value +func (o *VulnerabilityOutput) GetRelatedObservablesCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RelatedObservablesCount +} + +// GetRelatedObservablesCountOk returns a tuple with the RelatedObservablesCount field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityOutput) GetRelatedObservablesCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RelatedObservablesCount, true +} + +// SetRelatedObservablesCount sets field value +func (o *VulnerabilityOutput) SetRelatedObservablesCount(v int32) { + o.RelatedObservablesCount = v +} + +func (o VulnerabilityOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VulnerabilityOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.BaseScore) { + toSerialize["base_score"] = o.BaseScore + } + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity + } + if !IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + toSerialize["related_observables_count"] = o.RelatedObservablesCount + return toSerialize, nil +} + +func (o *VulnerabilityOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "tags", + "root_type", + "related_observables_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVulnerabilityOutput := _VulnerabilityOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVulnerabilityOutput) + + if err != nil { + return err + } + + *o = VulnerabilityOutput(varVulnerabilityOutput) + + return err +} + +type NullableVulnerabilityOutput struct { + value *VulnerabilityOutput + isSet bool +} + +func (v NullableVulnerabilityOutput) Get() *VulnerabilityOutput { + return v.value +} + +func (v *NullableVulnerabilityOutput) Set(val *VulnerabilityOutput) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerabilityOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerabilityOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerabilityOutput(val *VulnerabilityOutput) *NullableVulnerabilityOutput { + return &NullableVulnerabilityOutput{value: val, isSet: true} +} + +func (v NullableVulnerabilityOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerabilityOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_wallet_input.go b/model_wallet_input.go new file mode 100644 index 0000000..383981f --- /dev/null +++ b/model_wallet_input.go @@ -0,0 +1,399 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the WalletInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WalletInput{} + +// WalletInput Represents a wallet observable. coin and address must be provided. Value should be in the form :
. +type WalletInput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Coin NullableString `json:"coin,omitempty"` + Address NullableString `json:"address,omitempty"` +} + +type _WalletInput WalletInput + +// NewWalletInput instantiates a new WalletInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWalletInput(value string) *WalletInput { + this := WalletInput{} + this.Value = value + var type_ string = "wallet" + this.Type = &type_ + return &this +} + +// NewWalletInputWithDefaults instantiates a new WalletInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWalletInputWithDefaults() *WalletInput { + this := WalletInput{} + var type_ string = "wallet" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *WalletInput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *WalletInput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *WalletInput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *WalletInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *WalletInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *WalletInput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *WalletInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *WalletInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *WalletInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *WalletInput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletInput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *WalletInput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *WalletInput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *WalletInput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletInput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *WalletInput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *WalletInput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetCoin returns the Coin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WalletInput) GetCoin() string { + if o == nil || IsNil(o.Coin.Get()) { + var ret string + return ret + } + return *o.Coin.Get() +} + +// GetCoinOk returns a tuple with the Coin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WalletInput) GetCoinOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Coin.Get(), o.Coin.IsSet() +} + +// HasCoin returns a boolean if a field has been set. +func (o *WalletInput) HasCoin() bool { + if o != nil && o.Coin.IsSet() { + return true + } + + return false +} + +// SetCoin gets a reference to the given NullableString and assigns it to the Coin field. +func (o *WalletInput) SetCoin(v string) { + o.Coin.Set(&v) +} + +// SetCoinNil sets the value for Coin to be an explicit nil +func (o *WalletInput) SetCoinNil() { + o.Coin.Set(nil) +} + +// UnsetCoin ensures that no value is present for Coin, not even an explicit nil +func (o *WalletInput) UnsetCoin() { + o.Coin.Unset() +} + +// GetAddress returns the Address field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WalletInput) GetAddress() string { + if o == nil || IsNil(o.Address.Get()) { + var ret string + return ret + } + return *o.Address.Get() +} + +// GetAddressOk returns a tuple with the Address field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WalletInput) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Address.Get(), o.Address.IsSet() +} + +// HasAddress returns a boolean if a field has been set. +func (o *WalletInput) HasAddress() bool { + if o != nil && o.Address.IsSet() { + return true + } + + return false +} + +// SetAddress gets a reference to the given NullableString and assigns it to the Address field. +func (o *WalletInput) SetAddress(v string) { + o.Address.Set(&v) +} + +// SetAddressNil sets the value for Address to be an explicit nil +func (o *WalletInput) SetAddressNil() { + o.Address.Set(nil) +} + +// UnsetAddress ensures that no value is present for Address, not even an explicit nil +func (o *WalletInput) UnsetAddress() { + o.Address.Unset() +} + +func (o WalletInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WalletInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if o.Coin.IsSet() { + toSerialize["coin"] = o.Coin.Get() + } + if o.Address.IsSet() { + toSerialize["address"] = o.Address.Get() + } + return toSerialize, nil +} + +func (o *WalletInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWalletInput := _WalletInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWalletInput) + + if err != nil { + return err + } + + *o = WalletInput(varWalletInput) + + return err +} + +type NullableWalletInput struct { + value *WalletInput + isSet bool +} + +func (v NullableWalletInput) Get() *WalletInput { + return v.value +} + +func (v *NullableWalletInput) Set(val *WalletInput) { + v.value = val + v.isSet = true +} + +func (v NullableWalletInput) IsSet() bool { + return v.isSet +} + +func (v *NullableWalletInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWalletInput(val *WalletInput) *NullableWalletInput { + return &NullableWalletInput{value: val, isSet: true} +} + +func (v NullableWalletInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWalletInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_wallet_output.go b/model_wallet_output.go new file mode 100644 index 0000000..7c84994 --- /dev/null +++ b/model_wallet_output.go @@ -0,0 +1,483 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the WalletOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WalletOutput{} + +// WalletOutput Represents a wallet observable. coin and address must be provided. Value should be in the form :
. +type WalletOutput struct { + Value string `json:"value"` + Type *string `json:"type,omitempty"` + Created *time.Time `json:"created,omitempty"` + Context []map[string]interface{} `json:"context,omitempty"` + LastAnalysis map[string]time.Time `json:"last_analysis,omitempty"` + Coin NullableString `json:"coin,omitempty"` + Address NullableString `json:"address,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _WalletOutput WalletOutput + +// NewWalletOutput instantiates a new WalletOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWalletOutput(value string, id string, tags map[string]TagRelationshipOutput, rootType string) *WalletOutput { + this := WalletOutput{} + this.Value = value + var type_ string = "wallet" + this.Type = &type_ + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewWalletOutputWithDefaults instantiates a new WalletOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWalletOutputWithDefaults() *WalletOutput { + this := WalletOutput{} + var type_ string = "wallet" + this.Type = &type_ + return &this +} + +// GetValue returns the Value field value +func (o *WalletOutput) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *WalletOutput) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *WalletOutput) SetValue(v string) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *WalletOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *WalletOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *WalletOutput) SetType(v string) { + o.Type = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *WalletOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *WalletOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *WalletOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *WalletOutput) GetContext() []map[string]interface{} { + if o == nil || IsNil(o.Context) { + var ret []map[string]interface{} + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletOutput) GetContextOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *WalletOutput) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given []map[string]interface{} and assigns it to the Context field. +func (o *WalletOutput) SetContext(v []map[string]interface{}) { + o.Context = v +} + +// GetLastAnalysis returns the LastAnalysis field value if set, zero value otherwise. +func (o *WalletOutput) GetLastAnalysis() map[string]time.Time { + if o == nil || IsNil(o.LastAnalysis) { + var ret map[string]time.Time + return ret + } + return o.LastAnalysis +} + +// GetLastAnalysisOk returns a tuple with the LastAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletOutput) GetLastAnalysisOk() (map[string]time.Time, bool) { + if o == nil || IsNil(o.LastAnalysis) { + return map[string]time.Time{}, false + } + return o.LastAnalysis, true +} + +// HasLastAnalysis returns a boolean if a field has been set. +func (o *WalletOutput) HasLastAnalysis() bool { + if o != nil && !IsNil(o.LastAnalysis) { + return true + } + + return false +} + +// SetLastAnalysis gets a reference to the given map[string]time.Time and assigns it to the LastAnalysis field. +func (o *WalletOutput) SetLastAnalysis(v map[string]time.Time) { + o.LastAnalysis = v +} + +// GetCoin returns the Coin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WalletOutput) GetCoin() string { + if o == nil || IsNil(o.Coin.Get()) { + var ret string + return ret + } + return *o.Coin.Get() +} + +// GetCoinOk returns a tuple with the Coin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WalletOutput) GetCoinOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Coin.Get(), o.Coin.IsSet() +} + +// HasCoin returns a boolean if a field has been set. +func (o *WalletOutput) HasCoin() bool { + if o != nil && o.Coin.IsSet() { + return true + } + + return false +} + +// SetCoin gets a reference to the given NullableString and assigns it to the Coin field. +func (o *WalletOutput) SetCoin(v string) { + o.Coin.Set(&v) +} + +// SetCoinNil sets the value for Coin to be an explicit nil +func (o *WalletOutput) SetCoinNil() { + o.Coin.Set(nil) +} + +// UnsetCoin ensures that no value is present for Coin, not even an explicit nil +func (o *WalletOutput) UnsetCoin() { + o.Coin.Unset() +} + +// GetAddress returns the Address field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WalletOutput) GetAddress() string { + if o == nil || IsNil(o.Address.Get()) { + var ret string + return ret + } + return *o.Address.Get() +} + +// GetAddressOk returns a tuple with the Address field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WalletOutput) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Address.Get(), o.Address.IsSet() +} + +// HasAddress returns a boolean if a field has been set. +func (o *WalletOutput) HasAddress() bool { + if o != nil && o.Address.IsSet() { + return true + } + + return false +} + +// SetAddress gets a reference to the given NullableString and assigns it to the Address field. +func (o *WalletOutput) SetAddress(v string) { + o.Address.Set(&v) +} + +// SetAddressNil sets the value for Address to be an explicit nil +func (o *WalletOutput) SetAddressNil() { + o.Address.Set(nil) +} + +// UnsetAddress ensures that no value is present for Address, not even an explicit nil +func (o *WalletOutput) UnsetAddress() { + o.Address.Unset() +} + +// GetId returns the Id field value +func (o *WalletOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WalletOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WalletOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *WalletOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *WalletOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *WalletOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *WalletOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *WalletOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *WalletOutput) SetRootType(v string) { + o.RootType = v +} + +func (o WalletOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WalletOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.LastAnalysis) { + toSerialize["last_analysis"] = o.LastAnalysis + } + if o.Coin.IsSet() { + toSerialize["coin"] = o.Coin.Get() + } + if o.Address.IsSet() { + toSerialize["address"] = o.Address.Get() + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *WalletOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWalletOutput := _WalletOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWalletOutput) + + if err != nil { + return err + } + + *o = WalletOutput(varWalletOutput) + + return err +} + +type NullableWalletOutput struct { + value *WalletOutput + isSet bool +} + +func (v NullableWalletOutput) Get() *WalletOutput { + return v.value +} + +func (v *NullableWalletOutput) Set(val *WalletOutput) { + v.value = val + v.isSet = true +} + +func (v NullableWalletOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableWalletOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWalletOutput(val *WalletOutput) *NullableWalletOutput { + return &NullableWalletOutput{value: val, isSet: true} +} + +func (v NullableWalletOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWalletOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_worker_restart_response.go b/model_worker_restart_response.go new file mode 100644 index 0000000..b4d5148 --- /dev/null +++ b/model_worker_restart_response.go @@ -0,0 +1,184 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkerRestartResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkerRestartResponse{} + +// WorkerRestartResponse Worker restart API response. +type WorkerRestartResponse struct { + Successes []string `json:"successes"` + Failures []string `json:"failures"` +} + +type _WorkerRestartResponse WorkerRestartResponse + +// NewWorkerRestartResponse instantiates a new WorkerRestartResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkerRestartResponse(successes []string, failures []string) *WorkerRestartResponse { + this := WorkerRestartResponse{} + this.Successes = successes + this.Failures = failures + return &this +} + +// NewWorkerRestartResponseWithDefaults instantiates a new WorkerRestartResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkerRestartResponseWithDefaults() *WorkerRestartResponse { + this := WorkerRestartResponse{} + return &this +} + +// GetSuccesses returns the Successes field value +func (o *WorkerRestartResponse) GetSuccesses() []string { + if o == nil { + var ret []string + return ret + } + + return o.Successes +} + +// GetSuccessesOk returns a tuple with the Successes field value +// and a boolean to check if the value has been set. +func (o *WorkerRestartResponse) GetSuccessesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Successes, true +} + +// SetSuccesses sets field value +func (o *WorkerRestartResponse) SetSuccesses(v []string) { + o.Successes = v +} + +// GetFailures returns the Failures field value +func (o *WorkerRestartResponse) GetFailures() []string { + if o == nil { + var ret []string + return ret + } + + return o.Failures +} + +// GetFailuresOk returns a tuple with the Failures field value +// and a boolean to check if the value has been set. +func (o *WorkerRestartResponse) GetFailuresOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Failures, true +} + +// SetFailures sets field value +func (o *WorkerRestartResponse) SetFailures(v []string) { + o.Failures = v +} + +func (o WorkerRestartResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkerRestartResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["successes"] = o.Successes + toSerialize["failures"] = o.Failures + return toSerialize, nil +} + +func (o *WorkerRestartResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "successes", + "failures", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkerRestartResponse := _WorkerRestartResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkerRestartResponse) + + if err != nil { + return err + } + + *o = WorkerRestartResponse(varWorkerRestartResponse) + + return err +} + +type NullableWorkerRestartResponse struct { + value *WorkerRestartResponse + isSet bool +} + +func (v NullableWorkerRestartResponse) Get() *WorkerRestartResponse { + return v.value +} + +func (v *NullableWorkerRestartResponse) Set(val *WorkerRestartResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWorkerRestartResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkerRestartResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkerRestartResponse(val *WorkerRestartResponse) *NullableWorkerRestartResponse { + return &NullableWorkerRestartResponse{value: val, isSet: true} +} + +func (v NullableWorkerRestartResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkerRestartResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_worker_status_response.go b/model_worker_status_response.go new file mode 100644 index 0000000..0d0cd73 --- /dev/null +++ b/model_worker_status_response.go @@ -0,0 +1,184 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkerStatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkerStatusResponse{} + +// WorkerStatusResponse Worker status API response. +type WorkerStatusResponse struct { + Registered map[string][]string `json:"registered"` + Active [][]interface{} `json:"active"` +} + +type _WorkerStatusResponse WorkerStatusResponse + +// NewWorkerStatusResponse instantiates a new WorkerStatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkerStatusResponse(registered map[string][]string, active [][]interface{}) *WorkerStatusResponse { + this := WorkerStatusResponse{} + this.Registered = registered + this.Active = active + return &this +} + +// NewWorkerStatusResponseWithDefaults instantiates a new WorkerStatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkerStatusResponseWithDefaults() *WorkerStatusResponse { + this := WorkerStatusResponse{} + return &this +} + +// GetRegistered returns the Registered field value +func (o *WorkerStatusResponse) GetRegistered() map[string][]string { + if o == nil { + var ret map[string][]string + return ret + } + + return o.Registered +} + +// GetRegisteredOk returns a tuple with the Registered field value +// and a boolean to check if the value has been set. +func (o *WorkerStatusResponse) GetRegisteredOk() (map[string][]string, bool) { + if o == nil { + return map[string][]string{}, false + } + return o.Registered, true +} + +// SetRegistered sets field value +func (o *WorkerStatusResponse) SetRegistered(v map[string][]string) { + o.Registered = v +} + +// GetActive returns the Active field value +func (o *WorkerStatusResponse) GetActive() [][]interface{} { + if o == nil { + var ret [][]interface{} + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *WorkerStatusResponse) GetActiveOk() ([][]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Active, true +} + +// SetActive sets field value +func (o *WorkerStatusResponse) SetActive(v [][]interface{}) { + o.Active = v +} + +func (o WorkerStatusResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkerStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["registered"] = o.Registered + toSerialize["active"] = o.Active + return toSerialize, nil +} + +func (o *WorkerStatusResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "registered", + "active", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkerStatusResponse := _WorkerStatusResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkerStatusResponse) + + if err != nil { + return err + } + + *o = WorkerStatusResponse(varWorkerStatusResponse) + + return err +} + +type NullableWorkerStatusResponse struct { + value *WorkerStatusResponse + isSet bool +} + +func (v NullableWorkerStatusResponse) Get() *WorkerStatusResponse { + return v.value +} + +func (v *NullableWorkerStatusResponse) Set(val *WorkerStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWorkerStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkerStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkerStatusResponse(val *WorkerStatusResponse) *NullableWorkerStatusResponse { + return &NullableWorkerStatusResponse{value: val, isSet: true} +} + +func (v NullableWorkerStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkerStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_yara_input.go b/model_yara_input.go new file mode 100644 index 0000000..b655ada --- /dev/null +++ b/model_yara_input.go @@ -0,0 +1,549 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the YaraInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &YaraInput{} + +// YaraInput Represents a Yara rule. Parsing and matching is yet TODO. +type YaraInput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` +} + +type _YaraInput YaraInput + +// NewYaraInput instantiates a new YaraInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewYaraInput(name string, pattern string, diamond DiamondModel) *YaraInput { + this := YaraInput{} + this.Name = name + var type_ string = "yara" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + return &this +} + +// NewYaraInputWithDefaults instantiates a new YaraInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewYaraInputWithDefaults() *YaraInput { + this := YaraInput{} + var type_ string = "yara" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *YaraInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *YaraInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *YaraInput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *YaraInput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *YaraInput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *YaraInput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *YaraInput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *YaraInput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *YaraInput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *YaraInput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *YaraInput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *YaraInput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *YaraInput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *YaraInput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *YaraInput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *YaraInput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *YaraInput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *YaraInput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *YaraInput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *YaraInput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *YaraInput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *YaraInput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *YaraInput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *YaraInput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *YaraInput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *YaraInput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *YaraInput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *YaraInput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *YaraInput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *YaraInput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *YaraInput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *YaraInput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *YaraInput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *YaraInput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraInput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *YaraInput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *YaraInput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +func (o YaraInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o YaraInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + return toSerialize, nil +} + +func (o *YaraInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varYaraInput := _YaraInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varYaraInput) + + if err != nil { + return err + } + + *o = YaraInput(varYaraInput) + + return err +} + +type NullableYaraInput struct { + value *YaraInput + isSet bool +} + +func (v NullableYaraInput) Get() *YaraInput { + return v.value +} + +func (v *NullableYaraInput) Set(val *YaraInput) { + v.value = val + v.isSet = true +} + +func (v NullableYaraInput) IsSet() bool { + return v.isSet +} + +func (v *NullableYaraInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableYaraInput(val *YaraInput) *NullableYaraInput { + return &NullableYaraInput{value: val, isSet: true} +} + +func (v NullableYaraInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableYaraInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_yara_output.go b/model_yara_output.go new file mode 100644 index 0000000..effd26e --- /dev/null +++ b/model_yara_output.go @@ -0,0 +1,633 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the YaraOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &YaraOutput{} + +// YaraOutput Represents a Yara rule. Parsing and matching is yet TODO. +type YaraOutput struct { + Name string `json:"name"` + Type *string `json:"type,omitempty"` + Description *string `json:"description,omitempty"` + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + ValidFrom *time.Time `json:"valid_from,omitempty"` + ValidUntil *time.Time `json:"valid_until,omitempty"` + Pattern string `json:"pattern"` + Location *string `json:"location,omitempty"` + Diamond DiamondModel `json:"diamond"` + KillChainPhases []string `json:"kill_chain_phases,omitempty"` + RelevantTags []string `json:"relevant_tags,omitempty"` + Id string `json:"id"` + Tags map[string]TagRelationshipOutput `json:"tags"` + RootType string `json:"root_type"` +} + +type _YaraOutput YaraOutput + +// NewYaraOutput instantiates a new YaraOutput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewYaraOutput(name string, pattern string, diamond DiamondModel, id string, tags map[string]TagRelationshipOutput, rootType string) *YaraOutput { + this := YaraOutput{} + this.Name = name + var type_ string = "yara" + this.Type = &type_ + var description string = "" + this.Description = &description + this.Pattern = pattern + var location string = "" + this.Location = &location + this.Diamond = diamond + this.Id = id + this.Tags = tags + this.RootType = rootType + return &this +} + +// NewYaraOutputWithDefaults instantiates a new YaraOutput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewYaraOutputWithDefaults() *YaraOutput { + this := YaraOutput{} + var type_ string = "yara" + this.Type = &type_ + var description string = "" + this.Description = &description + var location string = "" + this.Location = &location + return &this +} + +// GetName returns the Name field value +func (o *YaraOutput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *YaraOutput) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *YaraOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *YaraOutput) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *YaraOutput) SetType(v string) { + o.Type = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *YaraOutput) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *YaraOutput) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *YaraOutput) SetDescription(v string) { + o.Description = &v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *YaraOutput) GetCreated() time.Time { + if o == nil || IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *YaraOutput) HasCreated() bool { + if o != nil && !IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *YaraOutput) SetCreated(v time.Time) { + o.Created = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *YaraOutput) GetModified() time.Time { + if o == nil || IsNil(o.Modified) { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Modified) { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *YaraOutput) HasModified() bool { + if o != nil && !IsNil(o.Modified) { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *YaraOutput) SetModified(v time.Time) { + o.Modified = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *YaraOutput) GetValidFrom() time.Time { + if o == nil || IsNil(o.ValidFrom) { + var ret time.Time + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetValidFromOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *YaraOutput) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *YaraOutput) SetValidFrom(v time.Time) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *YaraOutput) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *YaraOutput) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *YaraOutput) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +// GetPattern returns the Pattern field value +func (o *YaraOutput) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *YaraOutput) SetPattern(v string) { + o.Pattern = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *YaraOutput) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *YaraOutput) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *YaraOutput) SetLocation(v string) { + o.Location = &v +} + +// GetDiamond returns the Diamond field value +func (o *YaraOutput) GetDiamond() DiamondModel { + if o == nil { + var ret DiamondModel + return ret + } + + return o.Diamond +} + +// GetDiamondOk returns a tuple with the Diamond field value +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetDiamondOk() (*DiamondModel, bool) { + if o == nil { + return nil, false + } + return &o.Diamond, true +} + +// SetDiamond sets field value +func (o *YaraOutput) SetDiamond(v DiamondModel) { + o.Diamond = v +} + +// GetKillChainPhases returns the KillChainPhases field value if set, zero value otherwise. +func (o *YaraOutput) GetKillChainPhases() []string { + if o == nil || IsNil(o.KillChainPhases) { + var ret []string + return ret + } + return o.KillChainPhases +} + +// GetKillChainPhasesOk returns a tuple with the KillChainPhases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetKillChainPhasesOk() ([]string, bool) { + if o == nil || IsNil(o.KillChainPhases) { + return nil, false + } + return o.KillChainPhases, true +} + +// HasKillChainPhases returns a boolean if a field has been set. +func (o *YaraOutput) HasKillChainPhases() bool { + if o != nil && !IsNil(o.KillChainPhases) { + return true + } + + return false +} + +// SetKillChainPhases gets a reference to the given []string and assigns it to the KillChainPhases field. +func (o *YaraOutput) SetKillChainPhases(v []string) { + o.KillChainPhases = v +} + +// GetRelevantTags returns the RelevantTags field value if set, zero value otherwise. +func (o *YaraOutput) GetRelevantTags() []string { + if o == nil || IsNil(o.RelevantTags) { + var ret []string + return ret + } + return o.RelevantTags +} + +// GetRelevantTagsOk returns a tuple with the RelevantTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetRelevantTagsOk() ([]string, bool) { + if o == nil || IsNil(o.RelevantTags) { + return nil, false + } + return o.RelevantTags, true +} + +// HasRelevantTags returns a boolean if a field has been set. +func (o *YaraOutput) HasRelevantTags() bool { + if o != nil && !IsNil(o.RelevantTags) { + return true + } + + return false +} + +// SetRelevantTags gets a reference to the given []string and assigns it to the RelevantTags field. +func (o *YaraOutput) SetRelevantTags(v []string) { + o.RelevantTags = v +} + +// GetId returns the Id field value +func (o *YaraOutput) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *YaraOutput) SetId(v string) { + o.Id = v +} + +// GetTags returns the Tags field value +func (o *YaraOutput) GetTags() map[string]TagRelationshipOutput { + if o == nil { + var ret map[string]TagRelationshipOutput + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetTagsOk() (map[string]TagRelationshipOutput, bool) { + if o == nil { + return map[string]TagRelationshipOutput{}, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *YaraOutput) SetTags(v map[string]TagRelationshipOutput) { + o.Tags = v +} + +// GetRootType returns the RootType field value +func (o *YaraOutput) GetRootType() string { + if o == nil { + var ret string + return ret + } + + return o.RootType +} + +// GetRootTypeOk returns a tuple with the RootType field value +// and a boolean to check if the value has been set. +func (o *YaraOutput) GetRootTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RootType, true +} + +// SetRootType sets field value +func (o *YaraOutput) SetRootType(v string) { + o.RootType = v +} + +func (o YaraOutput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o YaraOutput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !IsNil(o.Modified) { + toSerialize["modified"] = o.Modified + } + if !IsNil(o.ValidFrom) { + toSerialize["valid_from"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["valid_until"] = o.ValidUntil + } + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["diamond"] = o.Diamond + if !IsNil(o.KillChainPhases) { + toSerialize["kill_chain_phases"] = o.KillChainPhases + } + if !IsNil(o.RelevantTags) { + toSerialize["relevant_tags"] = o.RelevantTags + } + toSerialize["id"] = o.Id + toSerialize["tags"] = o.Tags + toSerialize["root_type"] = o.RootType + return toSerialize, nil +} + +func (o *YaraOutput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pattern", + "diamond", + "id", + "tags", + "root_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varYaraOutput := _YaraOutput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varYaraOutput) + + if err != nil { + return err + } + + *o = YaraOutput(varYaraOutput) + + return err +} + +type NullableYaraOutput struct { + value *YaraOutput + isSet bool +} + +func (v NullableYaraOutput) Get() *YaraOutput { + return v.value +} + +func (v *NullableYaraOutput) Set(val *YaraOutput) { + v.value = val + v.isSet = true +} + +func (v NullableYaraOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableYaraOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableYaraOutput(val *YaraOutput) *NullableYaraOutput { + return &NullableYaraOutput{value: val, isSet: true} +} + +func (v NullableYaraOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableYaraOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/models/client.go b/models/client.go deleted file mode 100644 index 53eedb0..0000000 --- a/models/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package models - -import "time" - -type ClientConfig struct { - Host string - Port int - Timeout time.Duration - Proto string -} - -//go:generate mockgen -source=client.go -package=mocks -destination=mocks/client.gen.go -type ClientI interface { - Init() error - ObservablesSearch(query QuerySearch) (ServerResponseObservables, error) - Query(endpoint string, method string, data []byte) (map[string]interface{}, error) - Close() error -} diff --git a/models/mocks/client.gen.go b/models/mocks/client.gen.go deleted file mode 100644 index 3dde97c..0000000 --- a/models/mocks/client.gen.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: client.go -// -// Generated by this command: -// -// mockgen -source=client.go -package=mocks -destination=mocks/client.gen.go -// - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - - models "github.com/yeti-platform/goyeti/models" - gomock "go.uber.org/mock/gomock" -) - -// MockClientI is a mock of ClientI interface. -type MockClientI struct { - ctrl *gomock.Controller - recorder *MockClientIMockRecorder -} - -// MockClientIMockRecorder is the mock recorder for MockClientI. -type MockClientIMockRecorder struct { - mock *MockClientI -} - -// NewMockClientI creates a new mock instance. -func NewMockClientI(ctrl *gomock.Controller) *MockClientI { - mock := &MockClientI{ctrl: ctrl} - mock.recorder = &MockClientIMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockClientI) EXPECT() *MockClientIMockRecorder { - return m.recorder -} - -// Close mocks base method. -func (m *MockClientI) Close() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close") - ret0, _ := ret[0].(error) - return ret0 -} - -// Close indicates an expected call of Close. -func (mr *MockClientIMockRecorder) Close() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClientI)(nil).Close)) -} - -// Init mocks base method. -func (m *MockClientI) Init() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init") - ret0, _ := ret[0].(error) - return ret0 -} - -// Init indicates an expected call of Init. -func (mr *MockClientIMockRecorder) Init() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockClientI)(nil).Init)) -} - -// ObservablesSearch mocks base method. -func (m *MockClientI) ObservablesSearch(query models.QuerySearch) (models.ServerResponseObservables, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ObservablesSearch", query) - ret0, _ := ret[0].(models.ServerResponseObservables) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ObservablesSearch indicates an expected call of ObservablesSearch. -func (mr *MockClientIMockRecorder) ObservablesSearch(query any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObservablesSearch", reflect.TypeOf((*MockClientI)(nil).ObservablesSearch), query) -} - -// Query mocks base method. -func (m *MockClientI) Query(endpoint, method string, data []byte) (map[string]any, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Query", endpoint, method, data) - ret0, _ := ret[0].(map[string]any) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Query indicates an expected call of Query. -func (mr *MockClientIMockRecorder) Query(endpoint, method, data any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockClientI)(nil).Query), endpoint, method, data) -} diff --git a/models/observable.go b/models/observable.go deleted file mode 100644 index 3c316a8..0000000 --- a/models/observable.go +++ /dev/null @@ -1,76 +0,0 @@ -package models - -import "time" - -type Observable struct { - Value string `json:"value"` - Type string `json:"type"` - Created string `json:"created"` - Context []interface{} `json:"context"` - LastAnalysis struct { - } `json:"last_analysis"` - Country string `json:"country"` - Description string `json:"description"` - ID string `json:"id"` - Tags struct { - AdditionalProp1 struct { - Source string `json:"source"` - Target string `json:"target"` - LastSeen time.Time `json:"last_seen"` - Expires time.Time `json:"expires"` - Fresh bool `json:"fresh"` - ID string `json:"id"` - } `json:"additionalProp1"` - AdditionalProp2 struct { - Source string `json:"source"` - Target string `json:"target"` - LastSeen time.Time `json:"last_seen"` - Expires time.Time `json:"expires"` - Fresh bool `json:"fresh"` - ID string `json:"id"` - } `json:"additionalProp2"` - AdditionalProp3 struct { - Source string `json:"source"` - Target string `json:"target"` - LastSeen time.Time `json:"last_seen"` - Expires time.Time `json:"expires"` - Fresh bool `json:"fresh"` - ID string `json:"id"` - } `json:"additionalProp3"` - } `json:"tags"` - RootType string `json:"root_type"` - LastSeen time.Time `json:"last_seen,omitempty"` - FirstSeen time.Time `json:"first_seen,omitempty"` - Issuer string `json:"issuer,omitempty"` - Subject string `json:"subject,omitempty"` - SerialNumber string `json:"serial_number,omitempty"` - After time.Time `json:"after,omitempty"` - Before time.Time `json:"before,omitempty"` - Fingerprint string `json:"fingerprint,omitempty"` - Name string `json:"name,omitempty"` - Size int `json:"size,omitempty"` - Sha256 string `json:"sha256,omitempty"` - Md5 string `json:"md5,omitempty"` - Sha1 string `json:"sha1,omitempty"` - MimeType string `json:"mime_type,omitempty"` - Key string `json:"key,omitempty"` - Data string `json:"data,omitempty"` - Hive string `json:"hive,omitempty"` - PathFile string `json:"path_file,omitempty"` - UserID string `json:"user_id,omitempty"` - Credential string `json:"credential,omitempty"` - AccountLogin string `json:"account_login,omitempty"` - AccountType string `json:"account_type,omitempty"` - DisplayName string `json:"display_name,omitempty"` - IsServiceAccount bool `json:"is_service_account,omitempty"` - IsPrivileged bool `json:"is_privileged,omitempty"` - CanEscalatePrivs bool `json:"can_escalate_privs,omitempty"` - IsDisabled bool `json:"is_disabled,omitempty"` - AccountCreated time.Time `json:"account_created,omitempty"` - AccountExpires time.Time `json:"account_expires,omitempty"` - CredentialLastChanged time.Time `json:"credential_last_changed,omitempty"` - AccountFirstLogin time.Time `json:"account_first_login,omitempty"` - AccountLastLogin time.Time `json:"account_last_login,omitempty"` - Coin string `json:"coin,omitempty"` - Address string `json:"address,omitempty"` -} diff --git a/models/query.go b/models/query.go deleted file mode 100644 index 0e33883..0000000 --- a/models/query.go +++ /dev/null @@ -1,9 +0,0 @@ -package models - -type QuerySearch struct { - Query map[string]interface{} `json:"query" mapstructure:"query"` - Type string `json:"type" mapstructure:"type"` - Sorting []struct{} `json:"sorting" mapstructure:"sorting"` - Count int `json:"count" mapstructure:"count"` - Page int `json:"page" mapstructure:"page"` -} diff --git a/models/response.go b/models/response.go deleted file mode 100644 index 5426b2a..0000000 --- a/models/response.go +++ /dev/null @@ -1,11 +0,0 @@ -package models - -type ServerResponseAuth struct { - AccessToken string `json:"access_token" mapstructure:"access_token"` - TokenType string `json:"token_type" mapstructure:"token_type"` -} - -type ServerResponseObservables struct { - Observables []Observable `json:"observables" mapstructure:"observables"` - Total int `json:"total" mapstructure:"total"` -} diff --git a/response.go b/response.go new file mode 100644 index 0000000..26fbdcc --- /dev/null +++ b/response.go @@ -0,0 +1,47 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/templates/.travis.yml b/templates/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/templates/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/templates/README.mustache b/templates/README.mustache new file mode 100644 index 0000000..3568978 --- /dev/null +++ b/templates/README.mustache @@ -0,0 +1,236 @@ +# Go API client for {{packageName}} + +{{#appDescriptionWithNewLines}} +{{{.}}} +{{/appDescriptionWithNewLines}} + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} +- Build package: {{generatorClass}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +## Installation + +Install the following dependencies: + +```sh +go get github.com/stretchr/testify/assert +{{#hasOAuthMethods}} +go get golang.org/x/oauth2 +{{/hasOAuthMethods}} +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```go +import {{packageName}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```go +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `{{packageName}}.ContextServerIndex` of type `int`. + +```go +ctx := context.WithValue(context.Background(), {{packageName}}.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `{{packageName}}.ContextServerVariables` of type `map[string]string`. + +```go +ctx := context.WithValue(context.Background(), {{packageName}}.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `{{packageName}}.ContextOperationServerIndices` and `{{packageName}}.ContextOperationServerVariables` context maps. + +```go +ctx := context.WithValue(context.Background(), {{packageName}}.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), {{packageName}}.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation For Models + +{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} + +## Documentation For Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} +### {{{name}}} + +{{#isApiKey}} +- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: {{name}} and passed in as the auth context for each request. + +Example + +```go +auth := context.WithValue( + context.Background(), + {{packageName}}.ContextAPIKeys, + map[string]{{packageName}}.APIKey{ + "{{name}}": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + +{{/isApiKey}} +{{#isBasic}} +{{#isBasicBearer}} +- **Type**: HTTP Bearer token authentication + +Example + +```go +auth := context.WithValue(context.Background(), {{packageName}}.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + +{{/isBasicBearer}} +{{#isBasicBasic}} +- **Type**: HTTP basic authentication + +Example + +```go +auth := context.WithValue(context.Background(), {{packageName}}.ContextBasicAuth, {{packageName}}.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + +{{/isBasicBasic}} +{{#isHttpSignature}} +- **Type**: HTTP signature authentication + +Example + +```go + authConfig := {{packageName}}.HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "rsa.pem", + Passphrase: "my-passphrase", + SigningScheme: {{packageName}}.HttpSigningSchemeHs2019, + SignedHeaders: []string{ + {{packageName}}.HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + {{packageName}}.HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + SigningAlgorithm: {{packageName}}.HttpSigningAlgorithmRsaPSS, + SignatureMaxValidity: 5 * time.Minute, + } + var authCtx context.Context + var err error + if authCtx, err = authConfig.ContextWithValue(context.Background()); err != nil { + // Process error + } + r, err = client.Service.Operation(auth, args) + +``` +{{/isHttpSignature}} +{{/isBasic}} +{{#isOAuth}} + +- **Type**: OAuth +- **Flow**: {{{flow}}} +- **Authorization URL**: {{{authorizationUrl}}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - **{{{scope}}}**: {{{description}}} +{{/scopes}} + +Example + +```go +auth := context.WithValue(context.Background(), {{packageName}}.ContextAccessToken, "ACCESSTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +Or via OAuth2 module to automatically refresh tokens and perform user authentication. + +```go +import "golang.org/x/oauth2" + +/* Perform OAuth2 round trip request and obtain a token */ + +tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) +auth := context.WithValue(oauth2.NoContext, {{packageName}}.ContextOAuth2, tokenSource) +r, err := client.Service.Operation(auth, args) +``` + +{{/isOAuth}} +{{/authMethods}} + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/templates/api.mustache b/templates/api.mustache new file mode 100644 index 0000000..84da801 --- /dev/null +++ b/templates/api.mustache @@ -0,0 +1,444 @@ +{{>partial_header}} +package {{packageName}} + +{{#operations}} +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +{{#imports}} "{{import}}" +{{/imports}} +) + +{{#generateInterfaces}} + +type {{classname}} interface { + {{#operation}} + + /* + {{operationId}} {{{summary}}}{{^summary}}Method for {{operationId}}{{/summary}} + {{#notes}} + + {{{unescapedNotes}}} + {{/notes}} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} + @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} + @return {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request + {{#isDeprecated}} + + Deprecated + {{/isDeprecated}} + */ + {{{nickname}}}(ctx context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request + + // {{nickname}}Execute executes the request{{#returnType}} + // @return {{{.}}}{{/returnType}} + {{#isDeprecated}} + // Deprecated + {{/isDeprecated}} + {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request) ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}{{^isResponseFile}}*{{/isResponseFile}}{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) + {{/operation}} +} +{{/generateInterfaces}} + +// {{classname}}Service {{classname}} service +type {{classname}}Service service +{{#operation}} + +type {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request struct { + ctx context.Context{{#generateInterfaces}} + ApiService {{classname}} +{{/generateInterfaces}}{{^generateInterfaces}} + ApiService *{{classname}}Service +{{/generateInterfaces}} +{{#allParams}} + {{paramName}} {{^isPathParam}}{{^isFile}}*{{/isFile}}{{/isPathParam}}{{{dataType}}} +{{/allParams}} +} + +{{#allParams}} +{{^isPathParam}} +{{#description}} +// {{.}} +{{/description}} +{{#isDeprecated}} +// Deprecated +{{/isDeprecated}} +func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request) {{vendorExtensions.x-export-param-name}}({{paramName}} {{{dataType}}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request { + r.{{paramName}} = {{^isFile}}&{{/isFile}}{{paramName}} + return r +} + +{{/isPathParam}} +{{/allParams}} +func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request) Execute() ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}{{^isResponseFile}}*{{/isResponseFile}}{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) { + return r.ApiService.{{nickname}}Execute(r) +} + +/* +{{operationId}} {{{summary}}}{{^summary}}Method for {{operationId}}{{/summary}} +{{#notes}} + +{{{unescapedNotes}}} +{{/notes}} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} + @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} + @return {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request +{{#isDeprecated}} + +Deprecated +{{/isDeprecated}} +*/ +func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request { + return {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request{ + ApiService: a, + ctx: ctx, + {{#pathParams}} + {{paramName}}: {{paramName}}, + {{/pathParams}} + } +} + +// Execute executes the request{{#returnType}} +// @return {{{.}}}{{/returnType}} +{{#isDeprecated}} +// Deprecated +{{/isDeprecated}} +func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request) ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}{{^isResponseFile}}*{{/isResponseFile}}{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) { + var ( + localVarHTTPMethod = http.Method{{httpMethod}} + localVarPostBody interface{} + formFiles []formFile + {{#returnType}} + localVarReturnValue {{^isArray}}{{^returnTypeIsPrimitive}}{{^isResponseFile}}*{{/isResponseFile}}{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}} + {{/returnType}} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}") + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{{{path}}}"{{#pathParams}} + localVarPath = strings.Replace(localVarPath, "{"+"{{{baseName}}}"+"}", url.PathEscape(parameterValueToString(r.{{paramName}}, "{{paramName}}")), -1){{/pathParams}} + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + {{#allParams}} + {{#required}} + {{^isPathParam}} + if r.{{paramName}} == nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} is required and must be specified") + } + {{/isPathParam}} + {{#minItems}} + if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minItems}} { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minItems}} elements") + } + {{/minItems}} + {{#maxItems}} + if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxItems}} { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxItems}} elements") + } + {{/maxItems}} + {{#minLength}} + if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minLength}} { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minLength}} elements") + } + {{/minLength}} + {{#maxLength}} + if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxLength}} { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxLength}} elements") + } + {{/maxLength}} + {{#minimum}} + {{#isString}} + {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) + if {{paramName}}Txt < {{minimum}} { + {{/isString}} + {{^isString}} + if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} < {{minimum}} { + {{/isString}} + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be greater than {{minimum}}") + } + {{/minimum}} + {{#maximum}} + {{#isString}} + {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) + if {{paramName}}Txt > {{maximum}} { + {{/isString}} + {{^isString}} + if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} > {{maximum}} { + {{/isString}} + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be less than {{maximum}}") + } + {{/maximum}} + {{/required}} + {{/allParams}} + + {{#queryParams}} + {{#required}} + {{#isCollectionFormatMulti}} + { + t := *r.{{paramName}} + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "{{{baseName}}}", s.Index(i).Interface(), "{{style}}", "{{collectionFormat}}") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "{{{baseName}}}", t, "{{style}}", "{{collectionFormat}}") + } + } + {{/isCollectionFormatMulti}} + {{^isCollectionFormatMulti}} + parameterAddToHeaderOrQuery(localVarQueryParams, "{{{baseName}}}", r.{{paramName}}, "{{style}}", "{{collectionFormat}}") + {{/isCollectionFormatMulti}} + {{/required}} + {{^required}} + if r.{{paramName}} != nil { + {{#isCollectionFormatMulti}} + t := *r.{{paramName}} + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "{{{baseName}}}", s.Index(i).Interface(), "{{style}}", "{{collectionFormat}}") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "{{{baseName}}}", t, "{{style}}", "{{collectionFormat}}") + } + {{/isCollectionFormatMulti}} + {{^isCollectionFormatMulti}} + parameterAddToHeaderOrQuery(localVarQueryParams, "{{{baseName}}}", r.{{paramName}}, "{{style}}", "{{collectionFormat}}") + {{/isCollectionFormatMulti}} + {{#defaultValue}}} else { + var defaultValue {{{dataType}}} = {{{.}}} + r.{{paramName}} = &defaultValue + {{/defaultValue}}} + {{/required}} + {{/queryParams}} + // to determine the Content-Type header +{{=<% %>=}} + localVarHTTPContentTypes := []string{<%#consumes%>"<%&mediaType%>"<%^-last%>, <%/-last%><%/consumes%>} +<%={{ }}=%> + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header +{{=<% %>=}} + localVarHTTPHeaderAccepts := []string{<%#produces%>"<%&mediaType%>"<%^-last%>, <%/-last%><%/produces%>} +<%={{ }}=%> + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } +{{#headerParams}} + {{#required}} + parameterAddToHeaderOrQuery(localVarHeaderParams, "{{{baseName}}}", r.{{paramName}}, "{{style}}", "{{collectionFormat}}") + {{/required}} + {{^required}} + if r.{{paramName}} != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "{{{baseName}}}", r.{{paramName}}, "{{style}}", "{{collectionFormat}}") + } + {{/required}} +{{/headerParams}} +{{#formParams}} +{{#isFile}} +{{#isArray}} + var {{paramName}}LocalVarFormFileName string + var {{paramName}}LocalVarFileName string + var {{paramName}}LocalVarFileBytes []byte + + {{paramName}}LocalVarFormFileName = "{{{baseName}}}" + {{paramName}}LocalVarFile := r.{{paramName}} + + if {{paramName}}LocalVarFile != nil { + // loop through the array to prepare multiple files upload + for _, {{paramName}}LocalVarFileValue := range {{paramName}}LocalVarFile { + fbs, _ := io.ReadAll({{paramName}}LocalVarFileValue) + + {{paramName}}LocalVarFileBytes = fbs + {{paramName}}LocalVarFileName = {{paramName}}LocalVarFileValue.Name() + {{paramName}}LocalVarFileValue.Close() + formFiles = append(formFiles, formFile{fileBytes: {{paramName}}LocalVarFileBytes, fileName: {{paramName}}LocalVarFileName, formFileName: {{paramName}}LocalVarFormFileName}) + } + } +{{/isArray}} +{{^isArray}} + var {{paramName}}LocalVarFormFileName string + var {{paramName}}LocalVarFileName string + var {{paramName}}LocalVarFileBytes []byte + + {{paramName}}LocalVarFormFileName = "{{{baseName}}}" + {{paramName}}LocalVarFile := r.{{paramName}} + + if {{paramName}}LocalVarFile != nil { + fbs, _ := io.ReadAll({{paramName}}LocalVarFile) + + {{paramName}}LocalVarFileBytes = fbs + {{paramName}}LocalVarFileName = {{paramName}}LocalVarFile.Name() + {{paramName}}LocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: {{paramName}}LocalVarFileBytes, fileName: {{paramName}}LocalVarFileName, formFileName: {{paramName}}LocalVarFormFileName}) + } +{{/isArray}} +{{/isFile}} +{{^isFile}} +{{#required}} + parameterAddToHeaderOrQuery(localVarFormParams, "{{{baseName}}}", r.{{paramName}}, "{{style}}", "{{collectionFormat}}") +{{/required}} +{{^required}} +{{#isModel}} + if r.{{paramName}} != nil { + paramJson, err := parameterToJson(*r.{{paramName}}) + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err + } + localVarFormParams.Add("{{{baseName}}}", paramJson) + } +{{/isModel}} +{{^isModel}} + if r.{{paramName}} != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "{{{baseName}}}", r.{{paramName}}, "{{style}}", "{{collectionFormat}}") + } +{{/isModel}} +{{/required}} +{{/isFile}} +{{/formParams}} +{{#bodyParams}} + // body params + localVarPostBody = r.{{paramName}} +{{/bodyParams}} +{{#authMethods}} +{{#isApiKey}} +{{^isKeyInCookie}} + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + {{#vendorExtensions.x-auth-id-alias}} + if apiKey, ok := auth["{{.}}"]; ok { + var key string + if prefix, ok := auth["{{name}}"]; ok && prefix.Prefix != "" { + key = prefix.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + {{/vendorExtensions.x-auth-id-alias}} + {{^vendorExtensions.x-auth-id-alias}} + if apiKey, ok := auth["{{name}}"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + {{/vendorExtensions.x-auth-id-alias}} + {{#isKeyInHeader}} + localVarHeaderParams["{{keyParamName}}"] = key + {{/isKeyInHeader}} + {{#isKeyInQuery}} + localVarQueryParams.Add("{{keyParamName}}", key) + {{/isKeyInQuery}} + } + } + } +{{/isKeyInCookie}} +{{/isApiKey}} +{{/authMethods}} + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err + } + +{{#withCustomMiddlewareFunction}} + if a.client.cfg.ResponseMiddleware != nil { + err = a.client.cfg.ResponseMiddleware(localVarHTTPResponse, localVarBody) + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err + } + } + +{{/withCustomMiddlewareFunction}} + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + {{#responses}} + {{#dataType}} + {{^is1xx}} + {{^is2xx}} + {{#range}} + {{#is3xx}} + if localVarHTTPResponse.StatusCode >= 300 && localVarHTTPResponse.StatusCode < 400 { + {{/is3xx}} + {{#is4xx}} + if localVarHTTPResponse.StatusCode >= 400 && localVarHTTPResponse.StatusCode < 500 { + {{/is4xx}} + {{#is5xx}} + if localVarHTTPResponse.StatusCode >= 500 { + {{/is5xx}} + {{/range}} + {{^range}} + {{^wildcard}} + if localVarHTTPResponse.StatusCode == {{{code}}} { + {{/wildcard}} + {{/range}} + var v {{{dataType}}} + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + {{^-last}} + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + {{/-last}} + {{^wildcard}} + } + {{/wildcard}} + {{/is2xx}} + {{/is1xx}} + {{/dataType}} + {{/responses}} + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + } + + {{#returnType}} + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + } + + {{/returnType}} + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, nil +} +{{/operation}} +{{/operations}} diff --git a/templates/api_doc.mustache b/templates/api_doc.mustache new file mode 100644 index 0000000..151baa9 --- /dev/null +++ b/templates/api_doc.mustache @@ -0,0 +1,92 @@ +# {{invokerPackage}}\{{classname}}{{#description}} + +{{.}}{{/description}} + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{{operationId}}} + +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}(ctx{{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() + +{{{summary}}}{{#notes}} + +{{{unespacedNotes}}}{{/notes}} + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" +{{#vendorExtensions.x-go-import}} +{{{vendorExtensions.x-go-import}}} +{{/vendorExtensions.x-go-import}} + {{goImportAlias}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" +) + +func main() { + {{#allParams}} + {{paramName}} := {{{vendorExtensions.x-go-example}}} // {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/allParams}} + + configuration := {{goImportAlias}}.NewConfiguration() + apiClient := {{goImportAlias}}.NewAPIClient(configuration) + {{#returnType}}resp, {{/returnType}}r, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + {{#returnType}} + // response from `{{operationId}}`: {{{.}}} + fmt.Fprintf(os.Stdout, "Response from `{{classname}}.{{operationId}}`: %v\n", resp) + {{/returnType}} +} +``` + +### Path Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#pathParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.{{/-last}}{{/pathParams}}{{#pathParams}} +**{{paramName}}** | {{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/pathParams}} + +### Other Parameters + +Other parameters are passed through a pointer to a api{{{nickname}}}Request struct via the builder pattern +{{#allParams}}{{#-last}} + +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}} +{{^isPathParam}} **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**[]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**map[string]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/isContainer}} | {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/isPathParam}}{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}} (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + +{{/operation}} +{{/operations}} diff --git a/templates/api_test.mustache b/templates/api_test.mustache new file mode 100644 index 0000000..79caa62 --- /dev/null +++ b/templates/api_test.mustache @@ -0,0 +1,54 @@ +/* +{{#appName}} +{{{.}}} +{{/appName}} + +Testing {{classname}}Service + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package {{packageName}} + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + {{goImportAlias}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" +) + +func Test_{{packageName}}_{{classname}}Service(t *testing.T) { + + configuration := {{goImportAlias}}.NewConfiguration() + apiClient := {{goImportAlias}}.NewAPIClient(configuration) + +{{#operations}} +{{#operation}} + t.Run("Test {{classname}}Service {{{nickname}}}", func(t *testing.T) { + + {{^pathParams}} + t.Skip("skip test") // remove to run test + {{/pathParams}} + {{#pathParams}} + {{#-first}} + t.Skip("skip test") // remove to run test + + {{/-first}} + var {{paramName}} {{{dataType}}} + {{/pathParams}} + + {{#returnType}}resp, {{/returnType}}httpRes, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute() + + require.Nil(t, err) + {{#returnType}} + require.NotNil(t, resp) + {{/returnType}} + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +{{/operation}} +{{/operations}} +} diff --git a/templates/client.mustache b/templates/client.mustache new file mode 100644 index 0000000..f74fc88 --- /dev/null +++ b/templates/client.mustache @@ -0,0 +1,744 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + {{#hasOAuthMethods}} + "golang.org/x/oauth2" + {{/hasOAuthMethods}} + {{#withAWSV4Signature}} + awsv4 "github.com/aws/aws-sdk-go/aws/signer/v4" + awscredentials "github.com/aws/aws-sdk-go/aws/credentials" + {{/withAWSV4Signature}} +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) +) + +// APIClient manages communication with the {{appName}} API v{{version}} +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services +{{#apiInfo}} +{{#apis}} +{{#operations}} + + {{classname}} {{#generateInterfaces}}{{classname}}{{/generateInterfaces}}{{^generateInterfaces}}*{{classname}}Service{{/generateInterfaces}} +{{/operations}} +{{/apis}} +{{/apiInfo}} +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + +{{#apiInfo}} + // API Services +{{#apis}} +{{#operations}} + c.{{classname}} = (*{{classname}}Service)(&c.common) +{{/operations}} +{{/apis}} +{{/apiInfo}} + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + {{#hasOAuthMethods}} + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + {{/hasOAuthMethods}} + {{#hasHttpBasicMethods}} + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + {{/hasHttpBasicMethods}} + {{#hasHttpBearerMethods}} + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + + {{/hasHttpBearerMethods}} + {{#withAWSV4Signature}} + // AWS Signature v4 Authentication + if auth, ok := ctx.Value(ContextAWSv4).(AWSv4); ok { + creds := awscredentials.NewStaticCredentials(auth.AccessKey, auth.SecretKey, auth.SessionToken) + signer := awsv4.NewSigner(creds) + var reader *strings.Reader + if body == nil { + reader = strings.NewReader("") + } else { + reader = strings.NewReader(body.String()) + } + + // Define default values for region and service to maintain backward compatibility + region := auth.Region + if region == "" { + region = "eu-west-2" + } + service := auth.Service + if service == "" { + service = "oapi" + } + + timestamp := time.Now() + _, err := signer.Sign(localVarRequest, reader, service, region, timestamp) + if err != nil { + return nil, err + } + } + {{/withAWSV4Signature}} + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } +{{#withCustomMiddlewareFunction}} + + if c.cfg.Middleware != nil { + c.cfg.Middleware(localVarRequest) + } + + if c.cfg.MiddlewareWithError != nil { + err = c.cfg.MiddlewareWithError(localVarRequest) + if err != nil { + return nil, err + } + } + +{{/withCustomMiddlewareFunction}} +{{#hasHttpSignatureMethods}} + if ctx != nil { + // HTTP Signature Authentication. All request headers must be set (including default headers) + // because the headers may be included in the signature. + if auth, ok := ctx.Value(ContextHttpSignatureAuth).(HttpSignatureAuth); ok { + err = SignRequest(ctx, localVarRequest, auth) + if err != nil { + return nil, err + } + } + } +{{/hasHttpSignatureMethods}} + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/templates/configuration.mustache b/templates/configuration.mustache new file mode 100644 index 0000000..a4866e3 --- /dev/null +++ b/templates/configuration.mustache @@ -0,0 +1,332 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + {{#hasOAuthMethods}} + // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + {{/hasOAuthMethods}} + {{#hasHttpBasicMethods}} + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + {{/hasHttpBasicMethods}} + {{#hasHttpBearerMethods}} + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + {{/hasHttpBearerMethods}} + {{#hasApiKeyMethods}} + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + {{/hasApiKeyMethods}} + {{#withAWSV4Signature}} + // ContextAWSv4 takes an Access Key and a Secret Key for signing AWS Signature v4 + ContextAWSv4 = contextKey("awsv4") + + {{/withAWSV4Signature}} + {{#hasHttpSignatureMethods}} + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + + {{/hasHttpSignatureMethods}} + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +{{#withAWSV4Signature}} +// AWSv4 provides AWS Signature to a request passed via context using ContextAWSv4 +// https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +type AWSv4 struct { + AccessKey string + SecretKey string + SessionToken string + Region string + Service string +} + +{{/withAWSV4Signature}} +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +{{#withCustomMiddlewareFunction}} +// MiddlewareFunction provides way to implement custom middleware in the prepareRequest +type MiddlewareFunction func(*http.Request) + +// MiddlewareFunctionWithError provides way to implement custom middleware with errors in the prepareRequest +type MiddlewareFunctionWithError func(*http.Request) error + +// ResponseMiddlewareFunction provides way to implement custom middleware with errors after the response is received +type ResponseMiddlewareFunction func(*http.Response, []byte) error + +{{/withCustomMiddlewareFunction}} +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client + {{#withCustomMiddlewareFunction}} + Middleware MiddlewareFunction + MiddlewareWithError MiddlewareFunctionWithError + ResponseMiddleware ResponseMiddlewareFunction + {{/withCustomMiddlewareFunction}} +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/go{{/httpUserAgent}}", + Debug: false, + {{#servers}} + {{#-first}} + Servers: ServerConfigurations{ + {{/-first}} + { + URL: "{{{url}}}", + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + Variables: map[string]ServerVariable{ + {{/-first}} + "{{{name}}}": ServerVariable{ + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + DefaultValue: "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + EnumValues: []string{ + {{/-first}} + "{{{.}}}", + {{#-last}} + }, + {{/-last}} + {{/enumValues}} + }, + {{#-last}} + }, + {{/-last}} + {{/variables}} + }, + {{#-last}} + }, + {{/-last}} + {{/servers}} + {{#apiInfo}} + OperationServers: map[string]ServerConfigurations{ + {{#apis}} + {{#operations}} + {{#operation}} + {{#servers}} + {{#-first}} + "{{{classname}}}Service.{{{nickname}}}": { + {{/-first}} + { + URL: "{{{url}}}", + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + Variables: map[string]ServerVariable{ + {{/-first}} + "{{{name}}}": ServerVariable{ + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + DefaultValue: "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + EnumValues: []string{ + {{/-first}} + "{{{.}}}", + {{#-last}} + }, + {{/-last}} + {{/enumValues}} + }, + {{#-last}} + }, + {{/-last}} + {{/variables}} + }, + {{#-last}} + }, + {{/-last}} + {{/servers}} + {{/operation}} + {{/operations}} + {{/apis}} + }, + {{/apiInfo}} + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/templates/git_push.sh.mustache b/templates/git_push.sh.mustache new file mode 100644 index 0000000..0e3776a --- /dev/null +++ b/templates/git_push.sh.mustache @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="{{{gitHost}}}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="{{{gitUserId}}}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="{{{gitRepoId}}}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="{{{releaseNote}}}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/templates/gitignore.mustache b/templates/gitignore.mustache new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/templates/gitignore.mustache @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/templates/go.mod.mustache b/templates/go.mod.mustache new file mode 100644 index 0000000..91cea27 --- /dev/null +++ b/templates/go.mod.mustache @@ -0,0 +1,12 @@ +module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} + +go 1.18 + +require ( + {{#hasOAuthMethods}} + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 + {{/hasOAuthMethods}} + {{#withAWSV4Signature}} + github.com/aws/aws-sdk-go v1.34.14 + {{/withAWSV4Signature}} +) diff --git a/templates/go.sum.mustache b/templates/go.sum.mustache new file mode 100644 index 0000000..d25a753 --- /dev/null +++ b/templates/go.sum.mustache @@ -0,0 +1,15 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +{{#hasOAuthMethods}} +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +{{/hasOAuthMethods}} +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/templates/model.mustache b/templates/model.mustache new file mode 100644 index 0000000..684af1d --- /dev/null +++ b/templates/model.mustache @@ -0,0 +1,20 @@ +{{>partial_header}} +package {{packageName}} + +{{#models}} +import ( + "encoding/json" +{{#imports}} + "{{import}}" +{{/imports}} +) + +{{#model}} +{{#isEnum}} +{{>model_enum}} +{{/isEnum}} +{{^isEnum}} +{{#oneOf}}{{#-first}}{{>model_oneof}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>model_anyof}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>model_simple}}{{/anyOf}}{{/oneOf}} +{{/isEnum}} +{{/model}} +{{/models}} diff --git a/templates/model_anyof.mustache b/templates/model_anyof.mustache new file mode 100644 index 0000000..21e3313 --- /dev/null +++ b/templates/model_anyof.mustache @@ -0,0 +1,93 @@ +{{#discriminator}} +// checks if the {{classname}} type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &{{classname}}{} +{{/discriminator}} + +// {{classname}} {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} +type {{classname}} struct { + {{#anyOf}} + {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} *{{{.}}} + {{/anyOf}} +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *{{classname}}) UnmarshalJSON(data []byte) error { + var err error + {{#isNullable}} + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + {{/isNullable}} + {{#discriminator}} + {{#mappedModels}} + {{#-first}} + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = json.Unmarshal(data, &jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + {{/-first}} + // check if the discriminator value is '{{{mappingName}}}' + if jsonDict["{{{propertyBaseName}}}"] == "{{{mappingName}}}" { + // try to unmarshal JSON data into {{{modelName}}} + err = json.Unmarshal(data, &dst.{{{modelName}}}); + if err == nil { + json{{{modelName}}}, _ := json.Marshal(dst.{{{modelName}}}) + if string(json{{{modelName}}}) == "{}" { // empty struct + dst.{{{modelName}}} = nil + } else { + return nil // data stored in dst.{{{modelName}}}, return on the first match + } + } else { + dst.{{{modelName}}} = nil + } + } + + {{/mappedModels}} + {{/discriminator}} + {{#anyOf}} + // try to unmarshal JSON data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} + err = json.Unmarshal(data, &dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}); + if err == nil { + json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + if string(json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) == "{}" { // empty struct + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } else { + return nil // data stored in dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}, return on the first match + } + } else { + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } + + {{/anyOf}} + return fmt.Errorf("data failed to match schemas in anyOf({{classname}})") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src {{classname}}) MarshalJSON() ([]byte, error) { +{{#anyOf}} + if src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} != nil { + return json.Marshal(&src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + } + +{{/anyOf}} + return nil, nil // no data in anyOf schemas +} + +{{#discriminator}} +func (src {{classname}}) ToMap() (map[string]interface{}, error) { +{{#anyOf}} + if src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} != nil { + return src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}.ToMap() + } + +{{/anyOf}} + return nil, nil // no data in anyOf schemas +} +{{/discriminator}} + +{{>nullable_model}} diff --git a/templates/model_doc.mustache b/templates/model_doc.mustache new file mode 100644 index 0000000..439e695 --- /dev/null +++ b/templates/model_doc.mustache @@ -0,0 +1,97 @@ +{{#models}}{{#model}}# {{classname}} + +{{^isEnum}} +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +{{#vendorExtensions.x-is-one-of-interface}} +**{{classname}}Interface** | **interface { {{#discriminator}}{{propertyGetter}}() {{propertyType}}{{/discriminator}} }** | An interface that can hold any of the proper implementing types | +{{/vendorExtensions.x-is-one-of-interface}} +{{^vendorExtensions.x-is-one-of-interface}} +{{#vars}}**{{name}}** | {{^required}}Pointer to {{/required}}{{#isContainer}}{{#isArray}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**[]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{dataType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**map[string]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}{{^isFile}}{{^isDateTime}}[{{/isDateTime}}{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}{{^isDateTime}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isDateTime}}{{/isFile}}{{/isPrimitiveType}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/vars}} +{{/vendorExtensions.x-is-one-of-interface}} + +## Methods + +{{^vendorExtensions.x-is-one-of-interface}} +### New{{classname}} + +`func New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}}` + +New{{classname}} instantiates a new {{classname}} object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### New{{classname}}WithDefaults + +`func New{{classname}}WithDefaults() *{{classname}}` + +New{{classname}}WithDefaults instantiates a new {{classname}} object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +{{#vars}} +### Get{{name}} + +`func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}}` + +Get{{name}} returns the {{name}} field if non-nil, zero value otherwise. + +### Get{{name}}Ok + +`func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool)` + +Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### Set{{name}} + +`func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}})` + +Set{{name}} sets {{name}} field to given value. + +{{^required}} +### Has{{name}} + +`func (o *{{classname}}) Has{{name}}() bool` + +Has{{name}} returns a boolean if a field has been set. +{{/required}} + +{{#isNullable}} +### Set{{name}}Nil + +`func (o *{{classname}}) Set{{name}}Nil(b bool)` + + Set{{name}}Nil sets the value for {{name}} to be an explicit nil + +### Unset{{name}} +`func (o *{{classname}}) Unset{{name}}()` + +Unset{{name}} ensures that no value is present for {{name}}, not even an explicit nil +{{/isNullable}} +{{/vars}} +{{#vendorExtensions.x-implements}} + +### As{{{.}}} + +`func (s *{{classname}}) As{{{.}}}() {{{.}}}` + +Convenience method to wrap this instance of {{classname}} in {{{.}}} +{{/vendorExtensions.x-implements}} +{{/vendorExtensions.x-is-one-of-interface}} +{{/isEnum}} +{{#isEnum}} +## Enum + +{{#allowableValues}}{{#enumVars}} +* `{{name}}` (value: `{{{value}}}`) +{{/enumVars}}{{/allowableValues}} +{{/isEnum}} + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +{{/model}}{{/models}} diff --git a/templates/model_enum.mustache b/templates/model_enum.mustache new file mode 100644 index 0000000..398f8f0 --- /dev/null +++ b/templates/model_enum.mustache @@ -0,0 +1,101 @@ +// {{{classname}}} {{{description}}}{{^description}}the model '{{{classname}}}'{{/description}} +type {{{classname}}} {{{format}}}{{^format}}{{dataType}}{{/format}} + +// List of {{{name}}} +const ( + {{#allowableValues}} + {{#enumVars}} + {{^-first}} + {{/-first}} + {{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = {{{value}}} + {{/enumVars}} + {{/allowableValues}} +) + +// All allowed values of {{{classname}}} enum +var Allowed{{{classname}}}EnumValues = []{{{classname}}}{ + {{#allowableValues}} + {{#enumVars}} + {{{value}}}, + {{/enumVars}} + {{/allowableValues}} +} + +func (v *{{{classname}}}) UnmarshalJSON(src []byte) error { + var value {{{format}}}{{^format}}{{dataType}}{{/format}} + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := {{{classname}}}(value) + for _, existing := range Allowed{{{classname}}}EnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid {{classname}}", value) +} + +// New{{{classname}}}FromValue returns a pointer to a valid {{{classname}}} +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func New{{{classname}}}FromValue(v {{{format}}}{{^format}}{{dataType}}{{/format}}) (*{{{classname}}}, error) { + ev := {{{classname}}}(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for {{{classname}}}: valid values are %v", v, Allowed{{{classname}}}EnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v {{{classname}}}) IsValid() bool { + for _, existing := range Allowed{{{classname}}}EnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to {{{name}}} value +func (v {{{classname}}}) Ptr() *{{{classname}}} { + return &v +} + +type Nullable{{{classname}}} struct { + value *{{{classname}}} + isSet bool +} + +func (v Nullable{{classname}}) Get() *{{classname}} { + return v.value +} + +func (v *Nullable{{classname}}) Set(val *{{classname}}) { + v.value = val + v.isSet = true +} + +func (v Nullable{{classname}}) IsSet() bool { + return v.isSet +} + +func (v *Nullable{{classname}}) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullable{{classname}}(val *{{classname}}) *Nullable{{classname}} { + return &Nullable{{classname}}{value: val, isSet: true} +} + +func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/templates/model_oneof.mustache b/templates/model_oneof.mustache new file mode 100644 index 0000000..e62c5e8 --- /dev/null +++ b/templates/model_oneof.mustache @@ -0,0 +1,148 @@ +// {{classname}} - {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} +type {{classname}} struct { + {{#oneOf}} + {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} *{{{.}}} + {{/oneOf}} +} + +{{#oneOf}} +// {{{.}}}As{{classname}} is a convenience function that returns {{{.}}} wrapped in {{classname}} +func {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}As{{classname}}(v *{{{.}}}) {{classname}} { + return {{classname}}{ + {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}: v, + } +} + +{{/oneOf}} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *{{classname}}) UnmarshalJSON(data []byte) error { + var err error + {{#isNullable}} + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + {{/isNullable}} + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + {{#mappedModels}} + {{#-first}} + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + {{/-first}} + // check if the discriminator value is '{{{mappingName}}}' + if jsonDict["{{{propertyBaseName}}}"] == "{{{mappingName}}}" { + // try to unmarshal JSON data into {{{modelName}}} + err = json.Unmarshal(data, &dst.{{{modelName}}}) + if err == nil { + return nil // data stored in dst.{{{modelName}}}, return on the first match + } else { + dst.{{{modelName}}} = nil + return fmt.Errorf("failed to unmarshal {{classname}} as {{{modelName}}}: %s", err.Error()) + } + } + + {{/mappedModels}} + return nil + {{/discriminator}} + {{^discriminator}} + match := 0 + {{#oneOf}} + // try to unmarshal data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} + err = json.Unmarshal(data, &dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + if err == nil { + json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + if string(json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) == "{}" { // empty struct + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } else { + match++ + } + } else { + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } + + {{/oneOf}} + if match > 1 { // more than 1 match + // reset to nil + {{#oneOf}} + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + {{/oneOf}} + + return fmt.Errorf("data matches more than one schema in oneOf({{classname}})") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf({{classname}})") + } + {{/discriminator}} + {{/useOneOfDiscriminatorLookup}} + {{^useOneOfDiscriminatorLookup}} + match := 0 + {{#oneOf}} + // try to unmarshal data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} + err = newStrictDecoder(data).Decode(&dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + if err == nil { + json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + if string(json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) == "{}" { // empty struct + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } else { + if err = validator.Validate(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}); err != nil { + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } else { + match++ + } + } + } else { + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } + + {{/oneOf}} + if match > 1 { // more than 1 match + // reset to nil + {{#oneOf}} + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + {{/oneOf}} + + return fmt.Errorf("data matches more than one schema in oneOf({{classname}})") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf({{classname}})") + } + {{/useOneOfDiscriminatorLookup}} +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src {{classname}}) MarshalJSON() ([]byte, error) { +{{#oneOf}} + if src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} != nil { + return json.Marshal(&src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + } + +{{/oneOf}} + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *{{classname}}) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } +{{#oneOf}} + if obj.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} != nil { + return obj.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} + } + +{{/oneOf}} + // all schemas are nil + return nil +} + +{{>nullable_model}} diff --git a/templates/model_simple.mustache b/templates/model_simple.mustache new file mode 100644 index 0000000..6e60c6a --- /dev/null +++ b/templates/model_simple.mustache @@ -0,0 +1,572 @@ +// checks if the {{classname}} type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &{{classname}}{} + +// {{classname}} {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} +type {{classname}} struct { +{{#parentModel.name}} +{{^isArray}} + {{{parentModel.classname}}} +{{/isArray}} +{{#isArray}} + Items {{{parentModel.classname}}} +{{/isArray}} +{{/parentModel.name}} +{{#vars}} +{{^-first}} +{{/-first}} +{{#description}} + // {{{.}}} +{{/description}} +{{#deprecated}} + // Deprecated +{{/deprecated}} + {{name}} {{^required}}{{^isNullable}}{{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{/isNullable}}{{/required}}{{{dataType}}}{{{vendorExtensions.x-go-datatag}}} +{{/vars}} +{{#isAdditionalPropertiesTrue}} + AdditionalProperties map[string]interface{} +{{/isAdditionalPropertiesTrue}} +} + +{{#isAdditionalPropertiesTrue}} +type _{{{classname}}} {{{classname}}} + +{{/isAdditionalPropertiesTrue}} +{{^isAdditionalPropertiesTrue}} +{{#hasRequired}} +type _{{{classname}}} {{{classname}}} + +{{/hasRequired}} +{{/isAdditionalPropertiesTrue}} +// New{{classname}} instantiates a new {{classname}} object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func New{{classname}}({{#requiredVars}}{{nameInCamelCase}} {{dataType}}{{^-last}}, {{/-last}}{{/requiredVars}}) *{{classname}} { + this := {{classname}}{} +{{#allVars}} +{{#required}} + this.{{name}} = {{nameInCamelCase}} +{{/required}} +{{^required}} +{{#defaultValue}} +{{^vendorExtensions.x-golang-is-container}} +{{^isReadOnly}} +{{#isNullable}} + var {{nameInCamelCase}} {{{datatypeWithEnum}}} = {{{.}}} + this.{{name}} = *New{{{dataType}}}(&{{nameInCamelCase}}) +{{/isNullable}} +{{^isNullable}} + var {{nameInCamelCase}} {{{dataType}}} = {{{.}}} + this.{{name}} = &{{nameInCamelCase}} +{{/isNullable}} +{{/isReadOnly}} +{{/vendorExtensions.x-golang-is-container}} +{{/defaultValue}} +{{/required}} +{{/allVars}} + return &this +} + +// New{{classname}}WithDefaults instantiates a new {{classname}} object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func New{{classname}}WithDefaults() *{{classname}} { + this := {{classname}}{} +{{#vars}} +{{#defaultValue}} +{{^vendorExtensions.x-golang-is-container}} +{{^isReadOnly}} +{{#isNullable}} +{{!we use datatypeWithEnum here, since it will represent the non-nullable name of the datatype, e.g. int64 for NullableInt64}} + var {{nameInCamelCase}} {{{datatypeWithEnum}}} = {{{.}}} + this.{{name}} = *New{{{dataType}}}(&{{nameInCamelCase}}) +{{/isNullable}} +{{^isNullable}} + var {{nameInCamelCase}} {{{dataType}}} = {{{.}}} + this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}} +{{/isNullable}} +{{/isReadOnly}} +{{/vendorExtensions.x-golang-is-container}} +{{/defaultValue}} +{{/vars}} + return &this +} + +{{#vars}} +{{#required}} +// Get{{name}} returns the {{name}} field value +{{#isNullable}} +// If the value is explicit nil, the zero value for {{vendorExtensions.x-go-base-type}} will be returned +{{/isNullable}} +{{#deprecated}} +// Deprecated +{{/deprecated}} +func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { + if o == nil{{#isNullable}}{{^vendorExtensions.x-golang-is-container}} || o.{{name}}.Get() == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + var ret {{vendorExtensions.x-go-base-type}} + return ret + } + +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + return o.{{name}} +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + return *o.{{name}}.Get() +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + return o.{{name}} +{{/isNullable}} +} + +// Get{{name}}Ok returns a tuple with the {{name}} field value +// and a boolean to check if the value has been set. +{{#isNullable}} +// NOTE: If the value is an explicit nil, `nil, true` will be returned +{{/isNullable}} +{{#deprecated}} +// Deprecated +{{/deprecated}} +func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) { + if o == nil{{#isNullable}}{{#vendorExtensions.x-golang-is-container}} || IsNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { +{{^isFreeFormObject}} + return nil, false + {{/isFreeFormObject}} + {{#isFreeFormObject}} + return {{vendorExtensions.x-go-base-type}}{}, false + {{/isFreeFormObject}} + } +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + return o.{{name}}.Get(), o.{{name}}.IsSet() +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true +{{/isNullable}} +} + +// Set{{name}} sets field value +{{#deprecated}} +// Deprecated +{{/deprecated}} +func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) { +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + o.{{name}} = v +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + o.{{name}}.Set(&v) +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + o.{{name}} = v +{{/isNullable}} +} + +{{#useDefaultValuesForRequiredVars}} +{{^isReadOnly}} +{{#defaultValue}} +// GetDefault{{{nameInPascalCase}}} returns the default value {{{defaultValue}}} of the {{{name}}} field. +func (o *{{classname}}) GetDefault{{nameInPascalCase}}() interface{} { + return {{{defaultValue}}} +} +{{/defaultValue}} +{{/isReadOnly}} + +{{/useDefaultValuesForRequiredVars}} +{{/required}} +{{^required}} +// Get{{name}} returns the {{name}} field value if set, zero value otherwise{{#isNullable}} (both if not set or set to explicit null){{/isNullable}}. +{{#deprecated}} +// Deprecated +{{/deprecated}} +func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { + if o == nil{{^isNullable}} || IsNil(o.{{name}}){{/isNullable}}{{#isNullable}}{{^vendorExtensions.x-golang-is-container}} || IsNil(o.{{name}}.Get()){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + var ret {{vendorExtensions.x-go-base-type}} + return ret + } +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + return o.{{name}} +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + return *o.{{name}}.Get() +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + return {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}o.{{name}} +{{/isNullable}} +} + +// Get{{name}}Ok returns a tuple with the {{name}} field value if set, nil otherwise +// and a boolean to check if the value has been set. +{{#isNullable}} +// NOTE: If the value is an explicit nil, `nil, true` will be returned +{{/isNullable}} +{{#deprecated}} +// Deprecated +{{/deprecated}} +func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) { + if o == nil{{^isNullable}} || IsNil(o.{{name}}){{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}} || IsNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + {{^isFreeFormObject}} + return nil, false + {{/isFreeFormObject}} + {{#isFreeFormObject}} + return {{vendorExtensions.x-go-base-type}}{}, false + {{/isFreeFormObject}} + } +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + return o.{{name}}.Get(), o.{{name}}.IsSet() +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + return o.{{name}}, true +{{/isNullable}} +} + +// Has{{name}} returns a boolean if a field has been set. +func (o *{{classname}}) Has{{name}}() bool { + if o != nil && {{^isNullable}}!IsNil(o.{{name}}){{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}}!IsNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{^vendorExtensions.x-golang-is-container}}o.{{name}}.IsSet(){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + return true + } + + return false +} + +// Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field. +{{#deprecated}} +// Deprecated +{{/deprecated}} +func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) { +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + o.{{name}} = v +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + o.{{name}}.Set({{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}v) +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + o.{{name}} = {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}v +{{/isNullable}} +} +{{#isNullable}} +{{^vendorExtensions.x-golang-is-container}} +// Set{{name}}Nil sets the value for {{name}} to be an explicit nil +func (o *{{classname}}) Set{{name}}Nil() { + o.{{name}}.Set(nil) +} + +// Unset{{name}} ensures that no value is present for {{name}}, not even an explicit nil +func (o *{{classname}}) Unset{{name}}() { + o.{{name}}.Unset() +} +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} + +{{/required}} +{{/vars}} +{{#vendorExtensions.x-go-generate-marshal-json}} +func (o {{classname}}) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +{{/vendorExtensions.x-go-generate-marshal-json}} +func (o {{classname}}) ToMap() (map[string]interface{}, error) { + toSerialize := {{#isArray}}make([]interface{}, len(o.Items)){{/isArray}}{{^isArray}}map[string]interface{}{}{{/isArray}} + {{#parent}} + {{^isMap}} + {{^isArray}} + serialized{{parent}}, err{{parent}} := json.Marshal(o.{{parent}}) + if err{{parent}} != nil { + return map[string]interface{}{}, err{{parent}} + } + err{{parent}} = json.Unmarshal([]byte(serialized{{parent}}), &toSerialize) + if err{{parent}} != nil { + return map[string]interface{}{}, err{{parent}} + } + {{/isArray}} + {{/isMap}} + {{#isArray}} + for i, item := range o.Items { + toSerialize[i] = item + } + {{/isArray}} + {{/parent}} + {{#vars}} + {{! if argument is nullable, only serialize it if it is set}} + {{#isNullable}} + {{#vendorExtensions.x-golang-is-container}} + {{! support for container fields is not ideal at this point because of lack of Nullable* types}} + if o.{{name}} != nil { + toSerialize["{{{baseName}}}"] = o.{{name}} + } + {{/vendorExtensions.x-golang-is-container}} + {{^vendorExtensions.x-golang-is-container}} + {{#required}} + toSerialize["{{{baseName}}}"] = o.{{name}}.Get() + {{/required}} + {{^required}} + if o.{{name}}.IsSet() { + toSerialize["{{{baseName}}}"] = o.{{name}}.Get() + } + {{/required}} + {{/vendorExtensions.x-golang-is-container}} + {{/isNullable}} + {{! if argument is not nullable, don't set it if it is nil}} + {{^isNullable}} + {{#required}} + {{#useDefaultValuesForRequiredVars}} + {{^isReadOnly}} + {{#defaultValue}} + if _, exists := toSerialize["{{{baseName}}}"]; !exists { + toSerialize["{{{baseName}}}"] = o.GetDefault{{nameInPascalCase}}() + } + {{/defaultValue}} + {{/isReadOnly}} + {{/useDefaultValuesForRequiredVars}} + toSerialize["{{{baseName}}}"] = o.{{name}} + {{/required}} + {{^required}} + if !IsNil(o.{{name}}) { + toSerialize["{{{baseName}}}"] = o.{{name}} + } + {{/required}} + {{/isNullable}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + {{/isAdditionalPropertiesTrue}} + return toSerialize, nil +} + +{{#vendorExtensions.x-go-generate-unmarshal-json}} +{{#isAdditionalPropertiesTrue}} +func (o *{{{classname}}}) UnmarshalJSON(data []byte) (err error) { +{{/isAdditionalPropertiesTrue}} +{{^isAdditionalPropertiesTrue}} +{{#hasRequired}} +func (o *{{{classname}}}) UnmarshalJSON(data []byte) (err error) { +{{/hasRequired}} +{{/isAdditionalPropertiesTrue}} +{{#hasRequired}} + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ +{{#requiredVars}} + "{{baseName}}", +{{/requiredVars}} + } + +{{#useDefaultValuesForRequiredVars}} + // defaultValueFuncMap captures the default values for required properties. + // These values are used when required properties are missing from the payload. + defaultValueFuncMap := map[string]func() interface{} { +{{#requiredVars}} +{{#defaultValue}} +{{^isReadOnly}} + "{{baseName}}": o.GetDefault{{nameInPascalCase}}, +{{/isReadOnly}} +{{/defaultValue}} +{{/requiredVars}} + } + var defaultValueApplied bool +{{/useDefaultValuesForRequiredVars}} + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + {{#useDefaultValuesForRequiredVars}} + if value, exists := allProperties[requiredProperty]; !exists || value == "" { + if _, ok := defaultValueFuncMap[requiredProperty]; ok { + allProperties[requiredProperty] = defaultValueFuncMap[requiredProperty]() + defaultValueApplied = true + } + } + if value, exists := allProperties[requiredProperty]; !exists || value == ""{ + {{/useDefaultValuesForRequiredVars}} + {{^useDefaultValuesForRequiredVars}} + if _, exists := allProperties[requiredProperty]; !exists { + {{/useDefaultValuesForRequiredVars}} + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + {{#useDefaultValuesForRequiredVars}} + if defaultValueApplied { + data, err = json.Marshal(allProperties) + if err != nil{ + return err + } + } + {{/useDefaultValuesForRequiredVars}} +{{/hasRequired}} +{{#isAdditionalPropertiesTrue}} +{{#parent}} +{{^isMap}} + type {{classname}}WithoutEmbeddedStruct struct { + {{#vars}} + {{^-first}} + {{/-first}} + {{#description}} + // {{{.}}} + {{/description}} + {{#deprecated}} + // Deprecated + {{/deprecated}} + {{name}} {{^required}}{{^isNullable}}{{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{/isNullable}}{{/required}}{{{dataType}}}{{{vendorExtensions.x-go-datatag}}} + {{/vars}} + } + + var{{{classname}}}WithoutEmbeddedStruct := {{{classname}}}WithoutEmbeddedStruct{} + + err = json.Unmarshal(data, &var{{{classname}}}WithoutEmbeddedStruct) + if err == nil { + var{{{classname}}} := _{{{classname}}}{} + {{#vars}} + var{{{classname}}}.{{{name}}} = var{{{classname}}}WithoutEmbeddedStruct.{{{name}}} + {{/vars}} + *o = {{{classname}}}(var{{{classname}}}) + } else { + return err + } + + var{{{classname}}} := _{{{classname}}}{} + + err = json.Unmarshal(data, &var{{{classname}}}) + if err == nil { + o.{{{parent}}} = var{{{classname}}}.{{{parent}}} + } else { + return err + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + {{#vars}} + delete(additionalProperties, "{{{baseName}}}") + {{/vars}} + + // remove fields from embedded structs + reflect{{{parent}}} := reflect.ValueOf(o.{{{parent}}}) + for i := 0; i < reflect{{{parent}}}.Type().NumField(); i++ { + t := reflect{{{parent}}}.Type().Field(i) + + if jsonTag := t.Tag.Get("json"); jsonTag != "" { + fieldName := "" + if commaIdx := strings.Index(jsonTag, ","); commaIdx > 0 { + fieldName = jsonTag[:commaIdx] + } else { + fieldName = jsonTag + } + if fieldName != "AdditionalProperties" { + delete(additionalProperties, fieldName) + } + } + } + + o.AdditionalProperties = additionalProperties + } + + return err +{{/isMap}} +{{#isMap}} + var{{{classname}}} := _{{{classname}}}{} + + err = json.Unmarshal(data, &var{{{classname}}}) + + if err != nil { + return err + } + + *o = {{{classname}}}(var{{{classname}}}) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + {{#vars}} + delete(additionalProperties, "{{{baseName}}}") + {{/vars}} + o.AdditionalProperties = additionalProperties + } + + return err +{{/isMap}} +{{/parent}} +{{^parent}} + var{{{classname}}} := _{{{classname}}}{} + + err = json.Unmarshal(data, &var{{{classname}}}) + + if err != nil { + return err + } + + *o = {{{classname}}}(var{{{classname}}}) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + {{#vars}} + delete(additionalProperties, "{{{baseName}}}") + {{/vars}} + o.AdditionalProperties = additionalProperties + } + + return err +{{/parent}} +{{/isAdditionalPropertiesTrue}} +{{#isAdditionalPropertiesTrue}} +} + +{{/isAdditionalPropertiesTrue}} +{{^isAdditionalPropertiesTrue}} +{{#hasRequired}} + var{{{classname}}} := _{{{classname}}}{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&var{{{classname}}}) + + if err != nil { + return err + } + + *o = {{{classname}}}(var{{{classname}}}) + + return err +} + +{{/hasRequired}} +{{/isAdditionalPropertiesTrue}} +{{#isArray}} +func (o *{{{classname}}}) UnmarshalJSON(data []byte) (err error) { + return json.Unmarshal(data, &o.Items) +} + +{{/isArray}} +{{/vendorExtensions.x-go-generate-unmarshal-json}} +{{>nullable_model}} diff --git a/templates/nullable_model.mustache b/templates/nullable_model.mustache new file mode 100644 index 0000000..7b60ce6 --- /dev/null +++ b/templates/nullable_model.mustache @@ -0,0 +1,35 @@ +type Nullable{{{classname}}} struct { + value {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{{classname}}} + isSet bool +} + +func (v Nullable{{classname}}) Get() {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}} { + return v.value +} + +func (v *Nullable{{classname}}) Set(val {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}}) { + v.value = val + v.isSet = true +} + +func (v Nullable{{classname}}) IsSet() bool { + return v.isSet +} + +func (v *Nullable{{classname}}) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullable{{classname}}(val {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}}) *Nullable{{classname}} { + return &Nullable{{classname}}{value: val, isSet: true} +} + +func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/templates/openapi.mustache b/templates/openapi.mustache new file mode 100644 index 0000000..51ebafb --- /dev/null +++ b/templates/openapi.mustache @@ -0,0 +1 @@ +{{{openapi-yaml}}} \ No newline at end of file diff --git a/templates/partial_header.mustache b/templates/partial_header.mustache new file mode 100644 index 0000000..d8f219c --- /dev/null +++ b/templates/partial_header.mustache @@ -0,0 +1,18 @@ +/* +{{#appName}} +{{{.}}} + +{{/appName}} +{{#appDescription}} +{{{.}}} + +{{/appDescription}} +{{#version}} +API version: {{{.}}} +{{/version}} +{{#infoEmail}} +Contact: {{{.}}} +{{/infoEmail}} +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/templates/response.mustache b/templates/response.mustache new file mode 100644 index 0000000..4691e8f --- /dev/null +++ b/templates/response.mustache @@ -0,0 +1,38 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/templates/signing.mustache b/templates/signing.mustache new file mode 100644 index 0000000..57221be --- /dev/null +++ b/templates/signing.mustache @@ -0,0 +1,453 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "bytes" + "context" + "crypto" + "crypto/ecdsa" + "crypto/ed25519" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/base64" + "encoding/pem" + "fmt" + "io" + "net/http" + "net/textproto" + "os" + "strings" + "time" +) + +const ( + // Constants for HTTP signature parameters. + // The '(request-target)' parameter concatenates the lowercased :method, an + // ASCII space, and the :path pseudo-headers. + HttpSignatureParameterRequestTarget string = "(request-target)" + // The '(created)' parameter expresses when the signature was + // created. The value MUST be a Unix timestamp integer value. + HttpSignatureParameterCreated string = "(created)" + // The '(expires)' parameter expresses when the signature ceases to + // be valid. The value MUST be a Unix timestamp integer value. + HttpSignatureParameterExpires string = "(expires)" +) + +const ( + // Constants for HTTP headers. + // The 'Host' header, as defined in RFC 2616, section 14.23. + HttpHeaderHost string = "Host" + // The 'Date' header. + HttpHeaderDate string = "Date" + // The digest header, as defined in RFC 3230, section 4.3.2. + HttpHeaderDigest string = "Digest" + // The HTTP Authorization header, as defined in RFC 7235, section 4.2. + HttpHeaderAuthorization string = "Authorization" +) + +const ( + // Specifies the Digital Signature Algorithm is derived from metadata + // associated with 'keyId'. Supported DSA algorithms are RSASSA-PKCS1-v1_5, + // RSASSA-PSS, and ECDSA. + // The hash is SHA-512. + // This is the default value. + HttpSigningSchemeHs2019 string = "hs2019" + // Use RSASSA-PKCS1-v1_5 with SHA-512 hash. Deprecated. + HttpSigningSchemeRsaSha512 string = "rsa-sha512" + // Use RSASSA-PKCS1-v1_5 with SHA-256 hash. Deprecated. + HttpSigningSchemeRsaSha256 string = "rsa-sha256" + + // RFC 8017 section 7.2 + // Calculate the message signature using RSASSA-PKCS1-V1_5-SIGN from RSA PKCS#1 v1.5. + // PKCSV1_5 is deterministic. The same message and key will produce an identical + // signature value each time. + HttpSigningAlgorithmRsaPKCS1v15 string = "RSASSA-PKCS1-v1_5" + // Calculate the message signature using probabilistic signature scheme RSASSA-PSS. + // PSS is randomized and will produce a different signature value each time. + HttpSigningAlgorithmRsaPSS string = "RSASSA-PSS" + + // HashAlgorithm Sha256 for generating hash + HttpHashAlgorithmSha256 string = "sha256" + + // HashAlgorithm Sha512 for generating hash + HttpHashAlgorithmSha512 string = "sha512" +) + +var supportedSigningSchemes = map[string]bool{ + HttpSigningSchemeHs2019: true, + HttpSigningSchemeRsaSha512: true, + HttpSigningSchemeRsaSha256: true, +} + + +// HttpSignatureAuth provides HTTP signature authentication to a request passed +// via context using ContextHttpSignatureAuth. +// An 'Authorization' header is calculated by creating a hash of select headers, +// and optionally the body of the HTTP request, then signing the hash value using +// a private key which is available to the client. +// +// SignedHeaders specifies the list of HTTP headers that are included when generating +// the message signature. +// The two special signature headers '(request-target)' and '(created)' SHOULD be +// included in SignedHeaders. +// The '(created)' header expresses when the signature was created. +// The '(request-target)' header is a concatenation of the lowercased :method, an +// ASCII space, and the :path pseudo-headers. +// +// For example, SignedHeaders can be set to: +// (request-target) (created) date host digest +// +// When SignedHeaders is not specified, the client defaults to a single value, '(created)', +// in the list of HTTP headers. +// When SignedHeaders contains the 'Digest' value, the client performs the following operations: +// 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. +// 2. Set the 'Digest' header in the request body. +// 3. Include the 'Digest' header and value in the HTTP signature. +type HttpSignatureAuth struct { + KeyId string // A key identifier. + PrivateKeyPath string // The path to the private key. + PrivateKeyReader io.Reader // provide the APIKey using the types which implement io.Reader interface. + Passphrase string // The passphrase to decrypt the private key, if the key is encrypted. + SigningScheme string // The signature scheme, when signing HTTP requests. Supported value is 'hs2019'. + // The signature algorithm, when signing HTTP requests. + // Supported values are RSASSA-PKCS1-v1_5, RSASSA-PSS. + SigningAlgorithm string + HashAlgorithm string // supported values are sha256 and sha512. This also allows using sha256 with hs2019, which defaults to sha512. + SignedHeaders []string // A list of HTTP headers included when generating the signature for the message. + // SignatureMaxValidity specifies the maximum duration of the signature validity. + // The value is used to set the '(expires)' signature parameter in the HTTP request. + // '(expires)' is set to '(created)' plus the value of the SignatureMaxValidity field. + // To specify the '(expires)' signature parameter, set 'SignatureMaxValidity' and add '(expires)' to 'SignedHeaders'. + SignatureMaxValidity time.Duration + privateKey crypto.PrivateKey // The private key used to sign HTTP requests. +} + +// SetPrivateKey accepts a private key string and sets it. +func (h *HttpSignatureAuth) SetPrivateKey(privateKey string) error { + return h.parsePrivateKey([]byte(privateKey)) +} + +// ContextWithValue validates the HttpSignatureAuth configuration parameters and returns a context +// suitable for HTTP signature. An error is returned if the HttpSignatureAuth configuration parameters +// are invalid. +func (h *HttpSignatureAuth) ContextWithValue(ctx context.Context) (context.Context, error) { + if h.KeyId == "" { + return nil, fmt.Errorf("key ID must be specified") + } + if (len(h.PrivateKeyPath) == 0 && h.PrivateKeyReader == nil) && h.privateKey == nil { + return nil, fmt.Errorf("private key path must be specified") + } + if len(h.PrivateKeyPath) > 0 && h.PrivateKeyReader != nil{ + return nil, fmt.Errorf("Specify only one of PrivateKeyPath or PrivateKeyReader") + } + if _, ok := supportedSigningSchemes[h.SigningScheme]; !ok { + return nil, fmt.Errorf("invalid signing scheme: '%v'", h.SigningScheme) + } + m := make(map[string]bool) + for _, h := range h.SignedHeaders { + if strings.EqualFold(h, HttpHeaderAuthorization) { + return nil, fmt.Errorf("signed headers cannot include the 'Authorization' header") + } + m[h] = true + } + if len(m) != len(h.SignedHeaders) { + return nil, fmt.Errorf("list of signed headers cannot have duplicate names") + } + if h.SignatureMaxValidity < 0 { + return nil, fmt.Errorf("signature max validity must be a positive value") + } + if err := h.loadPrivateKey(); err != nil { + return nil, err + } + return context.WithValue(ctx, ContextHttpSignatureAuth, *h), nil +} + +// GetPublicKey returns the public key associated with this HTTP signature configuration. +func (h *HttpSignatureAuth) GetPublicKey() (crypto.PublicKey, error) { + if h.privateKey == nil { + if err := h.loadPrivateKey(); err != nil { + return nil, err + } + } + switch key := h.privateKey.(type) { + case *rsa.PrivateKey: + return key.Public(), nil + case *ecdsa.PrivateKey: + return key.Public(), nil + default: + // Do not change '%T' to anything else such as '%v'! + // The value of the private key must not be returned. + return nil, fmt.Errorf("unsupported key: %T", h.privateKey) + } +} + +// loadPrivateKey reads the private key from the file specified in the HttpSignatureAuth. +// The key is loaded only when privateKey is not already set. +func (h *HttpSignatureAuth) loadPrivateKey() (err error) { + if h.privateKey != nil { + return nil + } + var priv []byte + keyReader := h.PrivateKeyReader + if keyReader == nil { + var file *os.File + file, err = os.Open(h.PrivateKeyPath) + if err != nil { + return fmt.Errorf("cannot load private key '%s'. Error: %v", h.PrivateKeyPath, err) + } + keyReader = file + defer func() { + err = file.Close() + }() + } + priv, err = io.ReadAll(keyReader) + if err != nil{ + return err + } + return h.parsePrivateKey(priv) +} + +// parsePrivateKey decodes privateKey byte array to crypto.PrivateKey type. +func (h *HttpSignatureAuth) parsePrivateKey(priv []byte) error { + pemBlock, _ := pem.Decode(priv) + if pemBlock == nil { + // No PEM data has been found. + return fmt.Errorf("file '%s' does not contain PEM data", h.PrivateKeyPath) + } + var privKey []byte + var err error + if x509.IsEncryptedPEMBlock(pemBlock) { + // The PEM data is encrypted. + privKey, err = x509.DecryptPEMBlock(pemBlock, []byte(h.Passphrase)) + if err != nil { + // Failed to decrypt PEM block. Because of deficiencies in the encrypted-PEM format, + // it's not always possible to detect an incorrect password. + return err + } + } else { + privKey = pemBlock.Bytes + } + switch pemBlock.Type { + case "RSA PRIVATE KEY": + if h.privateKey, err = x509.ParsePKCS1PrivateKey(privKey); err != nil { + return err + } + case "EC PRIVATE KEY", "PRIVATE KEY": + // https://tools.ietf.org/html/rfc5915 section 4. + if h.privateKey, err = x509.ParsePKCS8PrivateKey(privKey); err != nil { + return err + } + default: + return fmt.Errorf("key '%s' is not supported", pemBlock.Type) + } + return nil +} + +// SignRequest signs the request using HTTP signature. +// See https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ +// +// Do not add, remove or change headers that are included in the SignedHeaders +// after SignRequest has been invoked; this is because the header values are +// included in the signature. Any subsequent alteration will cause a signature +// verification failure. +// If there are multiple instances of the same header field, all +// header field values associated with the header field MUST be +// concatenated, separated by a ASCII comma and an ASCII space +// ', ', and used in the order in which they will appear in the +// transmitted HTTP message. +func SignRequest( + ctx context.Context, + r *http.Request, + auth HttpSignatureAuth) error { + + if auth.privateKey == nil { + return fmt.Errorf("private key is not set") + } + now := time.Now() + date := now.UTC().Format(http.TimeFormat) + // The 'created' field expresses when the signature was created. + // The value MUST be a Unix timestamp integer value. See 'HTTP signature' section 2.1.4. + created := now.Unix() + + var h crypto.Hash + var err error + var prefix string + var expiresUnix float64 + + if auth.SignatureMaxValidity < 0 { + return fmt.Errorf("signature validity must be a positive value") + } + if auth.SignatureMaxValidity > 0 { + e := now.Add(auth.SignatureMaxValidity) + expiresUnix = float64(e.Unix()) + float64(e.Nanosecond()) / float64(time.Second) + } + // Determine the cryptographic hash to be used for the signature and the body digest. + switch auth.SigningScheme { + case HttpSigningSchemeRsaSha512: + h = crypto.SHA512 + prefix = "SHA-512=" + case HttpSigningSchemeRsaSha256: + // This is deprecated and should no longer be used. + h = crypto.SHA256 + prefix = "SHA-256=" + case HttpSigningSchemeHs2019: + if auth.HashAlgorithm == HttpHashAlgorithmSha256 { + h = crypto.SHA256 + prefix = "SHA-256=" + } else { + h = crypto.SHA512 + prefix = "SHA-512=" + } + + default: + return fmt.Errorf("unsupported signature scheme: %v", auth.SigningScheme) + } + if !h.Available() { + return fmt.Errorf("hash '%v' is not available", h) + } + + // Build the "(request-target)" signature header. + var sb bytes.Buffer + fmt.Fprintf(&sb, "%s %s", strings.ToLower(r.Method), r.URL.EscapedPath()) + if r.URL.RawQuery != "" { + // The ":path" pseudo-header field includes the path and query parts + // of the target URI (the "path-absolute" production and optionally a + // '?' character followed by the "query" production (see Sections 3.3 + // and 3.4 of [RFC3986] + fmt.Fprintf(&sb, "?%s", r.URL.RawQuery) + } + requestTarget := sb.String() + sb.Reset() + + // Build the string to be signed. + signedHeaders := auth.SignedHeaders + if len(signedHeaders) == 0 { + signedHeaders = []string{HttpSignatureParameterCreated} + } + // Validate the list of signed headers has no duplicates. + m := make(map[string]bool) + for _, h := range signedHeaders { + m[h] = true + } + if len(m) != len(signedHeaders) { + return fmt.Errorf("list of signed headers must not have any duplicates") + } + hasCreatedParameter := false + hasExpiresParameter := false + for i, header := range signedHeaders { + header = strings.ToLower(header) + var value string + switch header { + case strings.ToLower(HttpHeaderAuthorization): + return fmt.Errorf("cannot include the 'Authorization' header as a signed header") + case HttpSignatureParameterRequestTarget: + value = requestTarget + case HttpSignatureParameterCreated: + value = fmt.Sprintf("%d", created) + hasCreatedParameter = true + case HttpSignatureParameterExpires: + if auth.SignatureMaxValidity.Nanoseconds() == 0 { + return fmt.Errorf("cannot set '(expires)' signature parameter. SignatureMaxValidity is not configured") + } + value = fmt.Sprintf("%.3f", expiresUnix) + hasExpiresParameter = true + case "date": + value = date + r.Header.Set(HttpHeaderDate, date) + case "digest": + // Calculate the digest of the HTTP request body. + // Calculate body digest per RFC 3230 section 4.3.2 + bodyHash := h.New() + if r.Body != nil { + // Make a copy of the body io.Reader so that we can read the body to calculate the hash, + // then one more time when marshaling the request. + var body io.Reader + body, err = r.GetBody() + if err != nil { + return err + } + if _, err = io.Copy(bodyHash, body); err != nil { + return err + } + } + d := bodyHash.Sum(nil) + value = prefix + base64.StdEncoding.EncodeToString(d) + r.Header.Set(HttpHeaderDigest, value) + case "host": + value = r.Host + r.Header.Set(HttpHeaderHost, r.Host) + default: + var ok bool + var v []string + canonicalHeader := textproto.CanonicalMIMEHeaderKey(header) + if v, ok = r.Header[canonicalHeader]; !ok { + // If a header specified in the headers parameter cannot be matched with + // a provided header in the message, the implementation MUST produce an error. + return fmt.Errorf("header '%s' does not exist in the request", canonicalHeader) + } + // If there are multiple instances of the same header field, all + // header field values associated with the header field MUST be + // concatenated, separated by a ASCII comma and an ASCII space + // `, `, and used in the order in which they will appear in the + // transmitted HTTP message. + value = strings.Join(v, ", ") + } + if i > 0 { + fmt.Fprintf(&sb, "\n") + } + fmt.Fprintf(&sb, "%s: %s", header, value) + } + if expiresUnix != 0 && !hasExpiresParameter { + return fmt.Errorf("signatureMaxValidity is specified, but '(expired)' parameter is not present") + } + msg := []byte(sb.String()) + msgHash := h.New() + if _, err = msgHash.Write(msg); err != nil { + return err + } + d := msgHash.Sum(nil) + + var signature []byte + switch key := auth.privateKey.(type) { + case *rsa.PrivateKey: + switch auth.SigningAlgorithm { + case HttpSigningAlgorithmRsaPKCS1v15: + signature, err = rsa.SignPKCS1v15(rand.Reader, key, h, d) + case "", HttpSigningAlgorithmRsaPSS: + signature, err = rsa.SignPSS(rand.Reader, key, h, d, nil) + default: + return fmt.Errorf("unsupported signing algorithm: '%s'", auth.SigningAlgorithm) + } + case *ecdsa.PrivateKey: + signature, err = key.Sign(rand.Reader, d, h) + case ed25519.PrivateKey: // requires go 1.13 + signature, err = key.Sign(rand.Reader, msg, crypto.Hash(0)) + default: + return fmt.Errorf("unsupported private key") + } + if err != nil { + return err + } + + sb.Reset() + for i, header := range signedHeaders { + if i > 0 { + sb.WriteRune(' ') + } + sb.WriteString(strings.ToLower(header)) + } + headers_list := sb.String() + sb.Reset() + fmt.Fprintf(&sb, `Signature keyId="%s",algorithm="%s",`, auth.KeyId, auth.SigningScheme) + if hasCreatedParameter { + fmt.Fprintf(&sb, "created=%d,", created) + } + if hasExpiresParameter { + fmt.Fprintf(&sb, "expires=%.3f,", expiresUnix) + } + fmt.Fprintf(&sb, `headers="%s",signature="%s"`, headers_list, base64.StdEncoding.EncodeToString(signature)) + authStr := sb.String() + r.Header.Set(HttpHeaderAuthorization, authStr) + return nil +} diff --git a/templates/utils.mustache b/templates/utils.mustache new file mode 100644 index 0000000..1907ea5 --- /dev/null +++ b/templates/utils.mustache @@ -0,0 +1,352 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} \ No newline at end of file diff --git a/test/api_auth_test.go b/test/api_auth_test.go new file mode 100644 index 0000000..8eb909a --- /dev/null +++ b/test/api_auth_test.go @@ -0,0 +1,73 @@ +/* +FastAPI + +Testing AuthAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_AuthAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AuthAPIService LoginApiApiV2AuthApiTokenPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthAPI.LoginApiApiV2AuthApiTokenPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AuthAPIService LoginApiV2AuthTokenPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthAPI.LoginApiV2AuthTokenPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AuthAPIService LogoutApiV2AuthLogoutPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthAPI.LogoutApiV2AuthLogoutPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AuthAPIService MeApiV2AuthMeGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthAPI.MeApiV2AuthMeGet(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_dfiq_test.go b/test/api_dfiq_test.go new file mode 100644 index 0000000..62e2ebd --- /dev/null +++ b/test/api_dfiq_test.go @@ -0,0 +1,139 @@ +/* +FastAPI + +Testing DfiqAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_DfiqAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DfiqAPIService ConfigApiV2DfiqConfigGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DfiqAPI.ConfigApiV2DfiqConfigGet(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DfiqAPIService DeleteApiV2DfiqDfiqIdDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dfiqId string + + resp, httpRes, err := apiClient.DfiqAPI.DeleteApiV2DfiqDfiqIdDelete(context.Background(), dfiqId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DfiqAPIService DetailsApiV2DfiqDfiqIdGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dfiqId interface{} + + resp, httpRes, err := apiClient.DfiqAPI.DetailsApiV2DfiqDfiqIdGet(context.Background(), dfiqId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DfiqAPIService FromArchiveApiV2DfiqFromArchivePost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DfiqAPI.FromArchiveApiV2DfiqFromArchivePost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DfiqAPIService NewFromYamlApiV2DfiqFromYamlPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DfiqAPI.NewFromYamlApiV2DfiqFromYamlPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DfiqAPIService PatchApiV2DfiqDfiqIdPatch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dfiqId interface{} + + resp, httpRes, err := apiClient.DfiqAPI.PatchApiV2DfiqDfiqIdPatch(context.Background(), dfiqId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DfiqAPIService SearchApiV2DfiqSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DfiqAPI.SearchApiV2DfiqSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DfiqAPIService ToArchiveApiV2DfiqToArchivePost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DfiqAPI.ToArchiveApiV2DfiqToArchivePost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DfiqAPIService ValidateDfiqYamlApiV2DfiqValidatePost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DfiqAPI.ValidateDfiqYamlApiV2DfiqValidatePost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_entities_test.go b/test/api_entities_test.go new file mode 100644 index 0000000..477fb7c --- /dev/null +++ b/test/api_entities_test.go @@ -0,0 +1,103 @@ +/* +FastAPI + +Testing EntitiesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_EntitiesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test EntitiesAPIService DeleteApiV2EntitiesEntityIdDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var entityId string + + resp, httpRes, err := apiClient.EntitiesAPI.DeleteApiV2EntitiesEntityIdDelete(context.Background(), entityId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EntitiesAPIService DetailsApiV2EntitiesEntityIdGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var entityId interface{} + + resp, httpRes, err := apiClient.EntitiesAPI.DetailsApiV2EntitiesEntityIdGet(context.Background(), entityId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EntitiesAPIService NewApiV2EntitiesPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.EntitiesAPI.NewApiV2EntitiesPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EntitiesAPIService PatchApiV2EntitiesEntityIdPatch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var entityId interface{} + + resp, httpRes, err := apiClient.EntitiesAPI.PatchApiV2EntitiesEntityIdPatch(context.Background(), entityId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EntitiesAPIService SearchApiV2EntitiesSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.EntitiesAPI.SearchApiV2EntitiesSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EntitiesAPIService TagApiV2EntitiesTagPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.EntitiesAPI.TagApiV2EntitiesTagPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_graph_test.go b/test/api_graph_test.go new file mode 100644 index 0000000..9cc7fe6 --- /dev/null +++ b/test/api_graph_test.go @@ -0,0 +1,103 @@ +/* +FastAPI + +Testing GraphAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_GraphAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test GraphAPIService AddApiV2GraphAddPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.GraphAPI.AddApiV2GraphAddPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test GraphAPIService DeleteApiV2GraphRelationshipIdDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var relationshipId string + + resp, httpRes, err := apiClient.GraphAPI.DeleteApiV2GraphRelationshipIdDelete(context.Background(), relationshipId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test GraphAPIService EditApiV2GraphRelationshipIdPatch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var relationshipId string + + resp, httpRes, err := apiClient.GraphAPI.EditApiV2GraphRelationshipIdPatch(context.Background(), relationshipId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test GraphAPIService MatchApiV2GraphMatchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.GraphAPI.MatchApiV2GraphMatchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test GraphAPIService SearchApiV2GraphSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.GraphAPI.SearchApiV2GraphSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test GraphAPIService SwapApiV2GraphRelationshipIdSwapPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var relationshipId string + + resp, httpRes, err := apiClient.GraphAPI.SwapApiV2GraphRelationshipIdSwapPost(context.Background(), relationshipId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_import_data_test.go b/test/api_import_data_test.go new file mode 100644 index 0000000..c529fd4 --- /dev/null +++ b/test/api_import_data_test.go @@ -0,0 +1,37 @@ +/* +FastAPI + +Testing ImportDataAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_ImportDataAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ImportDataAPIService ImportMispJsonApiV2ImportDataImportMispJsonPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ImportDataAPI.ImportMispJsonApiV2ImportDataImportMispJsonPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_import_misp_json_test.go b/test/api_import_misp_json_test.go new file mode 100644 index 0000000..8e8c45c --- /dev/null +++ b/test/api_import_misp_json_test.go @@ -0,0 +1,38 @@ +/* +FastAPI + +Testing ImportMispJsonAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" +) + +func Test_goyeti_ImportMispJsonAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ImportMispJsonAPIService ImportMispJsonApiV2ImportDataImportMispJsonPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ImportMispJsonAPI.ImportMispJsonApiV2ImportDataImportMispJsonPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_indicators_test.go b/test/api_indicators_test.go new file mode 100644 index 0000000..df87c32 --- /dev/null +++ b/test/api_indicators_test.go @@ -0,0 +1,103 @@ +/* +FastAPI + +Testing IndicatorsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_IndicatorsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IndicatorsAPIService DeleteApiV2IndicatorsIndicatorIdDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var indicatorId string + + resp, httpRes, err := apiClient.IndicatorsAPI.DeleteApiV2IndicatorsIndicatorIdDelete(context.Background(), indicatorId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IndicatorsAPIService DetailsApiV2IndicatorsIndicatorIdGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var indicatorId interface{} + + resp, httpRes, err := apiClient.IndicatorsAPI.DetailsApiV2IndicatorsIndicatorIdGet(context.Background(), indicatorId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IndicatorsAPIService NewApiV2IndicatorsPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IndicatorsAPI.NewApiV2IndicatorsPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IndicatorsAPIService PatchApiV2IndicatorsIndicatorIdPatch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var indicatorId interface{} + + resp, httpRes, err := apiClient.IndicatorsAPI.PatchApiV2IndicatorsIndicatorIdPatch(context.Background(), indicatorId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IndicatorsAPIService SearchApiV2IndicatorsSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IndicatorsAPI.SearchApiV2IndicatorsSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IndicatorsAPIService TagApiV2IndicatorsTagPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IndicatorsAPI.TagApiV2IndicatorsTagPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_observables_test.go b/test/api_observables_test.go new file mode 100644 index 0000000..8235c1a --- /dev/null +++ b/test/api_observables_test.go @@ -0,0 +1,179 @@ +/* +FastAPI + +Testing ObservablesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_ObservablesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ObservablesAPIService AddContextApiV2ObservablesObservableIdContextPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var observableId interface{} + + resp, httpRes, err := apiClient.ObservablesAPI.AddContextApiV2ObservablesObservableIdContextPost(context.Background(), observableId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService AddTextApiV2ObservablesAddTextPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ObservablesAPI.AddTextApiV2ObservablesAddTextPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService BulkAddApiV2ObservablesBulkPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ObservablesAPI.BulkAddApiV2ObservablesBulkPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService DeleteApiV2ObservablesObservableIdDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var observableId string + + resp, httpRes, err := apiClient.ObservablesAPI.DeleteApiV2ObservablesObservableIdDelete(context.Background(), observableId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService DeleteContextApiV2ObservablesObservableIdContextDeletePost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var observableId interface{} + + resp, httpRes, err := apiClient.ObservablesAPI.DeleteContextApiV2ObservablesObservableIdContextDeletePost(context.Background(), observableId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService DetailsApiV2ObservablesObservableIdGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var observableId interface{} + + resp, httpRes, err := apiClient.ObservablesAPI.DetailsApiV2ObservablesObservableIdGet(context.Background(), observableId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService NewApiV2ObservablesPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ObservablesAPI.NewApiV2ObservablesPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService NewExtendedApiV2ObservablesExtendedPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ObservablesAPI.NewExtendedApiV2ObservablesExtendedPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService ObservablesRootApiV2ObservablesGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ObservablesAPI.ObservablesRootApiV2ObservablesGet(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService PatchApiV2ObservablesObservableIdPatch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var observableId interface{} + + resp, httpRes, err := apiClient.ObservablesAPI.PatchApiV2ObservablesObservableIdPatch(context.Background(), observableId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService SearchApiV2ObservablesSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ObservablesAPI.SearchApiV2ObservablesSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ObservablesAPIService TagObservableApiV2ObservablesTagPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ObservablesAPI.TagObservableApiV2ObservablesTagPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_system_test.go b/test/api_system_test.go new file mode 100644 index 0000000..f8df27e --- /dev/null +++ b/test/api_system_test.go @@ -0,0 +1,63 @@ +/* +FastAPI + +Testing SystemAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_SystemAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test SystemAPIService GetConfigApiV2SystemConfigGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SystemAPI.GetConfigApiV2SystemConfigGet(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SystemAPIService GetWorkerStatusApiV2SystemWorkersGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SystemAPI.GetWorkerStatusApiV2SystemWorkersGet(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SystemAPIService RestartWorkerApiV2SystemRestartworkerWorkerNamePost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var workerName string + + resp, httpRes, err := apiClient.SystemAPI.RestartWorkerApiV2SystemRestartworkerWorkerNamePost(context.Background(), workerName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_tags_test.go b/test/api_tags_test.go new file mode 100644 index 0000000..a1be059 --- /dev/null +++ b/test/api_tags_test.go @@ -0,0 +1,103 @@ +/* +FastAPI + +Testing TagsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_TagsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TagsAPIService DeleteApiV2TagsTagIdDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tagId string + + resp, httpRes, err := apiClient.TagsAPI.DeleteApiV2TagsTagIdDelete(context.Background(), tagId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TagsAPIService DetailsApiV2TagsTagIdGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tagId string + + resp, httpRes, err := apiClient.TagsAPI.DetailsApiV2TagsTagIdGet(context.Background(), tagId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TagsAPIService MergeApiV2TagsMergePost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TagsAPI.MergeApiV2TagsMergePost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TagsAPIService NewApiV2TagsPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TagsAPI.NewApiV2TagsPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TagsAPIService SearchApiV2TagsSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TagsAPI.SearchApiV2TagsSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TagsAPIService UpdateApiV2TagsTagIdPut", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tagId string + + resp, httpRes, err := apiClient.TagsAPI.UpdateApiV2TagsTagIdPut(context.Background(), tagId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_tasks_test.go b/test/api_tasks_test.go new file mode 100644 index 0000000..735b94d --- /dev/null +++ b/test/api_tasks_test.go @@ -0,0 +1,119 @@ +/* +FastAPI + +Testing TasksAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_TasksAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TasksAPIService DeleteExportApiV2TasksExportExportNameDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var exportName string + + resp, httpRes, err := apiClient.TasksAPI.DeleteExportApiV2TasksExportExportNameDelete(context.Background(), exportName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TasksAPIService ExportContentApiV2TasksExportExportIdContentGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var exportId string + + resp, httpRes, err := apiClient.TasksAPI.ExportContentApiV2TasksExportExportIdContentGet(context.Background(), exportId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TasksAPIService NewExportApiV2TasksExportNewPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TasksAPI.NewExportApiV2TasksExportNewPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TasksAPIService PatchExportApiV2TasksExportExportNamePatch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var exportName string + + resp, httpRes, err := apiClient.TasksAPI.PatchExportApiV2TasksExportExportNamePatch(context.Background(), exportName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TasksAPIService RunApiV2TasksTaskNameRunPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskName interface{} + + resp, httpRes, err := apiClient.TasksAPI.RunApiV2TasksTaskNameRunPost(context.Background(), taskName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TasksAPIService SearchApiV2TasksSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TasksAPI.SearchApiV2TasksSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TasksAPIService ToggleApiV2TasksTaskNameTogglePost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskName interface{} + + resp, httpRes, err := apiClient.TasksAPI.ToggleApiV2TasksTaskNameTogglePost(context.Background(), taskName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_templates_test.go b/test/api_templates_test.go new file mode 100644 index 0000000..427d857 --- /dev/null +++ b/test/api_templates_test.go @@ -0,0 +1,49 @@ +/* +FastAPI + +Testing TemplatesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_TemplatesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TemplatesAPIService RenderApiV2TemplatesRenderPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TemplatesAPI.RenderApiV2TemplatesRenderPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TemplatesAPIService SearchApiV2TemplatesSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TemplatesAPI.SearchApiV2TemplatesSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_users_test.go b/test/api_users_test.go new file mode 100644 index 0000000..4422d5f --- /dev/null +++ b/test/api_users_test.go @@ -0,0 +1,113 @@ +/* +FastAPI + +Testing UsersAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package goyeti + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + openapiclient "github.com/yeti-platform/goyeti" + "testing" +) + +func Test_goyeti_UsersAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test UsersAPIService CreateApiV2UsersPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersAPI.CreateApiV2UsersPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersAPIService DeleteApiV2UsersUserIdDelete", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.UsersAPI.DeleteApiV2UsersUserIdDelete(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersAPIService GetApiV2UsersUserIdGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.UsersAPI.GetApiV2UsersUserIdGet(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersAPIService ResetApiKeyApiV2UsersResetApiKeyPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersAPI.ResetApiKeyApiV2UsersResetApiKeyPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersAPIService ResetPasswordApiV2UsersResetPasswordPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersAPI.ResetPasswordApiV2UsersResetPasswordPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersAPIService SearchApiV2UsersSearchPost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersAPI.SearchApiV2UsersSearchPost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersAPIService ToggleApiV2UsersTogglePost", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersAPI.ToggleApiV2UsersTogglePost(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/utils.go b/utils.go new file mode 100644 index 0000000..bdf8963 --- /dev/null +++ b/utils.go @@ -0,0 +1,361 @@ +/* +FastAPI + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package goyeti + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +}